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:
@@ -2,8 +2,10 @@
|
||||
import os
|
||||
import zipfile
|
||||
from config import Config
|
||||
from library import Catalogue
|
||||
from storage import Storage
|
||||
config = Config()
|
||||
|
||||
Storage = Storage()
|
||||
class InitFiles:
|
||||
"""First run file creation operations"""
|
||||
def __init__(self, file_array):
|
||||
@@ -25,9 +27,14 @@ class Epub:
|
||||
def __init__(self):
|
||||
global config
|
||||
self.book_path = config.book_path
|
||||
self.Catalogue = Catalogue()
|
||||
|
||||
def import_book(self):
|
||||
pass
|
||||
def import_books(self):
|
||||
book_list = self.Catalogue.filter_books()
|
||||
for book in book_list:
|
||||
extracted = self.Catalogue.extract_metadata(book_list[book])
|
||||
Storage.insert_book(extracted)
|
||||
Storage.commit()
|
||||
|
||||
def book_list(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user