xml2epub 1.0
pip install xml2epub==1.0
Newer version available (2.6.8)
Released:
将 html链接, html文件 或 html文本 转换成 epub文件,并自动添加封面.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: dfface
Classifiers
- License
- Operating System
- Programming Language
Project description
html2epub
修改介绍
原项目已经较为成熟 Html2Epub ,此次更改是为了满足自身需求,主要是取消 html string 的清洗:
- html string 通过
create_chapter_from_string
的参数strict
控制,False
表示不清洗 - xml string中如果包含
<title>封面</title>
或者<title>cover</title>
,则应该自动生成 epub 文件的封面 - 关于替换静态资源,做的改进是图片的名称由
uuid
改为md5(url)
简介
原项目为python2项目 pypub , 此为python3项目, 并进行了些许修改.
将 html链接, html文件 或 html文本 转换成 epub文件.
tips
关于epub文件的格式可以参考 EPUB - Wikipedia.
快速使用
import html2epub
epub = xml2epub.Epub('My First Epub')
chapter = xml2epub.create_chapter_from_url('https://en.wikipedia.org/wiki/EPUB')
epub.add_chapter(chapter)
epub.create_epub('OUTPUT_DIRECTORY')
参考文献
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: dfface
Classifiers
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xml2epub-1.0.tar.gz
.
File metadata
- Download URL: xml2epub-1.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
5922375d9f6c85693994c17901b1b2ec0da88ff598168bcff9b3f0039a2e8685
|
|
MD5 |
dec7212114786dbe95a9c7bee988b5bf
|
|
BLAKE2b-256 |
93f812a58935b35e4c835c8f04dc161c399a94ca7500372a7502406df0074588
|
File details
Details for the file xml2epub-1.0-py3-none-any.whl
.
File metadata
- Download URL: xml2epub-1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
877d972e8c1ec265a96f3a24c11234a9abeb34037b038d33bfac04f46b815864
|
|
MD5 |
a53afe924f16226b28a4959cf818921e
|
|
BLAKE2b-256 |
e11dce47e5a48e53e5230c69a99460a191da17858a93c0ed85cf0711314e5cbc
|