{"id":13602344,"url":"https://github.com/LinusLing/WeChatMediaPlatformAutomation","last_synced_at":"2025-04-11T08:32:10.760Z","repository":{"id":47723391,"uuid":"198222006","full_name":"LinusLing/WeChatMediaPlatformAutomation","owner":"LinusLing","description":"一款在微信公众号( https://mp.weixin.qq.com )自动预览/发布文章的命令行工具。","archived":false,"fork":false,"pushed_at":"2024-06-26T10:53:56.000Z","size":124,"stargazers_count":152,"open_issues_count":6,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-30T05:58:07.502Z","etag":null,"topics":["automation","puppeteer","wechat","wechat-official-account","weixin-mp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinusLing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-22T12:47:08.000Z","updated_at":"2024-10-21T10:37:27.000Z","dependencies_parsed_at":"2024-01-16T22:20:23.661Z","dependency_job_id":"d1caa06d-af40-453e-8bd2-11d84c60b986","html_url":"https://github.com/LinusLing/WeChatMediaPlatformAutomation","commit_stats":{"total_commits":43,"total_committers":3,"mean_commits":"14.333333333333334","dds":0.2790697674418605,"last_synced_commit":"27d58047975e530315a7a181b61384cb3010a8d1"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FWeChatMediaPlatformAutomation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FWeChatMediaPlatformAutomation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FWeChatMediaPlatformAutomation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FWeChatMediaPlatformAutomation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusLing","download_url":"https://codeload.github.com/LinusLing/WeChatMediaPlatformAutomation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223261651,"owners_count":17115616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","puppeteer","wechat","wechat-official-account","weixin-mp"],"created_at":"2024-08-01T18:01:20.588Z","updated_at":"2024-11-07T05:31:16.497Z","avatar_url":"https://github.com/LinusLing.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# WeChatMediaPlatformAutomation\n\n一款在微信公众号( https://mp.weixin.qq.com )自动预览/发布文章的命令行工具。\n\n## 如何使用\n\n1. 安装：`npm install wechat-mp-automation -g `\n\n2. 打开命令行执行：\n   1. 配置文件方式：\n      1. `wechat-mp-automation -C YOUR_CONFIG_JSON_FILE_PATH`\n   2. 非配置文件方式：\n      1. 非原创：`wechat-mp-automation -t [标题] -a [作者] -u [账号] -p [密码]`\n      2. 声明原创：`wechat-mp-automation -t [标题] -a [作者] -u [账号] -p [密码] -o`\n      3. 其余参数，参看如下帮助文档👇\n   \n3. 过程中的扫码：\n\n   1. 一次扫码，验证身份后登录\n   2. 若设置了只预览不发布（1.2.0 起支持 `--preview`），无需扫码即可预览文章\n   3. 1.2.0 前版本或未设置预览的情况，还需一次扫码，确认群发（如群发前，未异常报错的话）\n\n\u003e 本工具不以任何形式保存账号和密码！！！\n\n\u003e puppeteer 安装失败可以参考[这里](https://github.com/cnpm/cnpmjs.org/issues/1246#issuecomment-454268958)\n\n## 帮助文档\n\n```git\n$ wechat-mp-automation -h\nUsage: wechat-mp-automation [options]\n\nOptions:\n  -V, --version                 output the version number\n  -C, --configPath [xxx]        配置文件的本地路径（支持所有自定义参数）\n  -t, --title [xxx]             文章标题\n  -a, --author [xxx]            文章作者\n  -c, --content [xxx]           文章内容[可选]，默认从粘贴板复制\n  -u, --username [xxx]          公众号账号\n  -p, --password [xxx]          公众号密码\n  -o, --original                声明原创[可选]\n  --preview                     预览而不发布[可选]\n  --preview_username [xxx~yyy]  预览名单[可选]，以~间隔多个微信号（自行保证微信号已关注公众号）\n  --skip_typing                 跳过文章标题、作者、文章的填写和封面图片选择（声明原创除外）[可选]\n  --last_edit                   选中最近编辑的文章[可选]，请自行确保当前有“最近编辑”的文章\n  -h, --help                    output usage information\n```\n\nconfig.json demo:\n```json\n{\n  \"title\": \"test\",\n  \"author\": \"小铁匠Linus\",\n  \"username\": \"YOUR_USERNAME\",\n  \"password\": \"YOUR_PASSWORD\",\n  \"original\": \"true\"\n}\n```\n\n## CHANGELOG\n\n\u003cdetails\u003e\n\u003csummary\u003e1.3.2\u003c/summary\u003e\n\u003c/br\u003e\n\u003cp\u003e1. 适配新版本的群发界面\u003c/p\u003e\n\u003cp\u003e2. 优化二维码的截取展示\u003c/p\u003e\n\u003cp\u003e3. 优化参数读取\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e1.3.1\u003c/summary\u003e\n\u003c/br\u003e\n\u003cp\u003e1. 修复点击封面图片选择失效的问题\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e1.3.0\u003c/summary\u003e\n\u003c/br\u003e\n\u003cp\u003e1. 支持新版本的公众号后台\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e1.2.0\u003c/summary\u003e\n\u003c/br\u003e\n\u003cp\u003e1. 支持预览文章，而不发布\u003c/p\u003e\n\u003cp\u003e2. 选择预览时，支持指定预览的微信号名单（自行保证微信号已关注公众号）\u003c/p\u003e\n\u003cp\u003e3. 支持跳过填写内容，建议用于二次预览或发布的情况\u003c/p\u003e\n\u003cp\u003e4. 支持选择最近编辑的文章功能，避免每次都新建群发\u003c/p\u003e\n\u003cp\u003e5. 未指定文章内容时，采用剪贴板粘贴的方式填入内容，替换原模拟键盘输入的方式\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e1.1.1\u003c/summary\u003e\n\u003c/br\u003e\n\u003cp\u003e1. 登录默认选择账号密码登录\u003c/p\u003e\n\u003cp\u003e2. 官网页面元素的更正，恢复群发流程\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e1.1.0\u003c/summary\u003e\n\u003c/br\u003e\n\u003cp\u003e1. 支持使用 JSON 格式的本地配置文件作为参数，避免命令行泄漏关键信息\u003c/p\u003e\n\u003cp\u003e2. 支持在发布过程中展示文章内容\u003c/p\u003e\n\u003c/details\u003e\n\n## Demo\n\n1. 利用**文章内容默认从粘贴板复制**的特性，配合一行命令生成公众号内容的工具 [wechat-format-cli](https://github.com/LinusLing/wechat-format-cli) 使用更香\n\n![cli.png](https://i.loli.net/2020/06/19/GDEwdxrHnTVRyZe.png)\n\n2. 预览最近编辑的文章（用于上一次异常报错或想查看最近一次编辑的文章）\n\n![1.2.0.png](https://i.loli.net/2020/06/19/FzryZdN5VsXoplw.png)\n\n2. 自动发布成功的流程示例\n\n![CorrectResult.png](https://i.loli.net/2019/07/23/5d371a7398b4141770.png)\n\n2. 发布失败流程及失败原因\n\n![error_progress.png](https://i.loli.net/2019/07/23/5d371a73c0f5f58172.png)\n\n![ErrorResult.png](https://i.loli.net/2019/07/23/5d37086e81ff423521.png)\n\n## TODO\n\n1. 通过指定特定文件来上传文章内容\n2. 文章发布前的设置可进行自定义（比如~~预览~~、图片选择等）\n3. 支持更多种类的创作（~~图文消息~~、文字消息、视频消息、音频消息、图片消息、转载等）\n\n## Issues\n\n[意见与建议](https://github.com/LinusLing/WeChatMediaPlatformAutomation/issues/new)\n\n## 赞赏\n\n\u003cdiv style=\"float:left;border:solid 1px 000;margin:2px;\"\u003e\u003cimg src=\"https://i.loli.net/2019/07/23/5d370dca1cf1911283.jpg\" width=\"300\" height=\"450\" \u003e\u003c/div\u003e\n\u003cdiv style=\"float:left;border:solid 1px 000;margin:2px;\"\u003e\u003cimg src=\"https://i.loli.net/2019/07/23/5d370dcd23ed242202.jpg\" width=\"300\" height=\"450\" \u003e\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLinusLing%2FWeChatMediaPlatformAutomation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLinusLing%2FWeChatMediaPlatformAutomation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLinusLing%2FWeChatMediaPlatformAutomation/lists"}