mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Added todos
This commit is contained in:
@@ -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")
|
||||
|
||||
3
main.py
3
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)
|
||||
Reference in New Issue
Block a user