WeChat Image Generator
Generate beautiful images for WeChat articles with zero token cost and auto-screenshot.
Quick Start
1. Cover Image (封面图)
CODEBLOCK0
2. Comparison Image (对比图)
CODEBLOCK1
3. Chart Image (数据图)
CODEBLOCK2
Workflow
- 1. Run generator script with parameters
- Script creates HTML with embedded data
- Opens in browser via OpenClaw browser tool
- Auto-screenshot and save to output folder
Design Philosophy
Zero token cost: All templates are pre-built HTML/CSS
Auto-screenshot: Integrated with OpenClaw browser tool
Customizable: Easy to modify templates for different styles
Token Cost Analysis
Per image generation:
- - Read SKILL.md: ~500 tokens (first time only)
- Execute script: ~100 tokens
- Browser screenshot: ~50 tokens
Total: ~650 tokens vs DALL-E/Midjourney ~1000-5000 tokens per image.
Requirements
- - Python 3
- OpenClaw browser tool (for auto-screenshot)
微信图片生成器
零Token成本生成微信文章精美图片,支持自动截图。
快速开始
1. 封面图
bash
python3 scripts/generate.py cover \
--title 我的第一个开源项目 \
--subtitle Token 成本降低 90% \
--output output/cover.png
2. 对比图
bash
python3 scripts/generate.py compare \
--left # Markdown\n
加粗文本 \
--right HTML 渲染结果 \
--label 1 秒转换 \
--output output/compare.png
3. 数据图
bash
python3 scripts/generate.py chart \
--data Token消耗:8000,650|生成耗时:20,1 \
--labels AI生成,预制模板 \
--output output/chart.png
工作流程
- 1. 运行带参数的生成脚本
- 脚本创建内嵌数据的HTML
- 通过OpenClaw浏览器工具在浏览器中打开
- 自动截图并保存至输出文件夹
设计理念
零Token成本:所有模板均为预构建的HTML/CSS
自动截图:与OpenClaw浏览器工具集成
可定制化:轻松修改模板以适应不同风格
Token成本分析
每张图片生成:
- - 读取SKILL.md:约500个Token(仅首次)
- 执行脚本:约100个Token
- 浏览器截图:约50个Token
总计:约650个Token,而DALL-E/Midjourney每张图片需1000-5000个Token。
环境要求
- - Python 3
- OpenClaw浏览器工具(用于自动截图)