Commit graph

11 commits

Author SHA1 Message Date
wangzhuc
0871162634 feat: visual AI overhaul — style anchoring, typed illustrations, 9-provider fallback
- Add visual anchor extraction after cover confirmation for consistent inline images
- Introduce 6 illustration types (infographic/scene/flowchart/comparison/framework/timeline) with structured prompt templates
- Expand image providers from 3 to 9: add DashScope, MiniMax, Replicate, Azure OpenAI, OpenRouter, Jimeng
- Support multi-provider auto-fallback via `image.providers` config (backward-compatible)
- Update SKILL.md Step 6 and environment check for new capabilities

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 23:51:53 +08:00
wangzhuc
c133234dc8 fix: publish 命令支持 --digest 覆盖自动摘要
- cli.py publish 新增 --digest 参数,优先使用传入值,否则回退自动截取
- SKILL.md Step 5 摘要限制从 ≤54 字改为 ≤40 字(对齐微信 120 UTF-8 字节限制)
- SKILL.md Step 7 publish 命令模板补上 --digest

Closes #8

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 13:37:23 +08:00
wangzhuc
eb3115d537 fix: improve GeminiProvider — size hint, API key in header, error handling
- Append size instruction to prompt (Gemini has no native size param)
- Move API key from URL query string to x-goog-api-key header
- Check status_code before parsing JSON to handle non-JSON error responses
- Remove unnecessary Session with trust_env=False
- Remove f-prefix from strings with no interpolation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 13:13:22 +08:00
ystyleb
6e0ff85f30 feat: add Gemini image generation support 2026-04-01 13:05:13 +08:00
wangzhuc
d6900fe85d feat(learn-theme): add CLI with argparse and terminal report
Replace the smoke-test main() with a proper argparse CLI that accepts
a URL and --name, validates the name, fetches + extracts + analyzes the
article, calls generate_theme_yaml(), and writes the YAML to
toolkit/themes/. Prints a human-readable theme report with color values
and typography. Adds `learn-theme` subcommand to toolkit/cli.py
(delegates to subprocess call of scripts/learn_theme.py).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 12:37:47 +08:00
wangzhuc
7f0aff1738 fix: force UTF-8 encoding for WeChat draft/get response
WeChat API returns Content-Type without charset, causing requests to
default to ISO-8859-1. Chinese content was decoded as mojibake.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:20:17 +08:00
wangzhuc
2773a8bb9b feat: sync edits from WeChat draft box for learn-edits
- publisher.py: add get_draft() to fetch draft content by media_id,
  add html_to_plaintext() for HTML→text conversion
- learn_edits.py: add --from-wechat flag that auto-fetches latest draft
  from WeChat, converts both sides to plaintext, and diffs
- learn_edits.py: add markdown_to_plaintext() for local file conversion
- SKILL.md: update edit workflow — both local and WeChat edits supported

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:20:17 +08:00
wangzhuc
52cff3dd8f 新增小绿书/图片帖支持(WeChat newspic 格式)
publisher.py 新增 create_image_post():
- article_type="newspic",横滑轮播 3:4 比例
- 1-20 张图片,第一张自动当封面
- 标题 ≤ 32 字,纯文本描述 ~1000 字
- 使用 upload_thumb(永久素材)上传图片

cli.py 新增 image-post 子命令:
  python3 cli.py image-post img1.jpg img2.jpg -t "标题" -c "描述"

SKILL.md Step 8c 新增"做一个小绿书"触发入口。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:33:42 +08:00
wangzhuc
2fa0d7fa6d 排版引擎大升级:CJK修复 + 外链脚注 + 暗黑模式 + 容器语法 + 16主题 + 画廊UI
converter.py 新增 6 项能力:
- CJK-Latin 自动加空格(中英混排更易读)
- 加粗标点外移(修复微信渲染 bug)
- ul/ol 转 section(微信原生列表不稳定)
- 外链→编号脚注 + 文末参考链接(微信屏蔽外链)
- data-darkmode-* 属性注入(适配微信暗黑模式)
- :::dialogue / :::timeline / :::callout / :::quote 容器语法

主题系统:
- 从 4 个扩充到 16 个(含字节/少数派/报纸/包豪斯/水墨/午夜等风格)
- 所有主题新增 darkmode 色值
- 新增 gallery 命令:浏览器内 16 主题并排预览 + 一键复制

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 22:53:28 +08:00
wangzhuc
ec4a646359 Rename media-agent → WeWrite
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:18:38 +08:00
wangzhuc
1ab34fa450 Initial release — 公众号文章全流程 AI Skill
热点抓取 → 选题 → 框架 → 写作 → SEO → 视觉AI → 排版 → 微信草稿箱,
一句话触发完整流程。适用于 Claude Code skill 格式。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:16:18 +08:00