mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Refactored call to filter_books into Epub class
This commit is contained in:
15
main.py
15
main.py
@@ -3,7 +3,7 @@
|
||||
import sys
|
||||
from PIL import Image
|
||||
sys.path.insert(1, 'lib/')
|
||||
from pyShelf import InitFiles
|
||||
from pyShelf import InitFiles, Epub
|
||||
from config import Config
|
||||
from library import Catalogue
|
||||
# Get configuration settings
|
||||
@@ -14,15 +14,4 @@ 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])
|
||||
# TODO Insert extracted data to database
|
||||
if extracted[2] != False:
|
||||
# Only display if a image is present
|
||||
cover_image = Image.open(extracted[2])
|
||||
cover_image.show()
|
||||
# TODO Insert book in database
|
||||
print(extracted)
|
||||
Epub().import_books()
|
||||
Reference in New Issue
Block a user