ebooklib
ebooklib copied to clipboard
Python E-book library for handling books in EPUB2/EPUB3 format -
On my Windows machine—I imagine the same wouldn't happen on Linux-likes, although I haven't tested to confirm—the EpubNav's file paths contain backslashes in place of any forward slashes that might...
Check for None rather than falsey-ness. The current problem is that ```python book = epub.read_epub('test.epub', options={'ignore_ncx': False}) ``` will raise a user warning because the current logic checks for Falsey-ness...
Functionally the title: ``` Traceback (most recent call last): File "/usr/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "/tmp/ipykernel_28378/2235628931.py", line 2, in extract_text book = ebooklib.epub.read_epub(epub_path) File "/usr/local/lib/python3.8/dist-packages/ebooklib/epub.py",...
How would you go about changing the heading of the nav page in a created book? By default it is the title of the book itslef.
Using lxml's .text_content() instead of text because some ToC nodes look like this: ``` I: Looking-Glass House ``` This PR fixes that issue by using lxml's nested text extractor instead...
I tried to add the content of an SVG file named GraphQL into a basic epub file based on a pattern. The epub file comes with this basic text pattern:...
I am currently working on a project that involves processing EPUB files and I am using the EbookLib library to do so. I am trying to extract the version number...
At line 1164 in file epub.py, if link inculdes separator as '/', code* `os.path.relpath(item.href, nav_dir_name)` of `a = etree.SubElement(li, 'a', {'href': os.path.relpath(item.href, nav_dir_name)})` returns link string with separator '\\' which...
Hi :smile:, this PR resolves #271 Usage of the changes: ```python epub.write_epub('test.epub', book, {"compresslevel": 9}) ``` Allowed values for compresslevel are 0 to 9 - see [ZipFile docs](https://docs.python.org/3/library/zipfile.html#zipfile-objects) The default...
Hi, I encountered a regression from 0.17.1 -> 0.18 in that the library crashes if it's fed a ZipExtFile object. The crash is here: https://github.com/aerkalov/ebooklib/blob/a55089afc40042e2dcaddd2fc7364192f0b3ca0a/ebooklib/epub.py#L1702 ``` File ".../venv/lib/python3.10/site-packages/ebooklib/epub.py", line 1700,...