|
|
def | __init__ (self) |
| |
| def | filter_books (self) |
| |
| def | scan_folder (self, _path=None) |
| |
|
def | process_by_filetype (self, book) |
| |
| def | extract_metadata_epub (self, book) |
| |
|
def | extract_metadata_mobi (self, book) |
| |
| def | extract_content (self, book_zip, book) |
| |
| def | extract_cover_html (self, book_zip, book) |
| |
| def | extract_cover_image (self, book_zip, book) |
| |
| def | compare_shelf_current (self) |
| |
| def | import_books (self, list=None) |
| |
|
|
| book_shelf |
| |
|
| file_list |
| |
|
| opf_regx |
| |
|
| cover_regx |
| |
|
| html_regx |
| |
|
| title_sanitization_regx |
| |
|
| title_sanitization_lvl2_regx |
| |
|
| title_sanitization_dirs_regx |
| |
|
| root_dir |
| |
|
| book_folder |
| |
|
| books |
| |
|
| db_pointer |
| |
|
| config |
| |
◆ compare_shelf_current()
| def src.backend.lib.library.Catalogue.compare_shelf_current |
( |
|
self | ) |
|
|
inherited |
Calls storage system, gets list of books stored and compares against files on disk
◆ extract_content()
| def src.backend.lib.library.Catalogue.extract_content |
( |
|
self, |
|
|
|
book_zip, |
|
|
|
book |
|
) |
| |
|
inherited |
Opens epub as zip file filters then stores as list any files matching opf_regx
◆ extract_cover_html()
| def src.backend.lib.library.Catalogue.extract_cover_html |
( |
|
self, |
|
|
|
book_zip, |
|
|
|
book |
|
) |
| |
|
inherited |
Opens epub as zip file filters then stores as list any files matching html_regx
◆ extract_cover_image()
| def src.backend.lib.library.Catalogue.extract_cover_image |
( |
|
self, |
|
|
|
book_zip, |
|
|
|
book |
|
) |
| |
|
inherited |
Opens epub as zip file filters then stores as list any files matching cover_regx
◆ extract_metadata_epub()
| def src.backend.lib.library.Catalogue.extract_metadata_epub |
( |
|
self, |
|
|
|
book |
|
) |
| |
|
inherited |
Return extracted metadata and cover picture
book['path'] == Full path to ebook file
book['files'] == list of files from self.process_book(book)
◆ filter_books()
| def src.backend.tests.library_test.Test_Catalogue.filter_books |
( |
|
self | ) |
|
Calls scan_folder and filters out book files
Proceeds to call process_book
:returns self._book_list_expanded: json string containing all book metadata
Reimplemented from src.backend.lib.library.Catalogue.
◆ import_books()
| def src.backend.lib.library.Catalogue.import_books |
( |
|
self, |
|
|
|
list = None |
|
) |
| |
|
inherited |
Main entry point for import operations.
Gets a list of new files via compare_shelf_current.
Iterates over list and inserts new books into database.
◆ process_epub()
| def src.backend.lib.library.Catalogue.process_epub |
( |
|
book | ) |
|
|
staticinherited |
Return dictionary of epub file contents
◆ scan_folder()
| def src.backend.lib.library.Catalogue.scan_folder |
( |
|
self, |
|
|
|
_path = None |
|
) |
| |
|
inherited |
Scan folder by _path, allows recurisive scanning
The documentation for this class was generated from the following file: