A tool to process markdown files.
Project description
mdproc
A simple Python tool to process markdown files.
Features
- Markdown Image Uploader to COS.
- Convert Markdown tables to images and upload to COS. (dependency: playwright)
- Convert mermaid chart to image. (dependency: playwright)
Config
.env or configure environment variables:
COS_SECRET_ID=<xyz>
COS_SECRET_KEY=<xyz>
COS_REGION=<xyz>
COS_BUCKET=<xyz>
Usage
- Install dependencies:
pip install mdproc playwright install chromium
- Markdown images upload:
mdproc-imgupload your_markdown.md - Markdown table to image:
mdproc-table2img your_markdown.md
- Markdown mermaid to image:
mdproc-mermaid2img your_markdown.md
Demo
demo.md:

demo_output.md

mermaid2img Benchmark
Note: Browser is Chromium. mermaid-cli use puppeteer.
| mermaid2img | Cold Start /s | Warm Start /s |
|---|---|---|
| playwright (memaidjs cdn) | 2.5 | 1.5 |
| playwright (local mermaid bundle) | 2.5 | 1.5 |
| mermaid-cli | 5.7 | 3.7 |
License
Apache License
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
mdproc-0.3.1.tar.gz
(15.4 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
mdproc-0.3.1-py3-none-any.whl
(22.1 kB
view details)
File details
Details for the file mdproc-0.3.1.tar.gz.
File metadata
- Download URL: mdproc-0.3.1.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee880e0ddc1970ce6f6c571bea7c57ffc7de950f07496efab61ad2e1fb073207
|
|
| MD5 |
ef21e01373a1563bc0031b9af4ddfd1a
|
|
| BLAKE2b-256 |
0e202de9ee4edec719589f798b3e6e7acde5d2e66eac14ed08d9732c73c47111
|
File details
Details for the file mdproc-0.3.1-py3-none-any.whl.
File metadata
- Download URL: mdproc-0.3.1-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aa1d3d7cf4a0a7427f46e0398dcc43a2c4b9e4d5d1cc6e482ad92b52456fb02
|
|
| MD5 |
ed8a96b324aa21ef704db2632ead9d68
|
|
| BLAKE2b-256 |
935a5af839bdf95ea94b178f2fea4ef4879151a546bf1adb899190458fd5fade
|