Skip to content

linyi0422/wechat-tech-booklet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeChat Tech Booklet Skill

Turn technical WeChat public-account articles into offline booklets, Feishu/Lark docs, and PDF-ready knowledge-base material.

中文定位:把技术公众号沉淀成一本可离线学习、可导入飞书、可继续转 PDF 的结构化资料册。

Why This Exists

很多高质量技术内容散落在公众号里,适合碎片阅读,但不适合系统学习、知识库检索或长期归档。wechat-tech-booklet 把一批公众号文章整理成一个可复用的离线资料册流程:

  • 保留原文正文,不二次改写。
  • 下载并本地化正文图片。
  • 移除明显非技术、公告、营销类内容。
  • 按主题分章,生成总目录和索引。
  • 导入飞书后修复目录跳转,保证图片可见。
  • 最终产物适合手机阅读、知识库导入和 PDF 转换。

What It Produces

For one technical WeChat public account, the workflow can produce:

  • booklet_tech/*.md: one combined Markdown booklet.
  • booklet_tech/articles_local/: one Markdown file per article.
  • booklet_tech/images/: local image assets.
  • booklet_tech/*_index.csv and *_index.json: structured article index.
  • booklet_tech/image_download_report.json: image download audit.
  • booklet_tech/removed_non_technical_articles.csv: filtering audit.
  • A DOCX import path for Feishu/Lark with embedded images.
  • A repaired Feishu/Lark table of contents with clickable links.

Use Cases

  • Personal offline learning.
  • Importing technical articles into a private knowledge base.
  • Turning public-account archives into PDF-ready reading material.
  • Preserving technical content before links, images, or platforms become unstable.
  • Repeating the same workflow across multiple technical creators.

Workflow At A Glance

  1. Prefer the WeChat public account source over Xiaohongshu when both exist.
  2. Export article links and Markdown bodies with a local WeChat article exporter.
  3. Build a cleaned technical booklet with scripts/build_wechat_booklet.py.
  4. Convert Markdown to DOCX when Feishu/Lark needs embedded images.
  5. Import DOCX into Feishu/Lark.
  6. Rebuild TOC links with scripts/feishu_toc_from_outline.js.
  7. Delete the old unlinked TOC with scripts/feishu_cleanup_old_toc_ids.js.
  8. Verify in a real browser: readable text, visible images, clickable TOC.

Quick Start

Expected input layout:

account-folder/
  wechat_download/
    wechat_articles_manifest.csv
    articles_md/
      001 2026-01-01 - article-title.md

Build the booklet:

python .\scripts\build_wechat_booklet.py `
  --root ".\account-folder" `
  --book-title "Account Tech Notes" `
  --account-name "WeChat Account Name" `
  --author-name "Author Name" `
  --output-dir "booklet_tech"

After importing the DOCX into Feishu/Lark, fetch the outline with your Feishu tooling, then generate a linked TOC:

node .\scripts\feishu_toc_from_outline.js `
  --source ".\account-folder\booklet_tech\Account Tech Notes.md" `
  --outline ".\account-folder\booklet_tech\feishu_outline.json" `
  --doc "https://xxx.feishu.cn/docx/..." `
  --out-dir ".\account-folder\booklet_tech"

Find old unlinked TOC blocks after inserting the linked TOC:

node .\scripts\feishu_cleanup_old_toc_ids.js `
  --section ".\account-folder\booklet_tech\feishu_toc_section.json" `
  --out-dir ".\account-folder\booklet_tech"

Design Principles

  • No rewriting by default: this is an archiving and formatting workflow, not an article rewriting tool.
  • Local-first: images and Markdown are preserved locally before being imported anywhere.
  • Auditable filtering: removed posts are written to a CSV so mistakes can be reviewed.
  • Feishu-safe updates: repair the TOC with targeted block operations instead of overwriting the whole document.
  • Browser-verified output: final success means links and images work in the actual Feishu/Lark page.

Privacy

This repository contains only the reusable skill and scripts. It does not include downloaded public-account articles, images, DOCX files, cookies, tokens, or private Feishu documents.

Why Star This Repo

Star it if you want a repeatable, field-tested workflow for turning technical WeChat public-account archives into clean personal learning material. The useful part is not just downloading articles; it is the full path from source discovery to local archive, Feishu import, image preservation, TOC repair, and final browser verification.

Repository Layout

.
├── SKILL.md
├── agents/
├── references/
│   └── workflow.md
└── scripts/
    ├── build_wechat_booklet.py
    ├── feishu_cleanup_old_toc_ids.js
    └── feishu_toc_from_outline.js

About

Turn technical WeChat public-account articles into offline booklets, Feishu docs, and PDF-ready knowledge-base material.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors