将 Markdown 文件或原始 Markdown 字符串转换为精美的 Word DOCX 文档,支持自定义 Word 模板文件和内置 DOCX 模板。
Use this skill when the user wants a Markdown file or Markdown string converted into a Word .docx document.
pandoc--template /path/to/reference.docxassets/templates/--input-file /abs/path/file.md
Raw string input: pass --markdown '...'--builtin-template.--output /abs/path/result.docx.--toc and --number-sections.modern-blue: clean report style, safe defaultexecutive-serif: formal memo / proposal stylewarm-notebook: softer editorial styleminimal-gray: restrained documentation styleList them at runtime with:
bash
python3 scripts/markdown_to_docx.py --list-templates
bash
python3 scripts/markdown_to_docx.py \
--input-file /abs/path/source.md \
--output /abs/path/output.docx \
--builtin-template modern-blue \
--toc \
--number-sections
bash
python3 scripts/markdown_to_docx.py \
--markdown '# Weekly Report\n\n- Finished template system\n- Integrated pandoc' \
--output /abs/path/weekly-report.docx \
--builtin-template executive-serif \
--title 'Weekly Report'
--template when the user already has a branded .docx reference file.--builtin-template when no custom template is provided.--title, --author, --date, or --metadata-file--resource-path when Markdown references local images outside the Markdown file directoryassets/scripts/markdown_to_docx.pyscripts/build_builtin_templates.pyassets/templates/*.docxpandoc to be installed and available on PATH