技能图谱SKILLSGROVE
技能图谱/效率工具/likemaoke/wechat-article-to-md/wechat-article-to-md

wechat-article-to-md

安装

$npx skills add https://github.com/likemaoke/wechat-article-to-md --skill wechat-article-to-md
$git clone --depth 1 https://github.com/likemaoke/wechat-article-to-md.git /tmp/wechat-article-to-md && mkdir -p ~/.claude/skills && cp -r /tmp/wechat-article-to-md/. ~/.claude/skills/wechat-article-to-md
请帮我安装这个 Agent Skill:https://github.com/likemaoke/wechat-article-to-md/tree/bae29fb650b3b08ef4c98931da2839af6560afcd/ ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MIT抓取微信公众号文章并转换为 Markdown 文档。使用脚本自动获取文章标题、作者、正文内容,保留格式并保存为 .md 文件,支持下载图片到本地。适用场景:用户要求抓取/获取/下载/保存微信公众号文章内容为 Markdown 格式,或给出 mp.weixin.qq.com 链接需要提取内容。支持 Obsidian 模式(使用 -obsidian 参数)。
以下 SKILL.md 内容转载自 likemaoke/wechat-article-to-md(提交 bae29fb),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2026 likemaoke 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

微信公众号文章转 Markdown

抓取微信公众号文章并将其转换为 Markdown 文档。

快速使用

普通模式

# 基本用法(自动下载图片)
python3 scripts/wechat_article_to_md.py <文章URL>

# 指定输出目录
python3 scripts/wechat_article_to_md.py <文章URL> <输出目录>

图片保存位置: images/ 图片引用格式: ![alt](images/filename.png)

Obsidian 模式

# 使用 Obsidian 格式
python3 scripts/wechat_article_to_md.py <文章URL> [输出目录] -obsidian

图片保存位置: attachments/img/(向上查找固定的目录,可能位于输出目录的上级或更上级) 图片引用格式: ![[filename.png]]

输出内容

脚本会自动提取并保存:

  • 标题: 文章主标题
  • 作者: 公众号作者名称
  • 来源: 原文链接
  • 正文: 完整内容,转换为 Markdown 格式
    • 标题层级 (h1-h6)
    • 粗体、斜体
    • 列表(有序/无序)
    • 链接
    • 图片(保留图片链接)
    • 代码块
    • 引用块

文件命名

输出文件名自动使用文章标题,文件名中的非法字符会被自动替换为下划线。

脚本位置

可执行脚本位于 scripts/wechat_article_to_md.py。

查看许可证全文(MIT)
MIT License

Copyright (c) 2026 likemaoke

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.