|
| | __init__ (self) |
| | filter_books (self) |
| | scan_folder (self, _path=None) |
| | process_by_filetype (self, book) |
| | extract_metadata_epub (self, book) |
| | extract_metadata_pdf (self, book) |
| | extract_metadata_mobi (self, book) |
| | extract_content (self, book_zip, book) |
| | extract_cover_html (self, book_zip, book) |
| | extract_cover_image (self, book_zip, book) |
| | compare_shelf_current (self) |
| | import_books (self, list=None, **kwargs) |
◆ __init__()
| src.backend.tests.library_test.Test_Catalogue.__init__ |
( |
| self | ) |
|
◆ compare_shelf_current()
| 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()
| 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()
| 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()
| 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()
| src.backend.lib.library.Catalogue.extract_metadata_epub |
( |
| self, |
|
|
| book ) |
|
inherited |
Extract metadata from epub file
:param book: Dictionary of epub file contents
:returns: Dictionary of book metadata
◆ extract_metadata_mobi()
| src.backend.lib.library.Catalogue.extract_metadata_mobi |
( |
| self, |
|
|
| book ) |
|
inherited |
◆ extract_metadata_pdf()
| src.backend.lib.library.Catalogue.extract_metadata_pdf |
( |
| self, |
|
|
| book ) |
|
inherited |
Return extracted metadata
:NOTES: Retrieval of data has been problematic, some pdf's providing
reliable titles that corespond with the actual, and others being
nonsense.
◆ filter_books()
| src.backend.tests.library_test.Test_Catalogue.filter_books |
( |
| self | ) |
|
Calls scan_folder and filters out book files.
:returns self._book_list_expanded: json string containing
all book metadata
Reimplemented from src.backend.lib.library.Catalogue.
◆ import_books()
| src.backend.lib.library.Catalogue.import_books |
( |
| self, |
|
|
| list = None, |
|
|
** | kwargs ) |
|
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.
Reimplemented in src.backend.lib.overide.ACatalogue.
◆ process_by_filetype()
| src.backend.lib.library.Catalogue.process_by_filetype |
( |
| self, |
|
|
| book ) |
|
inherited |
Determine books filetype and process.
◆ process_epub()
| src.backend.lib.library.Catalogue.process_epub |
( |
| book | ) |
|
|
staticinherited |
Return dictionary of epub file contents
◆ scan_folder()
| src.backend.lib.library.Catalogue.scan_folder |
( |
| self, |
|
|
| _path = None ) |
|
inherited |
◆ stripTags()
| src.backend.lib.library.Catalogue.stripTags |
( |
| source | ) |
|
|
staticinherited |
◆ book_folder
| src.backend.lib.library.Catalogue.book_folder = config.book_path |
|
inherited |
◆ book_shelf
| str src.backend.tests.library_test.Test_Catalogue.book_shelf = "app/" + self.book_shelf |
◆ books
| src.backend.lib.library.Catalogue.books = None |
|
inherited |
◆ config
| src.backend.lib.library.Catalogue.config = config |
|
inherited |
◆ cover_regx
| src.backend.lib.library.Catalogue.cover_regx = re.compile(r"\.jpg|\.jpeg|\.png|\.bmp|\.gif") |
|
inherited |
◆ db_pointer
| src.backend.lib.library.Catalogue.db_pointer = config.catalogue_db |
|
inherited |
◆ file_list
| list src.backend.lib.library.Catalogue.file_list = [] |
|
inherited |
◆ html_regx
| src.backend.lib.library.Catalogue.html_regx = re.compile(r"\.html") |
|
inherited |
◆ opf_regx
| src.backend.lib.library.Catalogue.opf_regx = re.compile(r"\.opf") |
|
inherited |
◆ root_dir
| src.backend.lib.library.Catalogue.root_dir = config.root |
|
inherited |
◆ title_sanitization_dirs_regx
| src.backend.lib.library.Catalogue.title_sanitization_dirs_regx = re.compile(r"/") |
|
inherited |
◆ title_sanitization_lvl2_regx
| src.backend.lib.library.Catalogue.title_sanitization_lvl2_regx |
|
inherited |
Initial value:= re.compile(
r"^(Book )+[0-9]*\W+(-)")
◆ title_sanitization_regx
| src.backend.lib.library.Catalogue.title_sanitization_regx = re.compile(r"^(Book )+[0-9]*") |
|
inherited |
The documentation for this class was generated from the following file: