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目录

图片预览

元素预览 元素预览

分页+侧边图渲染 额外效果

Style下载

github

其他

欢迎各位分享你自己的style风格,联系QQ614675349,或者直接在GitHub上提交PR

TODO

LaTex解析

更新日志

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.5.3.tar.gz (19.2 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.5.3-py3-none-any.whl (19.4 MB view details)

Uploaded Python 3

File details

Details for the file pillowmd-0.5.3.tar.gz.

File metadata

  • Download URL: pillowmd-0.5.3.tar.gz
  • Upload date:
  • Size: 19.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for pillowmd-0.5.3.tar.gz
Algorithm Hash digest
SHA256 c3ed1bce4da89de0c5dee4420afa45db3d8b2136ecd9650b71df9f233fa0035e
MD5 b5ce97988a1ab37665666cf052f2a8bc
BLAKE2b-256 66fe519e48118128a9eb120567f02307ff4f4a159d5445e1086b647c058752db

See more details on using hashes here.

File details

Details for the file pillowmd-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: pillowmd-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 19.4 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.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ac913b7d18f4ccd7f7497ff21ff7b391cec67ee6d1db4171fe05860f0c262c7
MD5 f8e2912c70faf746f4b75a95348d6137
BLAKE2b-256 fa997d94e6aa06c47a8b7278b8b31430db3637d818bc935d824710f3470ba6db

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