← ClaudeAtlas

md-to-docslisted

Export a folder of Markdown files into polished per-file .pdf AND .docx documents, with Mermaid diagrams rendered as real images and full Thai-language support. Use whenever the user wants to turn .md docs into shareable/printable Word or PDF deliverables — e.g. "แปลง md เป็น pdf/docx", "export เอกสารเป็น Word", "ทำเอกสารส่งจาก markdown", "รวมสเปกเป็น pdf", "convert these markdown files to documents", "make printable docs from this folder". Each .md becomes its own PDF + DOCX (not one merged file). Do NOT use for authoring/analyzing the content itself (that is system-analyst) or for a single throwaway HTML preview.
UMIN1703/system-analyst-skill · ★ 0 · Data & Documents · score 60
Install: claude install-skill UMIN1703/system-analyst-skill
# md-to-docs Turn a directory of Markdown into engineering-grade deliverables: **one `.pdf` and one `.docx` per source file**, with Mermaid fenced blocks rendered to real images (not code text), GFM tables, blockquotes, and Thai text that renders correctly in both formats. The pipeline renders each file in a real Chrome instance (so Mermaid runs natively), prints to PDF, then screenshots each diagram to PNG and embeds it into the DOCX. ## When to use - User has `.md` specs/docs and wants `.docx`, `.pdf`, or both to share, print, or hand off. - Content contains ```mermaid diagrams, tables, or Thai text that must survive export. Not for: writing the content (→ `system-analyst`), or a quick one-off HTML page. ## Prerequisites - **Node ≥ 18** (`node -v`). - **A Chromium-based browser installed** — Google Chrome, Chromium, or Edge. The script auto-detects it; override with `CHROME_PATH=/path/to/chrome`. - **Thai fonts** (recommended for Thai docs): IBM Plex Sans Thai, Sarabun, or Noto Sans Thai. Without one, Thai may render as boxes. The CSS falls back through all three. ## How to run 1. **Install deps once** (only if `node_modules/` is missing in the skill dir): ```bash cd <skill-dir> && npm install ``` 2. **Build** — pass the folder that holds the `.md` files: ```bash node build.js <sourceDir> [outDir] ``` - `sourceDir` — folder containing the `.md` files (required). - `outDir` — where to write `.pdf`/`.docx` (optional; defaults to `sourceDir`)