doc-convert · Markdown Layout Conversion
最后更新:

Markdown layout conversion: takes a Markdown manuscript and renders it into HTML (clean readable layout + CJK fonts), printable PDF (A4), or long-image PNG (for Moments/social posts) — one command, three formats.
Markdown only: DOCX/PPT out of scope, outlines-to-mindmaps via mindmap, WeChat-OA-specific layout via skill-wechat-publisher, posters via card-*/poster-hero. Outputs go to outputs/主题名/ uniformly.
Example invocation: "Convert this Markdown into a PDF and a long image."
Full brief
Positioning
doc-convert is a Markdown layout and multi-format converter: one input, three outputs (HTML / PDF / long-image PNG). Markdown only.
Core capabilities
- Three-format output: HTML (clean readable layout + CJK fonts) / PDF (A4 printable, for archiving/sending) / long-image PNG (for platforms without MD support, Moments archiving).
- One-command conversion:
scripts/doc_convert.py convert -i input.md -o outputs/topic/x.{html,pdf,png}. - Layout parameters: long-image
--widthtuned per platform (~750–1080 for Moments/Xiaohongshu);--page-widthcontrols the HTML/PDF text column. - Environment prerequisites: MD→HTML needs
pip install markdown; MD→PDF/PNG needs playwright + chromium.
Workflow
- Receive the Markdown file (headings, lists, tables, code blocks, quotes, images)
- Run the conversion script with the target format
- Save outputs to
outputs/主题名/
Inputs & outputs
| Input | Notes |
|---|---|
| Markdown file | Required — images must use accessible relative/absolute paths |
Output: HTML / PDF / long-image PNG, all under outputs/主题名/.
Boundaries with adjacent skills
| Skill | Lane |
|---|---|
| doc-convert (this) | Generic Markdown layout conversion (HTML/PDF/long-image) |
| mindmap | Outline → mind map |
| skill-wechat-publisher | WeChat-OA-specific layout |
| card-*/poster-hero | Card/poster design |
Fit
- Articles as long images for Moments/Xiaohongshu
- Manuscripts exported to PDF for archiving or sending
- Markdown rendered as clean HTML pages
Before you start
- Prepare the Markdown file; images need accessible paths.
- DOCX/PPT/rich-interactive layouts are out of scope.
doc-convert is part of the Aiglade Skill library. Invoke it from the Aiglade chat box in plain language.
Key numbers
- Document conversion: merging tables, batch renaming, extracting information — organizing files and data is one of Aiglade's 6 core capabilities.
- 4 built-in AIs: Claude Code, Codex CLI, Hermes, OpenClaw.
- Local database: 24 tables, 131 HTTP endpoints.
- Concurrency: up to 10 tasks by default (max 5 per agent), 8 built-in agent nodes.
- Get your gateway key in about a minute after signing up.
- Task and confirmation records stay on your machine; only the actual AI call uses the network.
FAQ
What do I get from one Markdown file?
One input, three outputs: HTML (clean readable layout + CJK fonts), printable A4 PDF, long-image PNG (for platforms without Markdown support, Moments/Xiaohongshu archiving). One command: scripts/doc_convert.py convert -i input.md -o outputs/topic/x.{html,pdf,png}.
Can it convert DOCX or PPT?
No — Markdown only. Outlines→mind maps use mindmap; WeChat-OA-specific layout uses skill-wechat-publisher; posters use card-*/poster-hero.
How wide should the long image be?
Tune --width per platform (~750–1080 for Moments/Xiaohongshu); --page-width controls the HTML/PDF text column.
What dependencies are needed?
pip install markdown for MD→HTML; Playwright + Chromium for MD→PDF/PNG. All outputs go to outputs/主题名/ uniformly.
Call it in 3 steps
- Prepare the Markdown source (images via accessible relative/absolute paths).
- Install deps:
pip install markdown; add Playwright + Chromium for PDF/PNG. - Run one command:
scripts/doc_convert.py convert -i input.md -o outputs/topic/x.{html,pdf,png}. - Or just say in chat: "Convert this Markdown into PDF and a long image."
- Collect the three outputs under
outputs/主题名/.