Skip to main content

md2docx-cn

tests release

把 UTF-8 Markdown 中文文章转换成排版整洁的 Word 文档,适合投稿、方案、 公众号长文留档和日常办公交付。

免费下载最新版 · 提交定制需求 · 邮件咨询

实际效果

下面是仓库内 examples/sample.md 经过本工具转换后的真实 Word 页面,预览图由生成的 DOCX 直接渲染,未使用 AI 模拟排版。

md2docx-cn 生成的中文 Word 文档预览

能做什么

  • 识别一至三级标题、普通段落、项目符号、编号步骤和引用。
  • 自动应用中文字体、首行缩进、行距、页边距和标题层级。
  • 写入文档标题与作者元数据。
  • Windows、macOS 和 Linux 均可运行,输入文件保持在本机处理。

30 秒开始使用

需要 Python 3.10 或更高版本。

python -m pip install md2docx-cn
md2docx-cn article.md -o article.docx --author "你的名字"

article.md 替换为自己的 Markdown 文件。文件只在本机处理,不会上传。

需要查看源码或其他版本,可进入 Releases;开发者也可以克隆仓库后 使用 python -m pip install -e . 安装。

支持的 Markdown

# 文档标题

普通正文段落。

## 小节

- 项目一
- 项目二

1. 第一步
2. 第二步

> 一段引用或提示。

商业服务

免费版适合通用中文文章。需要匹配单位模板、投稿格式或批量流程时,可在 定制排版 Issue 中说明需求。

试运营参考价:

  • 99 元:调整一套现有排版参数。
  • 299 元:制作一套专用 Word 模板,含一次修改。
  • 699 元起:批量转换、目录规则或现有工作流集成。
  • 999 元起:团队内部工具、品牌化封装或 OEM 集成。
  • 199 元/月起:模板维护、兼容性升级和优先技术支持。

完整服务边界、交付内容和合作流程见 商业服务说明。基础代码仍按 MIT License 开放;收费部分是需求分析、私有模板、集成实施、维护和支持。

业务联系邮箱:1066536086@qq.com。提交公开 Issue 后, 请通过邮件发送 Issue 链接;报价、支付宝付款方式、私有材料和交付信息均不在公开 Issue 中传递。付款节点和验收规则见 付款与交付说明。

提交需求不等于下单。先确认文件格式、交付边界、价格和时间,再决定是否合作; Issue 是公开页面,请勿上传隐私材料、未发表全文、密钥或客户数据。

验证

$env:PYTHONPATH = "src"
python -m unittest discover -s tests -v

当前边界

  • 这是聚焦中文文章的 Markdown 子集转换器,不追求完整 CommonMark 兼容。
  • 暂不解析图片、复杂表格、脚注、公式和嵌套列表。
  • 不上传文档,不包含遥测,也不需要账号或 API 密钥。

开源许可

代码使用 MIT License。免费版可以自由使用和修改;付费服务出售的是 模板适配、批量自动化、部署和支持,而不是限制用户使用基础代码。

Metadata

Release files for md2docx-cn 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md2docx-cn 0.1.2
File Size Uploaded
md2docx_cn-0.1.2.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for md2docx-cn 0.1.2
File Interpreter ABI Platform
md2docx_cn-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / md2docx_cn-0.1.2.tar.gz

Download URL md2docx_cn-0.1.2.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08e2404dd395d60338cac298de8c63cc398edcf7fa04d7bc3417ffd133d40551
BLAKE2b-256 checksum
How to use checksums
1ec96b7eaa89c3945935b2c931168e00108cad420f90ece06762de9903ca7347
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / md2docx_cn-0.1.2-py3-none-any.whl

Download URL md2docx_cn-0.1.2-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b42526e740cfa6ab850f280e994dc79089053f1e8ecacfa3aadce9aae43af7a9
BLAKE2b-256 checksum
How to use checksums
b46d0469d5388d7a43eb191d7b90b0021570723451c353c9ab12b6be2c3a78bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page