fixed some bugs
authorJohn Ladan <jladan@uwaterloo.ca>
Sat, 12 Oct 2013 00:15:10 +0000 (20:15 -0400)
committerJohn Ladan <jladan@uwaterloo.ca>
Sat, 12 Oct 2013 00:15:10 +0000 (20:15 -0400)
TODO
bookData.py
form.py

diff --git a/TODO b/TODO
index acc5e60..befe8be 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,13 +1,16 @@
 _List of Desired Features_
 
 _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
 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
 
 Text entry supports longer string
 
 _Implemented Features_
 Sort by column in browser
 
+_Bugs_
+Error when entering bad ISBN e.g. 02010798X (instead of 020107981X)
index b9231ed..c286fb5 100644 (file)
@@ -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
         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']:
     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']:
     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)
     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 (file)
--- a/form.py
+++ b/form.py
@@ -220,12 +220,15 @@ class bookForm(formWindow):
                 if book != {}:
                     self.updateEntries(book)
                 self.refresh()
                 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()
             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"
 
 class categoryForm(formWindow):
     caption = "Add a Category"