Documentation
README
微信公众号文章处理 Skill
将微信公众号文章转换为 Markdown,生成 A 层观点提取 + B 层问题链,存入知识库。
两种模式
模式 1:直接链接抓取(推荐)
python scripts/fetch_article.py "https://mp.weixin.qq.com/s/xxxxx"
公众号文章 URL 是公开的,不需要登录,直接抓取即可。
模式 2:PDF 提取
python scripts/extract.py "path/to/article.pdf"
适用于通过「笔记同步助手」等工具导出的 PDF。
环境要求
# Python 3.10+
pip install beautifulsoup4 markitdown pymupdf
# 或者用 uv
uv pip install beautifulsoup4 markitdown pymupdf
使用方法
单篇处理(链接)
python scripts/fetch_article.py "https://mp.weixin.qq.com/s/xxxxx" --output ./output
链接模式会尽量保留:
- 标题层级:
h1/h2/h3会转成 Markdown 标题 - 图片:
data-src/src会转成 Markdown 图片引用 - 链接:正文里的
<a>会转成 Markdown 链接
单篇处理(PDF)
python scripts/extract.py "path/to/article.pdf" --output ./output
This is the opening of the README. Read the full README on GitHub.