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.0.tar.gz
(13.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_md2docx-1.0.0.tar.gz.
File metadata
- Download URL: python_md2docx-1.0.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f710f21fb5b56314fbe21f0f0b339238447e7e863303b88034e451cccef80bcd
|
|
| MD5 |
39e61560bb607bd954564b732c220251
|
|
| BLAKE2b-256 |
5f4fe964b327d4188cdbba6abc9a3793ffc70f21db4aa7b0cc8d2ac93521670d
|
File details
Details for the file python_md2docx-1.0.0-py3-none-any.whl.
File metadata
- Download URL: python_md2docx-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1f9d3c46301f04056f9f401f305139929a66e7f1d35571c78597cc9d31b4447
|
|
| MD5 |
2836612d03e0d00d9a775f3e7da4d7fc
|
|
| BLAKE2b-256 |
60e0d9c1dadb08bc0eef453b756e4b160645551ef3c10e2186aae49f56146d27
|