Skip to main content

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.
  • Convert mermaid chart to image. (dependency npm install -g @mermaid-js/mermaid-cli)

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
    # for md-table2img
    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:

![first-version](https://www.python.org/static/img/python-logo.png)

demo_output.md

![first-version](https://pic-1251484506.cos.ap-guangzhou.myqcloud.com/imgs/python-logo_ae79195a.png)

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.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

mdproc-0.3.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file mdproc-0.3.0.tar.gz.

File metadata

  • Download URL: mdproc-0.3.0.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

Hashes for mdproc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 44a9bd718b2aa7aa76a5112fb9161269fa3252972652029029559bb3e1f52cbb
MD5 5f855da3f84baa65d16445ccb05bd19c
BLAKE2b-256 08f4b45b65761d6ad728152b10fe42b3a032459cf5a0f1e65186fb14dafe2db0

See more details on using hashes here.

File details

Details for the file mdproc-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mdproc-0.3.0-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

Hashes for mdproc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e46776bc8de9985b5c6e84243d7da21a17e15b58a7535170c6d2c56317fdc902
MD5 5694c3454cace708ede95c8f9ae27f00
BLAKE2b-256 899c6d6466f17de0e79fc8fe1ee7fce2ff8e0a6711340b190cdd32dae9bd0cd7

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