Loading...
Loading...
Compare original and translation side by side
bunbunNode.js >= 16bun.envWECHAT_APP_ID=你的公众号AppID
WECHAT_APP_SECRET=你的公众号AppSecret
WECHAT_DEFAULT_THUMB_MEDIA_ID=默认封面图media_id(可选)
WECHAT_DEFAULT_AUTHOR=AI源来如此(可选)zhy-article-illustratorNode.js >= 16bun.envWECHAT_APP_ID=Your Official Account AppID
WECHAT_APP_SECRET=Your Official Account AppSecret
WECHAT_DEFAULT_THUMB_MEDIA_ID=Default cover image media_id (optional)
WECHAT_DEFAULT_AUTHOR=AI Yuanlai Ruci (optional)zhy-article-illustratornpx skills add ... --skill zhy-wechat-publishSKILL.md.envSKILL.mdnpx skills add ... --skill zhy-wechat-publish.envscripts/| 脚本 | 用途 |
|---|---|
| 上传正文到公众号草稿箱 |
| 上传本地封面图到永久素材库,获取 |
| 读取文章、生成封面、上传封面并推送草稿 |
scripts/| Script | Purpose |
|---|---|
| Upload article content to WeChat Official Account drafts |
| Upload local cover images to the permanent material library to obtain |
| Read articles, generate covers, upload covers, and push drafts |
ul/olthumb_media_idul/olthumb_media_idmedia_idnode scripts/wechat_draft.js --title "文章标题" --file "post.html" --author "AI源来如此" --thumb "MEDIA_ID" --need-open-comment "1" --only-fans-can-comment "1"| 参数 | 必填 | 说明 |
|---|---|---|
| 是 | 文章标题 |
| 是 | HTML 正文文件路径 |
| 否 | 作者,不传时默认 |
| 否 | 摘要 |
| 否 | 封面 |
| 否 | 原文链接 |
| 否 | 是否开启评论,默认 |
| 否 | 是否仅粉丝可评论,默认 |
node scripts/wechat_draft.js --title "Article Title" --file "post.html" --author "AI Yuanlai Ruci" --thumb "MEDIA_ID" --need-open-comment "1" --only-fans-can-comment "1"| Parameter | Required | Description |
|---|---|---|
| Yes | Article title |
| Yes | Path to HTML article file |
| No | Author; if not provided, defaults to |
| No | Article abstract |
| No | Cover |
| No | Original article URL |
| No | Whether to enable comments, default is |
| No | Whether only fans can comment, default is |
node scripts/publish_with_cover.js --article "article.md" --html "post.html" --author "AI源来如此" --source-url "https://example.com"zhy-article-illustrator/scripts/image-gen.tsupload_image.js --jsonthumb_media_idwechat_draft.jsauthorthumb_media_idneed_open_comment=1only_fans_can_comment=1| 参数 | 说明 |
|---|---|
| 原始文章文件,推荐 Markdown,也可 HTML |
| 最终上传到公众号的 HTML 文件 |
| 显式覆盖标题 |
| 显式覆盖作者 |
| 自定义封面输出路径 |
| 封面宽高比,默认 |
| 原文链接 |
| 是否开启评论,默认 |
| 是否仅粉丝可评论,默认 |
node scripts/publish_with_cover.js --article "article.md" --html "post.html" --author "AI Yuanlai Ruci" --source-url "https://example.com"zhy-article-illustrator/scripts/image-gen.tsupload_image.js --jsonthumb_media_idwechat_draft.jsauthorthumb_media_idneed_open_comment=1only_fans_can_comment=1| Parameter | Description |
|---|---|
| Original article file, recommended Markdown, can also be HTML |
| Final HTML file to be uploaded to the Official Account |
| Explicitly override the title |
| Explicitly override the author |
| Custom cover output path |
| Cover aspect ratio, default is |
| Original article URL |
| Whether to enable comments, default is |
| Whether only fans can comment, default is |
wechat_draft.jsvar(--xxx)h1cgi-bin/media/uploadimgwechat_draft.jsvar(--xxx)h1cgi-bin/media/uploadimg[40013] invalid appid.envWECHAT_APP_ID[40164] invalid ip... not in whitelist[40007] invalid media_id缺少 Xiaomi/Gemini/OpenAI API Keymedia/uploadimg[40013] invalid appidWECHAT_APP_ID.env[40164] invalid ip... not in whitelist[40007] invalid media_idMissing Xiaomi/Gemini/OpenAI API Keymedia/uploadimgundefinedundefinedundefinedundefined