Added todos

This commit is contained in:
Mike
2019-10-04 13:24:22 -04:00
parent b3e3ddc072
commit ef9d12f195
2 changed files with 5 additions and 0 deletions

View File

@@ -83,6 +83,8 @@ class Catalogue:
with book_zip as f:
content = book_zip.open(list(filter(opf_regx.search, book['files']))[0])
cover = book_zip.open(list(filter(cover_regx.search, book['files']))[0])
# TODO Handle books that have no Cover Image
## TODO Handle books with html covers
soup = BeautifulSoup(content, "xml")
title = soup.find("dc:title")
author = soup.find("dc:creator")

View File

@@ -14,9 +14,12 @@ InitFiles(config.file_array)
Catalogue = Catalogue()
# Filter Your books
# This only needs to be run on first run, & when new books are added
# TODO Refactor to its own function
book_list = Catalogue.filter_books()
for book in book_list:
extracted = Catalogue.extract_metadata(book_list[book])
cover_image = Image.open(extracted[2])
cover_image.show()
# TODO Insert book in database
print(extracted)