mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added support for type: prefix and forme lookup. #15
This commit is contained in:
parent
238022485a
commit
909e61cc97
2 changed files with 70 additions and 12 deletions
pokedex
|
@ -67,7 +67,12 @@ def command_lookup(name):
|
|||
print "Fuzzy-matched:"
|
||||
|
||||
for result in results:
|
||||
print "%s: %s" % (result.object.__tablename__, result.object.name),
|
||||
if hasattr(result.object, 'full_name'):
|
||||
name = result.object.full_name
|
||||
else:
|
||||
name = result.object.name
|
||||
|
||||
print "%s: %s" % (result.object.__tablename__, name),
|
||||
if result.language:
|
||||
print "(%s in %s)" % (result.name, result.language)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue