📝add help text to arguments
This commit is contained in:
parent
2af37f96a4
commit
dfa721e7c0
10
models.py
10
models.py
|
|
@ -65,19 +65,21 @@ class TazConfiguration:
|
||||||
Parse command line arguments.
|
Parse command line arguments.
|
||||||
"""
|
"""
|
||||||
argparser = argparse.ArgumentParser(
|
argparser = argparse.ArgumentParser(
|
||||||
description='Download taz e-paper'
|
description='Download taz e-paper',
|
||||||
)
|
)
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'-i',
|
'-i',
|
||||||
'--id',
|
'--id',
|
||||||
action='store',
|
action='store',
|
||||||
type=str,
|
type=str,
|
||||||
|
help='Your taz-ID',
|
||||||
)
|
)
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'-p',
|
'-p',
|
||||||
'--password',
|
'--password',
|
||||||
action='store',
|
action='store',
|
||||||
type=str,
|
type=str,
|
||||||
|
help='Your password',
|
||||||
)
|
)
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'-f',
|
'-f',
|
||||||
|
|
@ -85,23 +87,27 @@ class TazConfiguration:
|
||||||
action='store',
|
action='store',
|
||||||
type=str,
|
type=str,
|
||||||
choices=['pdf', 'epub', 'epubt', 'html', 'ascii', 'mobi', 'mobit'],
|
choices=['pdf', 'epub', 'epubt', 'html', 'ascii', 'mobi', 'mobit'],
|
||||||
|
help='The e-paper format',
|
||||||
)
|
)
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'-d',
|
'-d',
|
||||||
'--download_folder',
|
'--download_folder',
|
||||||
action='store',
|
action='store',
|
||||||
type=str,
|
type=str,
|
||||||
|
help='The path to a folder where the e-paper should be stored',
|
||||||
)
|
)
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'-l',
|
'-l',
|
||||||
'--limit-requests',
|
'--limit-requests',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=None
|
default=None,
|
||||||
|
help='Only query website for available newspaper if tomorrow\'s newspaper has not already been downloaded',
|
||||||
)
|
)
|
||||||
argparser.add_argument(
|
argparser.add_argument(
|
||||||
'--log_level',
|
'--log_level',
|
||||||
action='store',
|
action='store',
|
||||||
choices=['notset', 'debug', 'info', 'warning', 'error', 'critical'],
|
choices=['notset', 'debug', 'info', 'warning', 'error', 'critical'],
|
||||||
|
help='Set the log level',
|
||||||
)
|
)
|
||||||
return argparser.parse_args()
|
return argparser.parse_args()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue