From 69ade368bc67c423fcb74891912341287e15abff Mon Sep 17 00:00:00 2001 From: John Ladan Date: Fri, 11 Oct 2013 20:15:10 -0400 Subject: [PATCH] fixed some bugs --- TODO | 5 ++++- bookData.py | 5 +++-- form.py | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index acc5e60..befe8be 100644 --- a/TODO +++ b/TODO @@ -1,13 +1,16 @@ _List of Desired Features_ +Categories work based on selection, not just highlight + - i.e. assign categories to multiple books at once Support UTF-8 for everything Search ignores Case Regex Search Choose shown columns in browser Support for multiple copies -Trash by marking as deleted Text entry supports longer string _Implemented Features_ Sort by column in browser +_Bugs_ +Error when entering bad ISBN e.g. 02010798X (instead of 020107981X) diff --git a/bookData.py b/bookData.py index b9231ed..c286fb5 100644 --- a/bookData.py +++ b/bookData.py @@ -103,10 +103,11 @@ def openLibrary_lccn(LCCN): book['publish location'] = book['publish location'][2:] # for isbn, there maybe be multiple values in the query. I'm just taking the first, but the full list may be useful + # There are also ISBN's that have non-number values :( if "isbn_10" in openBook['identifiers']: - book["isbn"]=int(openBook['identifiers']['isbn_10'][0]) + book["isbn"]=openBook['identifiers']['isbn_10'][0] if "isbn_13" in openBook['identifiers']: - book["isbn"]=int(openBook['identifiers']['isbn_13'][0]) + book["isbn"]=openBook['identifiers']['isbn_13'][0] if "publish_date" in openBook: book['publish date']=openBook['publish_date'] #code to pull out year and month (hopefully) diff --git a/form.py b/form.py index 59a8065..bf52641 100644 --- a/form.py +++ b/form.py @@ -220,12 +220,15 @@ class bookForm(formWindow): if book != {}: self.updateEntries(book) self.refresh() + self.mvHighlight(+7) if self.hl==1: # lookup by lccn book = self.lookup_lccn(self.entries[1]) if book != {}: self.updateEntries(book) self.refresh() - formWindow.handleInput(self,ch) + self.mvHighlight(+6) + else: + formWindow.handleInput(self,ch) class categoryForm(formWindow): caption = "Add a Category"