fixed some bugs

This commit is contained in:
John Ladan 2013-10-11 20:15:10 -04:00
parent 6cfa9dd624
commit 69ade368bc
3 changed files with 11 additions and 4 deletions

5
TODO
View File

@ -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 Support UTF-8 for everything
Search ignores Case Search ignores Case
Regex Search Regex Search
Choose shown columns in browser Choose shown columns in browser
Support for multiple copies Support for multiple copies
Trash by marking as deleted
Text entry supports longer string Text entry supports longer string
_Implemented Features_ _Implemented Features_
Sort by column in browser Sort by column in browser
_Bugs_
Error when entering bad ISBN e.g. 02010798X (instead of 020107981X)

View File

@ -103,10 +103,11 @@ def openLibrary_lccn(LCCN):
book['publish location'] = book['publish location'][2:] 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 # 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: if "publish_date" in openBook:
book['publish date']=openBook['publish_date'] book['publish date']=openBook['publish_date']
#code to pull out year and month (hopefully) #code to pull out year and month (hopefully)

View File

@ -220,12 +220,15 @@ class bookForm(formWindow):
if book != {}: if book != {}:
self.updateEntries(book) self.updateEntries(book)
self.refresh() self.refresh()
self.mvHighlight(+7)
if self.hl==1: # lookup by lccn if self.hl==1: # lookup by lccn
book = self.lookup_lccn(self.entries[1]) book = self.lookup_lccn(self.entries[1])
if book != {}: if book != {}:
self.updateEntries(book) self.updateEntries(book)
self.refresh() self.refresh()
formWindow.handleInput(self,ch) self.mvHighlight(+6)
else:
formWindow.handleInput(self,ch)
class categoryForm(formWindow): class categoryForm(formWindow):
caption = "Add a Category" caption = "Add a Category"