mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Stub out a CLI search interface, which can also work with JSON and strings
This commit is contained in:
parent
2dcc3c1aab
commit
59d8a790d1
4 changed files with 91 additions and 0 deletions
pokedex
|
@ -5,6 +5,7 @@ import argparse
|
|||
import os
|
||||
import sys
|
||||
|
||||
import pokedex.cli.search
|
||||
import pokedex.db
|
||||
import pokedex.db.load
|
||||
import pokedex.db.tables
|
||||
|
@ -63,6 +64,9 @@ def create_parser():
|
|||
cmd_lookup.set_defaults(func=command_lookup)
|
||||
cmd_lookup.add_argument('criteria', nargs='+')
|
||||
|
||||
cmd_search = cmds.add_parser('search', help=u'Find things by various criteria')
|
||||
pokedex.cli.search.configure_parser(cmd_search)
|
||||
|
||||
cmd_load = cmds.add_parser('load', help=u'Load Pokédex data into a database from CSV files')
|
||||
cmd_load.set_defaults(func=command_load, verbose=True)
|
||||
# TODO get the actual default here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue