← 返回
未分类 中文

markdown-to-word

Convert a Markdown file or raw Markdown string into a polished Word DOCX document. Supports custom Word template files, includes built-in DOCX templates, and...
将 Markdown 文件或原始 Markdown 字符串转换为精美的 Word DOCX 文档,支持自定义 Word 模板文件和内置 DOCX 模板。
mutour mutour 来源
未分类 clawhub v0.4.0 1 版本 99797.2 Key: 无需
★ 1
Stars
📥 472
下载
💾 0
安装
1
版本
#latest

概述

Markdown To Word

Use this skill when the user wants a Markdown file or Markdown string converted into a Word .docx document.

What this skill provides

  • Deterministic conversion through pandoc
  • Input from either a Markdown file or a raw Markdown string
  • Custom template support through --template /path/to/reference.docx
  • Built-in template pack in assets/templates/
  • Optional table of contents, numbered sections, metadata, and resource-path support

Quick workflow

  1. Choose the input source.

File input: pass --input-file /abs/path/file.md

Raw string input: pass --markdown '...'

  1. Choose the template.

Custom template wins when the user provides one.

Otherwise use a built-in template with --builtin-template.

  1. Set output path with --output /abs/path/result.docx.
  2. For long reports, prefer --toc and --number-sections.

Built-in templates

  • modern-blue: clean report style, safe default
  • executive-serif: formal memo / proposal style
  • warm-notebook: softer editorial style
  • minimal-gray: restrained documentation style

List them at runtime with:

python3 scripts/markdown_to_docx.py --list-templates

Main command

python3 scripts/markdown_to_docx.py \
  --input-file /abs/path/source.md \
  --output /abs/path/output.docx \
  --builtin-template modern-blue \
  --toc \
  --number-sections

Raw string example

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 rules

  • Prefer --template when the user already has a branded .docx reference file.
  • Use --builtin-template when no custom template is provided.
  • If both are passed, the script uses the custom template.

Metadata and assets

  • Pass --title, --author, --date, or --metadata-file
  • Use --resource-path when Markdown references local images outside the Markdown file directory
  • Example templates and a sample Markdown file live under assets/

Bundled files

  • Converter: scripts/markdown_to_docx.py
  • Built-in template generator: scripts/build_builtin_templates.py
  • Built-in templates: assets/templates/*.docx

Notes

  • This skill expects pandoc to be installed and available on PATH
  • Generated DOCX styling depends on the selected reference DOCX, so for brand fidelity a custom reference file is still the best option

版本历史

共 1 个版本

  • v0.4.0 当前
    2026-05-03 10:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 457 📥 151,883
office-efficiency

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 926 📥 186,798
office-efficiency

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 277 📥 115,987