Skip to main content

A user-friendly tool for converting Markdown to DOCX

Project description

A user-friendly tool for converting Markdown to DOCX

Installation

pip install python-md2docx

Usage

Use in CMD

md2docx --help

md2docx tests/demo.md -o tests/demo-default.docx
md2docx tests/demo.md -o tests/demo-code-as-image.docx --code-as-image
md2docx tests/demo.md -o tests/demo-render-mermaid.docx --render-mermaid 
md2docx tests/demo.md -o tests/demo-styles.docx --heading-color FF00FF --default-font Arial --chinese-font 微软雅黑

Use in Python

from md2docx.core import MD2DOCX

MD2DOCX().convert('tests/demo.md', output_file='tests/demo.docx')

MD2DOCX().convert(
    'tests/demo.md',
    output_file='tests/demo.docx',
    heading_color='FF00FF',
    default_font='Arial',
    chinese_font='微软雅黑',
    code_as_image=True,
)

Support Features

  • Heading
  • Link
  • Image
  • Table
  • Inline Code
  • Code Block
  • Code Block as Image (pygments)
  • Quote
  • Checkbox
  • Mermaid

Render Mermaid based on Mermaid Client(mmdc) install it with: npm install -g @mermaid-js/mermaid-cli

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_md2docx-1.0.3.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_md2docx-1.0.3-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file python_md2docx-1.0.3.tar.gz.

File metadata

  • Download URL: python_md2docx-1.0.3.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for python_md2docx-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a07382adf855c5e87dbcc12419fafe41505669235e0b768e3ab9b508aa8943dd
MD5 37cd9dbc74f6f9f9b3d278791b93631f
BLAKE2b-256 6c5d0ce8e0801dd1fb64b26bad2052e3a470b57eff19ecf105509c99f111dd6a

See more details on using hashes here.

File details

Details for the file python_md2docx-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: python_md2docx-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for python_md2docx-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48d1183ef822ed829e6405545a94e51b59647c5387b0f33f5e4724faccb68144
MD5 c6f78c3f4b4db9fd5fe2a4faac121c97
BLAKE2b-256 6a4036401af06a8ab9b786c477a5e2dcb786e099707e99a55374657d508542e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page