通过浏览器渲染图片
Project description
nonebot-plugin-htmlrender
- 通过浏览器渲染图片
- 可通过查看
example参考使用实例
✨ 功能
- 通过html和浏览器生成图片
- 支持
纯文本markdown和jinja2模板输入 - 通过 CSS 来控制样式
使用
参考example/plugins/render/init.py
markdown 转 图片
- 使用
GitHub-light样式 - 支持绝大部分 md 语法
- 代码高亮
- latex 数学公式 (感谢@MeetWq)
- 使用
$$...$$来输入独立公式 - 使用
$...$来输入行内公式
- 使用
- 图片需要使用外部连接并使用
html格式 否则文末会超出截图范围 - 图片可使用md语法 路径可为
绝对路径(建议), 或相对于template_path的路径
模板 转 图片
- 使用jinja2模板引擎
- 页面参数可自定义
🌰 栗子
文本转图片(同时文本里面可以包括html图片)
markdown转图片(同时文本里面可以包括html图片)
纯html转图片
jinja2模板转图片
特别感谢
- MeetWq 提供数学公式支持代码和代码高亮
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
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 nonebot-plugin-htmlrender-0.0.4.4.tar.gz.
File metadata
- Download URL: nonebot-plugin-htmlrender-0.0.4.4.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.10 Darwin/21.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da278a9a0dfb6b268083c3223e385d153d34c933cbf21e3c4948724d5c28d8ff
|
|
| MD5 |
e0ff48b5989e674f15d162fb36567f55
|
|
| BLAKE2b-256 |
bf0d93cb6f3c24055b9a91b513a14711a9bf709abe53849c5393cfb78ccd87cb
|
File details
Details for the file nonebot_plugin_htmlrender-0.0.4.4-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_htmlrender-0.0.4.4-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.10 Darwin/21.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3dbb2bb7afd529b3958aedefab42570a28e924ef7417f0e57c734037def37a4
|
|
| MD5 |
171c8eb3ce67b0e52c0220fbf36696ee
|
|
| BLAKE2b-256 |
368ccc2265758abcabc639ea36bfbcf5df27bdb688b3bad558685f7b6b7fbc42
|