← 返回
未分类 Key 中文

wechat-mp-draft-publisher

Publish WeChat Official Account draft articles through a packaged CLI executable that wraps WeChat API calls. Use when the user wants to publish or create a...
通过封装微信API的CLI工具发布公众号草稿文章,适用于用户想要发布或创建内容时。
mesus mesus 来源
未分类 clawhub v0.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 347
下载
💾 0
安装
1
版本
#latest

概述

WeChat MP Draft Publisher

Publish draft articles by calling the bundled wrapper script, which enforces this fixed sequence:

  1. getAuth
  2. uploadArticleImage
  3. uploadCoverImage
  4. addDraft

Requirements

  • Provide executable via one of:
  • Local binary path:
  • CLI flag --bin /absolute/path/to/mp-weixin-skill
  • Env var MP_WECHAT_CLI_BIN
  • GitHub Release auto-download:
  • Env var MP_WECHAT_RELEASE_URL=https://github.com///releases/download// (direct asset URL, supports zip or binary)
  • or:
  • Env var MP_WECHAT_GITHUB_REPO=owner/repo
  • Optional env MP_WECHAT_RELEASE_TAG=latest (default latest)
  • Optional env MP_WECHAT_ASSET_NAME=custom-asset-name
  • Ensure local credentials file exists for getAuth:
  • ~/.weixin_credentials
  • format:
  • appid=YOUR_APP_ID
  • secret=YOUR_APP_SECRET
  • Prepare these files before running:
  • Article content file (--content-file), usually HTML
  • Inline article image (--article-image)
  • Cover image (--cover-image)

Run

Use the wrapper script:

bash scripts/publish_draft.sh \
  --article-image /absolute/path/to/article-image.png \
  --cover-image /absolute/path/to/cover-image.png \
  --content-file /absolute/path/to/content.html \
  --title "Article Title" \
  --author "Author Name" \
  --digest "Optional digest"

GitHub Release mode (auto-download executable):

export MP_WECHAT_GITHUB_REPO="owner/repo"
export MP_WECHAT_RELEASE_TAG="latest"
bash scripts/publish_draft.sh \
  --cover-image /absolute/path/to/cover-image.png \
  --content-file /absolute/path/to/content.html \
  --title "Article Title"

Direct URL mode:

export MP_WECHAT_RELEASE_URL="https://github.com/Mesus/weixin-mp-skill/releases/download/v0.0.1/mp-weixin-skill.zip"
bash scripts/publish_draft.sh \
  --cover-image /absolute/path/to/cover-image.png \
  --content-file /absolute/path/to/content.html \
  --title "Article Title"

If uploadCoverImage response does not include usable media_id, pass it explicitly:

bash scripts/publish_draft.sh \
  --bin /absolute/path/to/mp-weixin-skill \
  --article-image /absolute/path/to/article-image.png \
  --cover-image /absolute/path/to/cover-image.png \
  --content-file /absolute/path/to/content.html \
  --title "Article Title" \
  --thumb-media-id "YOUR_MEDIA_ID"

Output Contract

Script prints one JSON object on stdout:

  • access_token: token returned by getAuth
  • article_image_url: URL returned by uploadArticleImage
  • cover_upload: raw JSON object returned by uploadCoverImage
  • thumb_media_id_used: value passed to addDraft
  • draft: raw JSON object returned by addDraft

On failure, script prints JSON error to stderr and exits non-zero.

Resource

  • CLI wrapper implementation details: references/cli-contract.md

版本历史

共 1 个版本

  • v0.0.1 当前
    2026-05-07 12:03 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 938 📥 212,125
content-creation

Marketing Skills

jchopard69
访问 23 个营销模块,提供转化率优化(CRO)、SEO、文案撰写、分析、发布、广告和社交媒体的清单、框架及可直接使用的交付物。
★ 146 📥 31,718
content-creation

文章去AI味工具

user_ab5ae6ee
去除文本中的AI写作痕迹,让文字读起来更像人类写作。当用户要求'去AI味'、'降AI味'、'让回复更像人话'、'润色'、'改写得更自然'时使用。检测并修复:AI高频词汇、过度结构化、虚假客观性、机械化连接词、完美主义陷阱、公式化结尾、过度修
★ 169 📥 25,245