mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Finished checking for new books
This commit is contained in:
1
lib/.#library.py
Symbolic link
1
lib/.#library.py
Symbolic link
@@ -0,0 +1 @@
|
||||
raelon@golumnsec.6371:1572529288
|
||||
@@ -7,9 +7,9 @@ import zipfile
|
||||
from bs4 import BeautifulSoup
|
||||
from PIL import Image
|
||||
|
||||
from api_hooks import DuckDuckGo
|
||||
from config import Config
|
||||
from storage import Storage
|
||||
from lib.api_hooks import DuckDuckGo
|
||||
from lib.storage import Storage
|
||||
|
||||
config = Config()
|
||||
|
||||
@@ -17,6 +17,7 @@ config = Config()
|
||||
class Catalogue:
|
||||
"""Decodes and stores book information"""
|
||||
"""Step One: filter_books"""
|
||||
|
||||
def __init__(self):
|
||||
self.file_list = []
|
||||
self.opf_regx = re.compile(r'\.opf')
|
||||
@@ -143,6 +144,8 @@ class Catalogue:
|
||||
extracted = self.extract_metadata(book)
|
||||
db.insert_book(extracted)
|
||||
inserted = db.commit()
|
||||
if inserted != True:
|
||||
if inserted is not True:
|
||||
print(inserted)
|
||||
db.close()
|
||||
if input('Continue ? y/n') == 'y':
|
||||
pass
|
||||
db.close()
|
||||
|
||||
Reference in New Issue
Block a user