comparison 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
comparison
equal deleted inserted replaced
525:bad607aec1af 526:31282f97b807
12 12
13 from datetime import date, datetime, timedelta 13 from datetime import date, datetime, timedelta
14 import argparse 14 import argparse
15 15
16 from getan.template import render 16 from getan.template import render
17 from getan.backend import DEFAULT_DATABASE
17 18
18 19
19 def main(): 20 def main():
20 usage='getan-report [options]' 21 usage='getan-report [options]'
21 parser = argparse.ArgumentParser(prog='getan', usage=usage) 22 parser = argparse.ArgumentParser(prog='getan', usage=usage,
23 description="You can find more information at https://pypi.org/project/getan/")
22 24
23 parser.add_argument('-d', '--database', dest='database',metavar="DATABASE", 25 parser.add_argument('-d', '--database', dest='database',metavar="DATABASE_FILE",
24 help='metavar="DATABASE') 26 help='databasefile (default: ~/.getan/%(default)s)]',
27 default=DEFAULT_DATABASE)
25 parser.add_argument('-t', '--template', dest='template', 28 parser.add_argument('-t', '--template', dest='template',
26 metavar='TEMPLATE', help='name of getan template') 29 metavar='TEMPLATE',
30 help="""name of getan template (wochenbericht,
31 zeiterfassung, zeiterfassung2),
32 external templates must be stored in
33 ~/.getan/templates/ to be able to call them.""")
27 parser.add_argument('-u', '--user', dest='user', help='name of user') 34 parser.add_argument('-u', '--user', dest='user', help='name of user')
28 parser.add_argument('-p', '--project', dest='project', 35 parser.add_argument('-p', '--project', dest='project',
29 help='key of output project') 36 help='key of output project')
30 parser.add_argument('-w', '--week', type=int, dest='week', 37 parser.add_argument('-w', '--week', type=int, dest='week',
31 help='week of year') 38 help='week of year')
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)