Skip to main content

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.markdown2image(markdown_code, save_path)

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.markdown2image(markdown_code, save_path)

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.3.tar.gz (9.9 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.3-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: markdown2image-0.0.3.tar.gz
  • Upload date:
  • Size: 9.9 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.3.tar.gz
Algorithm Hash digest
SHA256 bed9e1529b957257f2667baeeaa0af10bb52cfdd1c8f5e796ab60def0e853edd
MD5 8dfc1e0ebe4a5ade0209351f0022c10e
BLAKE2b-256 76bba7f3bd81bdbc481f1b98c213002bc9e687363c27b6d31fbc07b10967452e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: markdown2image-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for markdown2image-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 190e5becd9dcdd17732a0ece862efd75fffbeb04087923cef22108bb9297a7ec
MD5 6b29c04f1176c4235e0477eb8cf3acbe
BLAKE2b-256 abfd9fd835a0bc7b4b352a81eb258d187f2485f4228f923218e83feb4a3dfeea

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