|
pyShelf Open Source Ebook Server
0.6.0
FOSS E-Book Server, https://pyshelf.com
|
Inheritance diagram for src.backend.lib.library.Catalogue:Public Member Functions | |
| def | __init__ (self, config) |
| def | scan_folder (self, _path=None) |
| def | filter_books (self) |
| 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) |
Static Public Member Functions | |
| def | process_epub (book) |
| def | stripTags (source) |
Public Attributes | |
| 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 | |
Decodes book metadata for storage
| def src.backend.lib.library.Catalogue.compare_shelf_current | ( | self | ) |
Calls storage system, gets list of books stored and compares against files on disk
| def src.backend.lib.library.Catalogue.extract_content | ( | self, | |
| book_zip, | |||
| book | |||
| ) |
Opens epub as zip file filters then stores as list any files matching opf_regx
| def src.backend.lib.library.Catalogue.extract_cover_html | ( | self, | |
| book_zip, | |||
| book | |||
| ) |
Opens epub as zip file filters then stores as list any files matching html_regx
| def src.backend.lib.library.Catalogue.extract_cover_image | ( | self, | |
| book_zip, | |||
| book | |||
| ) |
Opens epub as zip file filters then stores as list any files matching cover_regx
| def src.backend.lib.library.Catalogue.extract_metadata_epub | ( | self, | |
| book | |||
| ) |
Return extracted metadata and cover picture book['path'] == Full path to ebook file book['files'] == list of files from self.process_book(book)
| def src.backend.lib.library.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 in src.backend.tests.library_test.Test_Catalogue.
| def src.backend.lib.library.Catalogue.import_books | ( | self, | |
list = None |
|||
| ) |
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.
|
static |
Return dictionary of epub file contents
| def src.backend.lib.library.Catalogue.scan_folder | ( | self, | |
_path = None |
|||
| ) |
Scan folder by _path, allows recurisive scanning
1.8.18