Skip to main content

基于 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下载

github

其他

欢迎各位分享你自己的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

pillowmd-0.6.0.tar.gz (20.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pillowmd-0.6.0-py3-none-any.whl (20.2 MB view details)

Uploaded Python 3

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

Hashes for pillowmd-0.6.0.tar.gz
Algorithm Hash digest
SHA256 38d7a3feaab587f4eb41314becfd46692fa07035ac059e5c6250b079e521aecb
MD5 99423095e10c82a3a783f455bc109f0b
BLAKE2b-256 704510cc0832385dddcd90014211c14e7fa6e56948d4512ea27e7dc408993d29

See more details on using hashes here.

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

Hashes for pillowmd-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f115d3340c6fffda7048eee74c995a55846097a08cc93d187d99c12011dce2f9
MD5 e65cba1f53960bb8be59b29989bfa1cf
BLAKE2b-256 f3060a3824d628e3ef9f0a9ff5a0a792f7ba1c69763e1d2fae0f0972bc4a9dff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page