Digital Product Builder
Build and ship digital products for Gumroad, itch.io, and DriveThruRPG without spending money on image generators or expensive AI models.
Stack: Python Pillow for images ($0) + Groq for copy (~$0.01/product) + Claude main session for orchestration only.
Quick Start
CODEBLOCK0
Image Generation — Pillow
Never use the browser tool for image generation. Pillow is faster, crash-free, and requires no login or external service.
Find available fonts (run this first)
CODEBLOCK1
Common font paths (Ubuntu/Debian)
CODEBLOCK2
Common font paths (macOS)
CODEBLOCK3
Safe fallback (always works, no font file needed)
CODEBLOCK4
Platform cover sizes
| Platform | Size | Notes |
|---|
| itch.io | 630×500px | Required for browse visibility |
| Gumroad |
1280×720px | 16:9 |
| DriveThruRPG | 900×700px | Landscape or portrait |
| Social preview (OG/Twitter) | 1200×630px | Standard |
Cover image boilerplate
CODEBLOCK5
Radial gradient (dark-to-light effect)
CODEBLOCK6
RGBA transparency (for compositing)
CODEBLOCK7
ZIP bundle
import zipfile
with zipfile.ZipFile("product.zip", "w", zipfile.ZIP_DEFLATED) as z:
z.writestr("README.txt", readme_text)
for fp in file_list:
z.write(fp, f"subfolder/{os.path.basename(fp)}")
Copy Generation — Groq
API key location: Store your Groq API key in ~/.openclaw/workspace/dashboard/.env as INLINECODE1
Node.js call pattern
CODEBLOCK9
Listing copy prompt template
CODEBLOCK10
De-AI-ify checklist (always run before saving copy)
- - Remove em dashes — use periods or commas instead
- Remove: "elevate," "enhance," "seamlessly," "perfect for," "streamline"
- Break up long bullet lists into short paragraphs
- If it sounds like a press release, rewrite it
Platform Playbooks
itch.io
- - New product: Dashboard → Create new project → Downloadable
- Cover image: 630×500px required — no cover = invisible in browse
- Pricing: fixed price or "pay what you want" with minimum
- Upload: ZIP file for multi-file products
- Tags: use specific terms (e.g. "ttrpg tokens" not just "game")
Gumroad
- - New product: Products → New Product → Digital
- Cover: 1280×720 recommended
- Description editor may require manual paste — automation sometimes blocked
- Set Discover category in product settings for marketplace visibility
- Configure payout threshold in account settings
DriveThruRPG
- - Free publisher account at drivethrurpg.com/publishers
- Cover: 900×700px
- Categories for tokens: Accessories > Tokens/Maps
- Revenue: 70% creator / 30% DTRPG
- Payout: PayPal, $10 minimum
Common Blockers & Fixes
| Blocker | Fix |
|---|
| Bing Image Creator requires MS account | Use Pillow — no external services needed |
| ideogram.ai / external generators blocked by Cloudflare |
Use Pillow |
| Browser crashes during canvas rendering | Don't use browser for images. Pillow only. |
| Can't save canvas to file from browser JS | Pillow writes directly to disk |
|
file:// URLs blocked in browser tool | Serve via
python3 -m http.server PORT |
| Gumroad editor blocks automation | Paste listing copy manually |
|
require is not defined in browser evaluate | Use exec + node script instead |
| itch.io "invalid token" on email verify | Safe to ignore if account is already live |
Cost Per Product
| Item | Tool | Cost |
|---|
| Cover image | Pillow | $0 |
| Asset sheets / bundles |
Pillow | $0 |
| Product listing copy | Groq llama-3.3-70b | ~$0.01 |
| Orchestration | Claude main session | minimal |
|
Total per product | |
< $0.05 |
No sub-agents needed. Do everything inline in the main session.
Example Products Built With This Skill
- - NPC Dialogue & Quest Text Packs — itch.io, $9
- TTRPG Character Token Pack — DriveThruRPG, $7.99
- Newsletter Creator Visual Kit — Gumroad, $12
数字产品构建器
无需在图像生成器或昂贵的AI模型上花费资金,即可为Gumroad、itch.io和DriveThruRPG构建并发布数字产品。
技术栈: Python Pillow用于图像($0)+ Groq用于文案(约$0.01/产品)+ Claude主会话仅用于编排。
快速开始
bash
检查Pillow
python3 -c from PIL import Image, ImageDraw, ImageFont; print(Pillow ready) 2>/dev/null || echo 未安装
如未安装则安装(依次尝试,直到成功)
pip3 install Pillow
或:pip install Pillow
或:python3 -m pip install Pillow
图像生成 — Pillow
切勿使用浏览器工具生成图像。 Pillow更快、不会崩溃,且无需登录或外部服务。
查找可用字体(首先运行此命令)
python
import os
font_dirs = [
/usr/share/fonts, # Linux
/System/Library/Fonts, # macOS
C:/Windows/Fonts, # Windows
os.path.expanduser(~/.fonts),
]
fonts = []
for d in font_dirs:
if os.path.exists(d):
for root, _, files in os.walk(d):
for f in files:
if f.endswith((.ttf, .otf)):
fonts.append(os.path.join(root, f))
print(\n.join(fonts[:20]))
常见字体路径(Ubuntu/Debian)
/usr/share/fonts/truetype/liberation/LiberationSerif-Bold.ttf
/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
常见字体路径(macOS)
/System/Library/Fonts/Helvetica.ttc
/System/Library/Fonts/Georgia.ttf
/Library/Fonts/Arial.ttf
安全后备方案(始终有效,无需字体文件)
python
font = ImageFont.load_default() # 基础但可靠
平台封面尺寸
| 平台 | 尺寸 | 备注 |
|---|
| itch.io | 630×500px | 浏览可见性必需 |
| Gumroad |
1280×720px | 16:9 |
| DriveThruRPG | 900×700px | 横向或纵向 |
| 社交预览(OG/Twitter) | 1200×630px | 标准尺寸 |
封面图像模板
python
from PIL import Image, ImageDraw, ImageFont
import os
W, H = 630, 500
SERIF_BOLD = /usr/share/fonts/truetype/liberation/LiberationSerif-Bold.ttf
img = Image.new(RGB, (W, H), (20, 20, 40))
draw = ImageDraw.Draw(img)
font = ImageFont.truetype(SERIF_BOLD, 36)
gold = (201, 168, 76)
边框
draw.rectangle([10,10,W-10,H-10], outline=gold, width=4)
居中标题
b = draw.textbbox((0,0), 您的标题, font=font)
draw.text(((W-(b[2]-b[0]))//2, (H-(b[3]-b[1]))//2), 您的标题,
fill=gold, font=font)
img.save(/path/to/output.png, PNG, optimize=True)
print(f已保存({os.path.getsize(/path/to/output.png)//1024}KB))
径向渐变(暗到亮效果)
python
def lerp(a, b, t):
return tuple(int(a[i] + (b[i]-a[i])*t) for i in range(3))
center = (230, 180, 80) # 亮色中心
edge = (60, 30, 10) # 暗色边缘
for step in range(30, 0, -1):
t = step / 30
c = lerp(center, edge, t)
r = int(radius * step / 30)
draw.ellipse([cx-r, cy-r, cx+r, cy+r], fill=c)
RGBA透明度(用于合成)
python
img = Image.new(RGBA, (W, H), (20, 20, 40, 255))
draw = ImageDraw.Draw(img, RGBA)
... 使用alpha绘制 ...
保存PNG前压平为RGB
bg = Image.new(RGB, (W, H), (20, 20, 40))
bg.paste(img, mask=img.split()[3])
bg.save(out_path, PNG)
ZIP打包
python
import zipfile
with zipfile.ZipFile(product.zip, w, zipfile.ZIP_DEFLATED) as z:
z.writestr(README.txt, readme_text)
for fp in file_list:
z.write(fp, fsubfolder/{os.path.basename(fp)})
文案生成 — Groq
API密钥位置: 将您的Groq API密钥存储在~/.openclaw/workspace/dashboard/.env中,格式为GROQAPIKEY=yourkeyhere
Node.js调用模式
javascript
const https = require(https);
const GROQ
KEY = process.env.GROQAPI_KEY;
const body = JSON.stringify({
model: llama-3.3-70b-versatile,
messages: [{ role: user, content: YOUR_PROMPT }],
max_tokens: 600,
temperature: 0.7
});
const req = https.request({
hostname: api.groq.com,
path: /openai/v1/chat/completions,
method: POST,
headers: {
Authorization: Bearer ${GROQ_KEY},
Content-Type: application/json,
Content-Length: Buffer.byteLength(body)
}
}, res => {
let d = ;
res.on(data, c => d += c);
res.on(end, () => console.log(JSON.parse(d).choices[0].message.content));
});
req.write(body);
req.end();
产品列表文案提示模板
为[平台]撰写产品列表。使用平实语言。不要使用破折号。
不要使用填充性短语(提升、完美适合、优化工作流程)。
产品:[名称]
产品说明:[描述]
价格:[价格]
格式:[文件格式]
撰写:标题(不超过60字符)、标语(一句话)、描述
(3个短段落)、包含内容(最多5项)、5个搜索标签。
去AI化检查清单(保存文案前始终执行)
- - 移除破折号 — 改用句号或逗号
- 移除:提升、增强、无缝、完美适合、优化
- 将长项目符号列表拆分为短段落
- 如果听起来像新闻稿,请重写
平台操作指南
itch.io
- - 新产品:仪表盘 → 创建新项目 → 可下载
- 封面图像:必需630×500px — 无封面则在浏览中不可见
- 定价:固定价格或随意付费并设置最低金额
- 上传:多文件产品使用ZIP文件
- 标签:使用具体术语(例如ttrpg代币而非仅游戏)
Gumroad
- - 新产品:产品 → 新产品 → 数字产品
- 封面:推荐1280×720
- 描述编辑器可能需要手动粘贴 — 自动化有时被阻止
- 在产品设置中设置发现类别以在市场中可见
- 在账户设置中配置提现阈值
DriveThruRPG
- - 在drivethrurpg.com/publishers注册免费发布者账户
- 封面:900×700px
- 代币类别:配件 > 代币/地图
- 收入:创作者70% / DTRPG 30%
- 提现:PayPal,最低$10
常见障碍及解决方案
| 障碍 | 解决方案 |
|---|
| Bing图像创建器需要微软账户 | 使用Pillow — 无需外部服务 |
| ideogram.ai / 外部生成器被Cloudflare阻止 |
使用Pillow |
| 浏览器在画布渲染时崩溃 | 不要使用浏览器处理图像。仅用Pillow。 |
| 无法从浏览器JS将画布保存到文件 | Pillow直接写入磁盘 |
| 浏览器工具中file:// URL被阻止 | 通过python3 -m http.server PORT提供服务 |
| Gumroad编辑器阻止自动化 | 手动粘贴产品列表文案