now possible to give the orangutang bananas
This commit is contained in:
parent
9746e7d1f2
commit
5abde71f2e
@ -367,6 +367,9 @@ def map_cmd(connection, shelfname=None, category=None):
|
||||
def suggest_book_data(connection, tmp_file=False):
|
||||
google_suggest_book_data(connection, tmp_file)
|
||||
|
||||
def give_bananas():
|
||||
print "Om nom nom... Thanks!"
|
||||
|
||||
commands = { 'show':
|
||||
{ 'args': [('ids', (1,None))],
|
||||
'options': ['commit_format', 'tmp_file'],
|
||||
@ -406,7 +409,12 @@ commands = { 'show':
|
||||
{ 'args': [],
|
||||
'options': ['tmp_file'],
|
||||
'fun': suggest_book_data,
|
||||
'use_db': True }
|
||||
'use_db': True },
|
||||
'give-bananas':
|
||||
{ 'args': [],
|
||||
'options': [],
|
||||
'fun': give_bananas,
|
||||
'use_db': False },
|
||||
}
|
||||
|
||||
flags = { 'commit_format':
|
||||
@ -436,6 +444,7 @@ def check_command_args(args, command):
|
||||
raise BadCommandLine('Too many arguments for command %s (expects at most %d, %d given).'
|
||||
% (command, max_num_args, len(args)))
|
||||
|
||||
|
||||
def check_command_opts(opts, command):
|
||||
cmd_decl = commands[command]
|
||||
for opt,val in opts:
|
||||
|
Reference in New Issue
Block a user