From ef9d12f195100d116661adf6139685de196d53b9 Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 4 Oct 2019 13:24:22 -0400 Subject: [PATCH] Added todos --- lib/library.py | 2 ++ main.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/library.py b/lib/library.py index 74fe277..0ab3588 100755 --- a/lib/library.py +++ b/lib/library.py @@ -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") diff --git a/main.py b/main.py index 2c41a9b..65fdd2d 100755 --- a/main.py +++ b/main.py @@ -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) \ No newline at end of file