Fetch WeChat Official Account articles and convert them to Markdown
Project description
wechat-article-to-markdown
Fetch WeChat Official Account articles and convert them to clean Markdown.
Features
- Anti-detection fetching with Camoufox
- Extract article metadata (title, account name, publish time, source URL)
- Convert WeChat article HTML to Markdown
- Download article images to local
images/and rewrite links - Handle WeChat
code-snippetblocks with language fences
Installation
# Recommended: pipx
pipx install wechat-article-to-markdown
# Or: uv tool
uv tool install wechat-article-to-markdown
Or from source:
git clone git@github.com:jackwener/wechat-article-to-markdown.git
cd wechat-article-to-markdown
uv sync
Usage
# Installed CLI
wechat-article-to-markdown "https://mp.weixin.qq.com/s/xxxxxxxx"
# Run in repo with uv
uv run wechat-article-to-markdown "https://mp.weixin.qq.com/s/xxxxxxxx"
# Backward-compatible local entry
uv run main.py "https://mp.weixin.qq.com/s/xxxxxxxx"
Output structure:
output/
└── <article-title>/
├── <article-title>.md
└── images/
├── img_001.png
├── img_002.png
└── ...
Use as AI Agent Skill
This project ships with SKILL.md, so AI agents can discover and use this tool workflow.
Claude Code / Antigravity
# Clone into your project's skills directory
mkdir -p .agents/skills
git clone git@github.com:jackwener/wechat-article-to-markdown.git \
.agents/skills/wechat-article-to-markdown
# Or copy SKILL.md only
curl -o .agents/skills/wechat-article-to-markdown/SKILL.md \
https://raw.githubusercontent.com/jackwener/wechat-article-to-markdown/main/SKILL.md
OpenClaw / ClawHub
Officially supports OpenClaw and ClawHub:
clawhub install wechat-article-to-markdown
PyPI Publishing (GitHub Actions)
Repository: jackwener/wechat-article-to-markdown
Workflow: .github/workflows/publish.yml
Environment: pypi
publish.yml triggers on v* tags and workflow_dispatch, builds with uv build, then publishes with trusted publishing (id-token: write).
功能特性
- 使用 Camoufox 进行反检测抓取
- 提取标题、公众号名称、发布时间、原文链接
- 将微信公众号文章 HTML 转换为 Markdown
- 下载图片到本地
images/并自动替换链接 - 处理微信
code-snippet代码块并保留语言标识
安装
# 推荐:pipx
pipx install wechat-article-to-markdown
# 或者:uv tool
uv tool install wechat-article-to-markdown
使用示例
wechat-article-to-markdown "https://mp.weixin.qq.com/s/xxxxxxxx"
作为 AI Agent Skill 使用
项目自带 SKILL.md,可供支持 .agents/skills/ 约定的 Agent 自动发现。
OpenClaw / ClawHub
clawhub install wechat-article-to-markdown
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wechat_article_to_markdown-0.1.0.tar.gz.
File metadata
- Download URL: wechat_article_to_markdown-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f750dfd36306ddf197363517954312f08e6da71e7e26b393a3ba36aa4a51521
|
|
| MD5 |
bf39398e218cdd8fdf9dea5136d503d9
|
|
| BLAKE2b-256 |
9ed17b1626c2533e122064c49ffe588786ee3179b0971cb703c2efaf29fbc123
|
Provenance
The following attestation bundles were made for wechat_article_to_markdown-0.1.0.tar.gz:
Publisher:
publish.yml on jackwener/wechat-article-to-markdown
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wechat_article_to_markdown-0.1.0.tar.gz -
Subject digest:
0f750dfd36306ddf197363517954312f08e6da71e7e26b393a3ba36aa4a51521 - Sigstore transparency entry: 1029911097
- Sigstore integration time:
-
Permalink:
jackwener/wechat-article-to-markdown@ead16321974e60a5288c72b572d99c9aa833b975 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jackwener
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ead16321974e60a5288c72b572d99c9aa833b975 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wechat_article_to_markdown-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wechat_article_to_markdown-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85e773f489b0d65872f7958152bbd5b2e3761f0b12262b7d176257bb1676457d
|
|
| MD5 |
edc1d40c6b65d0fc0e55c8a015e4aa1a
|
|
| BLAKE2b-256 |
2700e6cb084dc170039460e74b4added5a34ecd4264dacc8bbaa078859984fe4
|
Provenance
The following attestation bundles were made for wechat_article_to_markdown-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jackwener/wechat-article-to-markdown
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wechat_article_to_markdown-0.1.0-py3-none-any.whl -
Subject digest:
85e773f489b0d65872f7958152bbd5b2e3761f0b12262b7d176257bb1676457d - Sigstore transparency entry: 1029911224
- Sigstore integration time:
-
Permalink:
jackwener/wechat-article-to-markdown@ead16321974e60a5288c72b572d99c9aa833b975 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jackwener
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ead16321974e60a5288c72b572d99c9aa833b975 -
Trigger Event:
push
-
Statement type: