Xml2epub

Latest version: v2.6.5

Safety actively analyzes 627580 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.6.5

fix: 35

The cause of the problem: the file name filters characters such as underscores.

Solution:
1. File names only filter non-printable characters.
2. The `create_epub` function adds the `absolute_location` parameter to support passing in absolute paths and file names, without any checksum filtering.
> absolute_location (Option[str]): The absolute path and file name of the file, excluding the file type suffix (do not contain .epub at the end). If not passed, the file location is `${current working path}/${output_directory}/${epub_name}.epub`. If this parameter is passed, the file will be saved at the absolute path specified by the parameter. Please make sure you have write permission to the location and the path is legal.

2.6.3

fix: 28

pillow 10.0 version error

* restricted the version of the pillow library to 9.5.
* do not support pillow 10.0 or Python 3.12.

2.6.2

bugfix.

Fix the bug that the p will be cleared when the path name starts with p.

2.6

Fix 7 : default `cover.jpg` is still added.

Optimize the default cover generation logic:
* When inferring a cover or custom cover, the default cover will no longer be generated.

2.5

Features:
* add local resources support: just set `local` parameter to `True`. See the [localfile2epub.py](https://github.com/dfface/xml2epub/tree/main/examples/localfile2epub) example for details.
* add local image cover support: for instance, just use `xml2epub.create_chapter_from_string("./local_file_example/03-06-OdnY0A.png", strict=False, local=True)`. See the [localfile2epub.py](https://github.com/dfface/xml2epub/tree/main/examples/localfile2epub) example for details.

Tips:
* If you want to add a cover image yourself, use the `create_chapter_from_string` method, then assign `html_string` to the image URL (e.g. `https://www.xxx.com/xxx.png`) and keep the `strict=False` parameter. Or assign `html_string` to the local image file path (e.g. `./xxx.png`) and keep the `local=True` and `strict=False` parameters.
* If the images and CSS files in your html are local resources, please set the `local` parameter to `True`, then the program will automatically copy the local resources instead of getting them from the Internet.

2.4

* add a rule for guessing cover image:
* if the first img element in the input string has a class 'fullscreen', then we think this img is the cover img.

Page 1 of 2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.