Python utility to convert markdown and html to image
Project description
markdown2image.py
Python utility to convert markdown and html to image using markdown and playwright.
Installing
pip install markdown2image
playwright install chromium
Usage
Just
from markdown2image import sync_api as md2img
md2img.html2image(html_code, save_path)
md2img.html2image(html_code, save_path, width=1080)
md2img.markdown2image(markdown_code, save_path)
md2img.markdown2image(markdown_code, save_path, width=1080)
Or in a running event loop,
from markdown2image import async_api as md2img
async def func():
await md2img.html2image(html_code, save_path)
await md2img.html2image(html_code, save_path, width=1080)
await md2img.markdown2image(markdown_code, save_path)
await md2img.markdown2image(markdown_code, save_path, width=1080)
See main.py for example code
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
markdown2image-0.0.7.tar.gz
(10.1 kB
view details)
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 markdown2image-0.0.7.tar.gz.
File metadata
- Download URL: markdown2image-0.0.7.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d263f04c673159b98695867880f90e6d60d3c5f370744448bf38fef6f07520df
|
|
| MD5 |
9259bf7353e4109f5c31932ad11dc5d1
|
|
| BLAKE2b-256 |
bcb5cfda3500466b428ce08da92e1db10bd508e774a2a1455c7c023662308102
|
File details
Details for the file markdown2image-0.0.7-py3-none-any.whl.
File metadata
- Download URL: markdown2image-0.0.7-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c6f8761a8cc1ec7900b70dbe4218b21ba6bcce684fb19a785b6826231ffcc5c
|
|
| MD5 |
5edeb02100b8a9b86da005b46581d331
|
|
| BLAKE2b-256 |
4fd22a8ebbc0243a20ddce91588b455d38408bf831cd9008541dbddc8cd1a3f7
|