48 lines
1.2 KiB
Markdown
48 lines
1.2 KiB
Markdown
---
|
|
name: markdown-converter
|
|
description: A simple tool to convert Markdown to PNG images using markdown library + BeautifulSoup + Pillow.
|
|
metadata: {"clawdbot":{"emoji":"🖼️","os":["linux","darwin","win32"]}}
|
|
---
|
|
|
|
# Markdown to PNG Converter
|
|
|
|
A simple tool to convert Markdown documents to PNG images using markdown library, BeautifulSoup, and Pillow.
|
|
|
|
## Features
|
|
|
|
- **Full GFM support**: Tables, code blocks, task lists, and more via markdown library
|
|
- **BeautifulSoup parsing**: Robust HTML parsing
|
|
- **Pure Pillow rendering**: No browser required
|
|
- **CJK support**: Uses system fonts for Chinese character rendering
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
pip install Pillow markdown beautifulsoup4
|
|
```
|
|
|
|
## Dependencies
|
|
|
|
- **Pillow**: Image processing and drawing
|
|
- **markdown**: Python Markdown parser with GFM extensions
|
|
- **beautifulsoup4**: HTML parsing
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# Convert Markdown to PNG
|
|
python scripts/md_convert.py input.md output.png
|
|
```
|
|
|
|
## Supported Platforms
|
|
|
|
- **Windows**: Uses system CJK fonts
|
|
- **macOS**: Uses system CJK fonts
|
|
- **Linux**: Uses system CJK fonts
|
|
|
|
## Notes
|
|
|
|
- Uses markdown library for robust Markdown parsing
|
|
- BeautifulSoup handles complex HTML structures
|
|
- Chinese fonts are supported via system fonts
|