diff --git a/cli/fileformat.py b/cli/fileformat.py index adfd0bb..1708de4 100644 --- a/cli/fileformat.py +++ b/cli/fileformat.py @@ -7,9 +7,9 @@ import types # strings), 'l' (list of strings). fields = { 'book': - [('isbn', 's'), ('title', 's'), ('category', 's'), + [('isbn', 's'), ('id', 's'), ('title', 's'), ('category', 's'), ('subtitle', 's'), ('persons', 'd'), ('publisher', 's'), - ('published_year', 'i'), ('edition', 'i'), ('num_pages', 'i'), + ('published_year', 'i'), ('edition', 'i'), ('pages', 'i'), ('series', 's'), ('description', 's'), # TODO picture, thumbnail ('references', 'd')], 'person': @@ -118,6 +118,12 @@ def read_action(text): 'd': read_field_value_dict, 'l': read_field_value_list }[ftype] result[field] = reader(d[field]) + else: + result[field] = None + + print 'final dict:' + print result + return result def read_actionlist(text):