Added 'register books' and made a list of book categories

This commit is contained in:
2011-10-09 16:13:20 +00:00
parent 5abde71f2e
commit 09e2bc414d
3 changed files with 43 additions and 4 deletions

View File

@@ -365,11 +365,19 @@ def map_cmd(connection, shelfname=None, category=None):
pass
def suggest_book_data(connection, tmp_file=False):
google_suggest_book_data(connection, tmp_file)
return google_suggest_book_data(connection, tmp_file)
<<<<<<< .mine
def register_books(connection):
filename = suggest_book_data(connection, tmp_file=True)
run_editor(filename)
commit(connection, filename)
=======
def give_bananas():
print "Om nom nom... Thanks!"
>>>>>>> .r164
commands = { 'show':
{ 'args': [('ids', (1,None))],
'options': ['commit_format', 'tmp_file'],
@@ -410,11 +418,16 @@ commands = { 'show':
'options': ['tmp_file'],
'fun': suggest_book_data,
'use_db': True },
'register-books':
{ 'args': [],
'options': [],
'fun': register_books,
'use_db': True },
'give-bananas':
{ 'args': [],
'options': [],
'fun': give_bananas,
'use_db': False },
'use_db': False }
}
flags = { 'commit_format':