🧪 Skills
wechat-pack
Convert local .docx or Markdown files into WeChat-ready HTML and generate a publish folder (source/assets/cover/wechat). Use when packaging documents for WeC...
v1.0.0
Description
name: wechat-pack description: Convert local .docx or Markdown files into WeChat-ready HTML and generate a publish folder (source/assets/cover/wechat). Use when packaging documents for WeChat public account publishing with local assets and copy-paste HTML output. 当用户要求打包微信文章、转换文章为微信格式、微信公众号排版、生成微信推文 HTML、或将 Markdown/Word 转成微信可粘贴的格式时触发。
WeChat Pack
Quick start
Run from the skill root:
./wechat_pack path/to/article.docx
./wechat_pack path/to/article.md
Outputs a publish folder with:
source/original input fileassets/downloaded or extracted imagescover/optional cover imagewechat/article.htmlready to paste into WeChat editormeta.jsonmetadata (title, paths, asset count, cover variants)
Supported inputs
.docx(requirespandocinstalled).md/.markdown.html/.htm(treated as already-converted HTML)
Recommended workflow
- Export the document from your editor to
.docxor.md. - Run
./wechat_pack <file>. - Open
wechat/article.htmland paste into the WeChat editor.
Options
--out <dir>: output directory (default:<basename>-wechat)--title <title>: insert a top-level title if missing--cover <path-or-url>: download or copy a cover image intocover/
Notes
- For
.docxconversion,pandocmust be available inPATH. - The script downloads external images and rewrites
<img>to localassets/paths. - Output HTML is styled with inline CSS to be friendly to the WeChat editor.
- If Pillow is available, cover variants are generated in
cover/:cover-wide-2.35x1.jpgandcover-square-1x1.jpg.
Reviews (0)
Sign in to write a review.
No reviews yet. Be the first to review!
Comments (0)
No comments yet. Be the first to share your thoughts!