What problem does it solve?
Quickly publish articles from local Markdown or HTML (including Obsidian-style embeds) to a WeChat Official Account draft box, handling image uploads, cover images, and content rendering so users avoid manual copy-paste and upload steps.
Core Features & Use Cases
- API-based draft saving: Upload cover images as permanent media and save fully-formed articles to the WeChat draft box via draft/add.
- Inline image handling: Convert markdown images, upload inline images with media/uploadimg, and replace content URLs with WeChat-hosted URLs.
- Markdown → HTML rendering: Render markdown with themes, extract content, and paste or upload rendered HTML into the editor when needed.
- Browser automation fallback: Optionally use Chrome/CDP and clipboard-based browser automation for editor-driven posting when API constraints exist.
- Use Case: Convert an Obsidian note with local images into WeChat-ready HTML, upload images and cover, and save the result as a draft with a single command.
Quick Start
Run the wechat-api script with your article file, ensure WECHAT_APP_ID and WECHAT_APP_SECRET are set in the shared .env, and provide a cover if desired.