Skip to main content

Python utility to convert markdown and html to image

Project description

markdown2image.py

Hippocratic License HL3-FULL

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


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

Uploaded Source

Built Distribution

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

markdown2image-0.0.8.5-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file markdown2image-0.0.8.5.tar.gz.

File metadata

  • Download URL: markdown2image-0.0.8.5.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for markdown2image-0.0.8.5.tar.gz
Algorithm Hash digest
SHA256 43ec9aa657b1f15fd9a6394d47d1f9e27887080fe5eddbc36d19967b6b93a8f8
MD5 3067c366ab2b4f288d154f114c35d5f4
BLAKE2b-256 3d6a95767c12d5e57867939e56aa599c044d57f949e4cd91956dea92d5792ded

See more details on using hashes here.

File details

Details for the file markdown2image-0.0.8.5-py3-none-any.whl.

File metadata

File hashes

Hashes for markdown2image-0.0.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 87d0602aca2fcca205b3a3848b4f3ac12fed8130a8f4d5076131798230fad052
MD5 24f4225bd9e52792de5f944144140938
BLAKE2b-256 229ed0d18a69776eda8464767b4875193a59f2f78748e152c80fa00329e32083

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