mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Update main.py
Made descriptions and titles lowercase to match argparse's default descriptions and titles. Metavar changed also.
This commit is contained in:
parent
57915f656b
commit
8faeb52e8e
1 changed files with 6 additions and 6 deletions
|
@ -62,25 +62,25 @@ def create_parser():
|
||||||
parents=[common_parser],
|
parents=[common_parser],
|
||||||
)
|
)
|
||||||
|
|
||||||
cmds = parser.add_subparsers(title='Commands')
|
cmds = parser.add_subparsers(title='commands', metavar='<command>', help='commands')
|
||||||
cmd_help = cmds.add_parser(
|
cmd_help = cmds.add_parser(
|
||||||
'help', help=u'Display this message',
|
'help', help=u'display this message',
|
||||||
parents=[common_parser])
|
parents=[common_parser])
|
||||||
cmd_help.set_defaults(func=command_help)
|
cmd_help.set_defaults(func=command_help)
|
||||||
|
|
||||||
cmd_lookup = cmds.add_parser(
|
cmd_lookup = cmds.add_parser(
|
||||||
'lookup', help=u'Look up something in the Pokédex',
|
'lookup', help=u'look up something in the Pokédex',
|
||||||
parents=[common_parser])
|
parents=[common_parser])
|
||||||
cmd_lookup.set_defaults(func=command_lookup)
|
cmd_lookup.set_defaults(func=command_lookup)
|
||||||
cmd_lookup.add_argument('criteria', nargs='+')
|
cmd_lookup.add_argument('criteria', nargs='+')
|
||||||
|
|
||||||
cmd_search = cmds.add_parser(
|
cmd_search = cmds.add_parser(
|
||||||
'search', help=u'Find things by various criteria',
|
'search', help=u'find things by various criteria',
|
||||||
parents=[common_parser])
|
parents=[common_parser])
|
||||||
pokedex.cli.search.configure_parser(cmd_search)
|
pokedex.cli.search.configure_parser(cmd_search)
|
||||||
|
|
||||||
cmd_load = cmds.add_parser(
|
cmd_load = cmds.add_parser(
|
||||||
'load', help=u'Load Pokédex data into a database from CSV files',
|
'load', help=u'load Pokédex data into a database from CSV files',
|
||||||
parents=[common_parser])
|
parents=[common_parser])
|
||||||
cmd_load.set_defaults(func=command_load, verbose=True)
|
cmd_load.set_defaults(func=command_load, verbose=True)
|
||||||
# TODO get the actual default here
|
# TODO get the actual default here
|
||||||
|
@ -105,7 +105,7 @@ def create_parser():
|
||||||
help="list of database tables to load (default: all)")
|
help="list of database tables to load (default: all)")
|
||||||
|
|
||||||
cmd_dump = cmds.add_parser(
|
cmd_dump = cmds.add_parser(
|
||||||
'dump', help=u'Dump Pokédex data from a database into CSV files',
|
'dump', help=u'dump Pokédex data from a database into CSV files',
|
||||||
parents=[common_parser])
|
parents=[common_parser])
|
||||||
cmd_dump.set_defaults(func=command_dump, verbose=True)
|
cmd_dump.set_defaults(func=command_dump, verbose=True)
|
||||||
cmd_dump.add_argument(
|
cmd_dump.add_argument(
|
||||||
|
|
Loading…
Reference in a new issue