摸鱼日报和百度热搜等图片生成,持续升级中
Generate "摸鱼日报" or "百度热搜" posters from minimal JSON input, output SVG by default with optional PNG/JPG/WEBP export formats.
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 1 · 183 · 0 current installs · 0 all-time installs
by青衣大魔王@321704933
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (generate 'daily' and 'baidu_hot' posters, output SVG and image exports) align with included files: rendering, lunar calendar, countdown, and SVG->image conversion. Declared requirements (none) are consistent with an instruction-first repo that includes Python scripts and a requirements.txt listing resvg_py and Pillow.
Instruction Scope
SKILL.md instructs the agent to run local Python renderer scripts and to produce SVG/PNG/JPG/WEBP outputs. The code legitimately reads JSON specs and writes output files. However, render_baidu_hot.py makes an outbound HTTP request to a third‑party endpoint (BAIDU_API_URL = "https://v2.xxapi.cn/api/baiduhot") to fetch hot‑search data, and render_daily_poster.py contains logic to fetch remote image assets (HTTP/HTTPS) and cache them under references/cache. SKILL.md does not explicitly call out network activity; if you need offline operation or want to avoid contacting external services, review or modify those places.
Install Mechanism
No automated install spec is provided (instruction-only), so nothing is downloaded or executed implicitly by an installer. The repository includes a requirements.txt (resvg_py, Pillow) which is proportional to SVG rendering and image conversion. Converters in svg_image_converter may invoke system binaries (ImageMagick 'magick', Inkscape, rsvg-convert, resvg) if present; this is expected behavior for image conversion but requires those binaries to be installed to enable some backends.
Credentials
The skill does not request environment variables, credentials, or configuration paths. There are no required secrets. Network calls are unauthenticated to a public API and to arbitrary image URLs supplied in spec; no credential exfiltration code is present.
Persistence & Privilege
The skill does not request permanent/enforced presence (always: false). It writes output files and may cache fetched images under references/cache, which is normal for this tool. It does not modify other skills or system-wide agent settings.
Assessment
This package appears to be what it says: a JSON-driven poster generator that renders SVG and optionally converts to PNG/JPG/WEBP. Before installing or running it, consider the following:
- Network activity: the 'baidu_hot' renderer uses a third‑party API (https://v2.xxapi.cn/api/baiduhot) to fetch hot‑search data, and the daily renderer may fetch remote image URLs (and cache them under references/cache). If you need to avoid outbound requests, inspect and modify render_baidu_hot.py and render_daily_poster.py to use local data or a different API.
- Image backends: conversion to PNG/JPG/WEBP may call system binaries (ImageMagick, Inkscape, librsvg 'rsvg-convert', resvg) or use the Python resvg_py/Pillow packages. Installing those packages/binaries grants the renderer the ability to execute local subprocesses for conversion — this is expected but worth noting.
- Files written: the tool writes outputs to the path you pass and may create a cache directory (references/cache). Review the repo's references/ and cache if you are concerned about write locations.
- Third‑party trust: the skill relies on an external API (XXApi) for baidu hot data; confirm you trust that service for the data you plan to publish. If privacy matters, replace or stub the API with local data.
If you want a stricter safety posture, run the renderer in a restricted environment (no network, limited file write permissions) or review/patch the network fetch code to remove or control external calls.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Daily Poster
Poster Type Map
daily=摸鱼日报baidu_hot=百度热点/百度热搜- 用户提到“摸鱼日报”“日报”“节假日倒计时”“下班倒计时”时,优先选择
daily - 用户提到“百度热点”“百度热搜”“热搜榜”“热榜”时,优先选择
baidu_hot
Use
{
"poster_type": "daily",
"personal_info": {
"name": "智普虾🦐",
"bio_lines": [
"OpenClaw 驱动的 AI 助手,搭载GLM5 模型,机智温暖有点俏皮"
]
}
}
- 默认入口:
python scripts/render_poster.py --spec <spec.json> --output out/poster poster_type只支持daily和baidu_hotposter_type: "daily"表示“摸鱼日报”版式poster_type: "baidu_hot"表示“百度热点 / 百度热搜”版式- 用户未明确要求时,只收集
personal_info.name和最多2行bio_lines
Output Format Map
当用户提到“生成图片”“导出 PNG”“发 JPG”“给我 WEBP”这类需求时,不要只停留在 SVG,要在 JSON 里补 output。
- 用户说“生成 png”“导出图片”“发一张海报图”时,优先使用
output.formats: ["png"] - 用户说“既要源文件又要图片”“同时保留 svg 和 png”时,使用
output.formats: ["svg", "png"] - 用户说“导出 jpg / jpeg”时,使用
output.formats: ["jpg"],并补quality - 用户说“导出 webp”时,使用
output.formats: ["webp"],并补quality - 用户没有指定清晰度时,
png/jpg/jpeg/webp默认推荐scale: 2 - 用户没有指定压缩质量时,
jpg/jpeg/webp默认推荐quality: 92 - 用户要求
jpg/jpeg这类不透明格式时,默认补background: "#ffffff",除非用户明确要求别的底色 - AI 生成 JSON 时,优先显式写
output.formats,不要依赖--output out/poster.png这种后缀推断
推荐模板:
{
"output": {
"formats": ["png"],
"scale": 2
}
}
常用输出示例:
{
"output": {
"formats": ["svg", "png"],
"scale": 2
}
}
{
"output": {
"formats": ["jpg"],
"scale": 2,
"quality": 92,
"background": "#ffffff"
}
}
Minimal Inputs
# 摸鱼日报(daily)
python scripts/render_poster.py --type daily --spec references/daily-poster-spec.json --output out/daily_poster
# 百度热点 / 百度热搜(baidu_hot)
python scripts/render_poster.py --type baidu_hot --spec references/baidu-hot-spec.json --output out/baidu_hot_poster
daily 最小输入(摸鱼日报):
{
"poster_type": "daily",
"personal_info": {
"name": "智普虾🦐",
"bio_lines": [
"OpenClaw 驱动的 AI 助手,搭载 GLM5 模型,机智温暖有点俏皮"
]
}
}
baidu_hot 最小输入(百度热点 / 百度热搜):
{
"poster_type": "baidu_hot",
"personal_info": {
"name": "智普虾🦐",
"bio_lines": [
"OpenClaw 驱动的 AI 助手,搭载 GLM5 模型,机智温暖有点俏皮"
]
}
}
Rules
bio_lines/text_lines最多保留前2行非空内容baidu_hot的title、subtitle、api_url、limit全部内置,不接受外部 JSON 覆盖baidu_hot顶部日期区同一行显示公历、星期、农历- 所有入口脚本统一输出 JSON 结果
- 渲染器总是先生成 SVG,再按
output.formats转换为 PNG/JPG/JPEG/WEBP - 当用户只说“图片”但没有指定格式时,默认按
png理解最稳妥 - 使用多个格式时,推荐命令写成
--output out/poster,程序会生成同名不同后缀文件
Key Files
scripts/render_poster.py: 统一入口scripts/render_daily_poster.py: 摸鱼日报渲染器scripts/render_baidu_hot.py: 百度热搜渲染器scripts/poster_runtime.py: 统一运行时和 stdout JSONreferences/daily-poster-spec.json: 摸鱼日报示例references/baidu-hot-spec.json: 百度热搜示例
Files
15 totalSelect a file
Select a file to preview.
Comments
Loading comments…
