Mercurial > getan
diff scripts/getan-report @ 526:31282f97b807
Reworked the --help function
* More information about the templates
* Information about the templates and how to
create them added to the README file.
author | Magnus Schieder <mschieder@intevation.de> |
---|---|
date | Tue, 22 Jan 2019 15:35:28 +0100 |
parents | 11d97a40dfa5 |
children | d5acadeef0f8 |
line wrap: on
line diff
--- a/scripts/getan-report Thu Jan 17 19:27:07 2019 +0100 +++ b/scripts/getan-report Tue Jan 22 15:35:28 2019 +0100 @@ -14,16 +14,23 @@ import argparse from getan.template import render +from getan.backend import DEFAULT_DATABASE def main(): usage='getan-report [options]' - parser = argparse.ArgumentParser(prog='getan', usage=usage) + parser = argparse.ArgumentParser(prog='getan', usage=usage, + description="You can find more information at https://pypi.org/project/getan/") - parser.add_argument('-d', '--database', dest='database',metavar="DATABASE", - help='metavar="DATABASE') + parser.add_argument('-d', '--database', dest='database',metavar="DATABASE_FILE", + help='databasefile (default: ~/.getan/%(default)s)]', + default=DEFAULT_DATABASE) parser.add_argument('-t', '--template', dest='template', - metavar='TEMPLATE', help='name of getan template') + metavar='TEMPLATE', + help="""name of getan template (wochenbericht, + zeiterfassung, zeiterfassung2), + external templates must be stored in + ~/.getan/templates/ to be able to call them.""") parser.add_argument('-u', '--user', dest='user', help='name of user') parser.add_argument('-p', '--project', dest='project', help='key of output project')