Mercurial > getan > getan
comparison getan/main.py @ 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 | f8b05636cd43 |
children | 5d4006e3210c |
comparison
equal
deleted
inserted
replaced
525:bad607aec1af | 526:31282f97b807 |
---|---|
45 This is Free Software licensed under the terms of GNU GPL v>=3. | 45 This is Free Software licensed under the terms of GNU GPL v>=3. |
46 For details see LICENSE coming with the source of \'getan\'. | 46 For details see LICENSE coming with the source of \'getan\'. |
47 ''' % getan.__version__ | 47 ''' % getan.__version__ |
48 | 48 |
49 parser = argparse.ArgumentParser(prog='getan', usage=usage, | 49 parser = argparse.ArgumentParser(prog='getan', usage=usage, |
50 formatter_class=argparse.RawTextHelpFormatter) | 50 description="You can find more information at https://pypi.org/project/getan/", |
51 formatter_class=argparse.RawTextHelpFormatter) | |
51 parser.add_argument('--version', action='version', | 52 parser.add_argument('--version', action='version', |
52 version=textwrap.dedent(version)) | 53 version=textwrap.dedent(version)) |
53 parser.add_argument(dest='filename', nargs='?', | 54 parser.add_argument(dest='filename', nargs='?', |
54 help='[databasefile (default: %(default)s)]', | 55 help='[databasefile (default: ~/.getan/%(default)s)]', |
55 default=DEFAULT_DATABASE) | 56 default=DEFAULT_DATABASE) |
56 parser.add_argument('--init-only', action='store_true', dest='initonly', | 57 parser.add_argument('--init-only', action='store_true', dest='initonly', |
57 help='create databasefile if necessary and exit') | 58 help='create databasefile if necessary and exit') |
58 parser.add_argument('-d', '--debug', action='store_const', dest='loglevel', | 59 parser.add_argument('-d', '--debug', action='store_const', dest='loglevel', |
59 default=logging.NOTSET, const=logging.DEBUG, | 60 default=logging.NOTSET, const=logging.DEBUG, |