快速开始
安装
1. 安装依赖
uv sync
2. 安装浏览器
uv run playwright install chromium
也可以安装 Firefox 或 WebKit:
uv run playwright install firefox
uv run playwright install webkit
3. 开始转换
uv run html2png convert input.html -o output.png
你的第一次转换
CLI 用法
# 转换单个文件
html2png convert page.html -o output.png
# 转换 URL
html2png convert https://example.com -o screenshot.png
# 使用管道输入
cat page.html | html2png convert - -o output.png