基于 Pillow 的可自定义 Markdown 风格渲染器,渲染速度快且易于配置
Project description
CustomMarkdownImage
开始使用
使用pip install pillowmd
如何使用
先使用style = pillowmd.LoadMarkdownStyles(style路径),然后使用style.Render(markdown内容)即可快速渲染。若没有style,则可以pillowmd.MdToImage(内容)使用默认风格渲染
注:MdToImage是异步函数,若想使用默认风格进行同步渲染,请使用:
import pillowmd
style = pillowmd.MdStyle()
style.Render("# Is Markdown")
自定义style
见docs目录下的how_to……,里面有进一步指南,也可以进入Q群498427849
使用例
见tests目录
图片预览
元素预览
分页+侧边图渲染
新版本LaTeX支持
Style下载
其他
欢迎各位分享你自己的style风格,联系QQ614675349,或者直接在GitHub上提交PR
更新日志
0.6.0
新增latex支持,详见pillowlatex
0.5.3
修复了表格渲染会错误的在前后加上行间距的问题 增加了表格的debug显示
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pillowmd-0.6.0.tar.gz.
File metadata
- Download URL: pillowmd-0.6.0.tar.gz
- Upload date:
- Size: 20.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38d7a3feaab587f4eb41314becfd46692fa07035ac059e5c6250b079e521aecb
|
|
| MD5 |
99423095e10c82a3a783f455bc109f0b
|
|
| BLAKE2b-256 |
704510cc0832385dddcd90014211c14e7fa6e56948d4512ea27e7dc408993d29
|
File details
Details for the file pillowmd-0.6.0-py3-none-any.whl.
File metadata
- Download URL: pillowmd-0.6.0-py3-none-any.whl
- Upload date:
- Size: 20.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f115d3340c6fffda7048eee74c995a55846097a08cc93d187d99c12011dce2f9
|
|
| MD5 |
e65cba1f53960bb8be59b29989bfa1cf
|
|
| BLAKE2b-256 |
f3060a3824d628e3ef9f0a9ff5a0a792f7ba1c69763e1d2fae0f0972bc4a9dff
|