GenEpub,用于生成 EPUB 的小工具
Project description
gen-epub
用于生成 EPUB 的小工具。
安装
通过 pypi(推荐):
pip install GenEpub
从源码安装:
pip install git+https://github.com/apachecn/gen-epub
导入
from GenEpub import gen_epub
函数参考
gen_epub(articles, imgs, name, path)
-
articles: [{title: String, content: String}]
文章列表,每个文章以对象表示,
title
属性为标题(纯文本),content
属性为正文(HTML)。在正文中引用图片时,将
<img>
的src
属性设为../Images/{文件名}
。 -
imgs: Map{String: Buffer}
图片字典,键为文件名,值为图片二进制数据。
-
name: String
在书籍元信息中显示的书名,默认为
articles[0].title
。 -
path: String
保存文件的路径名,默认为当前工作目录下的
name + '.epub'
。
协议
本项目基于 SATA 协议发布。
您有义务为此开源项目点赞,并考虑额外给予作者适当的奖励。
赞助我们
另见
Project details
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
GenEpub-2023.2.23.3.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for GenEpub-2023.2.23.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46e4832ed5371414825f03426e4d4a6f52637fd24f587d8cc03ba5b86a831042 |
|
MD5 | 610ed1ee10418f45f6a6f3031968986c |
|
BLAKE2b-256 | 3796140d17152d6f27438a287c36d4d514a8aa56ccb5d240caddc10c9248b947 |