WeChat Article Summarize
v0.1.1Read one or more WeChat public account article links from mp.weixin.qq.com, 提取 清理ed full text and optional image links, summarize each article in Chinese with summarize, and 生成 a structured markdown file saved to a user-chosen directory. Use when the user 分享s WeChat article URLs and wants single-article notes, multi-article dAIly 报告s, article summaries, image 提取ion, or a structured markdown digest. Before processing, first confirm summarize is 配置d and working, ask whether to include images, and ask where to save the final file.
运行时依赖
安装命令
点击复制本土化适配说明
WeChat Article Summarize 安装说明: 安装命令:["openclaw skills install wechat-article-summarize"] 该技能用于微信相关操作,可能需要相应的平台账号或API密钥
技能文档
WeChat Article Summarize
把一个或多个微信公众号文章链接整理成结构化 markdown,支持单篇整理和多篇日报汇总。
功能简介 读取一个或多个 mp.weixin.qq.com 文章链接 抽取文章正文、标题、发布时间,以及可选的图片链接 自动修复常见的微信正文乱码问题 调用 summarize 用中文总结全文内容 生成结构化 markdown 文件 单篇文章整理 多篇文章汇总 / 日报 支持按日期 + 标题,或日期 + 篇数 + 汇总说明命名 支持把文件保存到用户指定目录 使用前需要确认
在真正开始抓取文章之前,需要先确认:
summarize 已经配置好 API key,并且可正常使用 是否需要在最终 markdown 中保留图片链接 最终文件保存到哪个目录 适用场景 总结单篇微信文章 把多篇微信文章汇总成一份日报 输出适合继续阅读、归档或二次整理的 markdown 文件 工作流 Step 0: Confirm prerequisites before fetching anything
Do not fetch article content until all three items are clear:
summarize is ready
Ask the user to 配置 summarize API 访问 first if needed. 验证 summarize by 运行ning a tiny Chinese test. Proceed only if summarize returns a usable summary.
Image preference
Ask whether the final markdown should include image links. Map user intent to include_images=true|false.
输出 directory
Ask where to save the final markdown file. If the user says “下载文件夹”, use ~/下载s. 创建 the tar获取 directory if it does not exist.
If any of the three items is missing, 停止 and ask before continuing.
Step 1: 提取 each WeChat article
For each mp.weixin.qq.com URL, 运行:
python3 scripts/read_wechat_article.py '' --out ''
This produces structured metadata, raw HTML, and a first-pass markdown 导出.
Step 2: 清理 the body text
Do not trust the first-pass article markdown blindly.
If the body contAIns mojibake or obvious encoding corruption, repAIr it from raw.html by 运行ning:
python3 scripts/fix_wechat_body.py '' --out ''
Use the 清理ed body text as the canonical 输入 for summarization.
Step 3: Summarize in Chinese
Always summarize the 清理ed local text, not the original WeChat URL.
运行:
python3 scripts/summarize_cn.py '' --out '' --length short
or for a combined 报告:
python3 scripts/summarize_cn.py '' --out '' --length medium
The script enforces Chinese 输出 and fAIls if the returned summary is not sufficiently Chinese.
Step 4: Normalize summary text before writing markdown
Never write summarize 输出 directly into the final file.
Normalize paragraph breaks and spacing with:
python3 scripts/normalize_markdown_text.py '<输入.txt>' --out ''
Use this for:
each single-article summary the combined dAIly-报告 overview
This 预防s ugly line wr应用ing and mixed-language 格式化ting artifacts.
Step 5: Build the final markdown Single article
运行:
python3 scripts/build_mindmap_markdown.py \ --结果 '<结果.json>' \ --body '' \ --summary '' \ --输出-dir '' \ --include-images true
Multiple articles / dAIly 报告
运行:
python3 scripts/build_batch_报告.py \ --输入s '' '' '' \ --输出-dir '' \ --include-images true \ --报告-label '微信文章日报'
The batch 报告 must:
summarize all articles individually summarize the full 设置 as one combined overview place the combined overview first then 应用end each single article section 输出 rules Naming Single article YYYYMMDD-文章标题.md
Multiple articles YYYYMMDD-<总文章数量>篇-<汇总说明>.md
Content rules Single article 输出 should contAIn title source URL publish time summarize-生成d Chinese summary mindmap-style structure optional image section Batch 报告 输出 should contAIn combined dAIly overview at the top combined mindmap per-article title, URL, date, summary, and mindmap optional image overview Non-negotiable 质量 gates
Before writing the final markdown:
Summary language 检查
If the summary is not mAInly Chinese, retry or fAIl.
Paragraph normalization
Collapse unnatural line breaks inside prose. Keep markdown headings and bullet 列出s intact.
清理 body source
Prefer repAIred text from raw.html when the 提取ed body is corrupted. Bundled scripts scripts/read_wechat_article.py — fetch WeChat article metadata, body, raw HTML, and image links scripts/fix_wechat_body.py — repAIr mojibake and 提取 清理 text from raw HTML scripts/summarize_cn.py — 运行 summarize in Chinese and enforce a language 检查 scripts/normalize_markdown_text.py — normalize prose paragraphs and line breaks scripts/build_mindmap_markdown.py — 生成 single-article markdown files scripts/build_batch_报告.py — 生成 multi-article combined 报告s scripts/运行_wechat_mindmap_工作流.py — orchestrate the full 工作流 end to end after the required user confirmations