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.4.tar.gz
(13.5 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.4.tar.gz.
File metadata
- Download URL: python_md2docx-1.0.4.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e169fb5bbd8ccdfc0894dd73f9c0c3d87b7fafa50bcbbd007ce8766ad56fc70e
|
|
| MD5 |
0045f7466db178b34aa56a16f14690e5
|
|
| BLAKE2b-256 |
32b4993c8fa0ae304de5d6301bdb15b269d903224d779204e9e43239a18d997a
|
File details
Details for the file python_md2docx-1.0.4-py3-none-any.whl.
File metadata
- Download URL: python_md2docx-1.0.4-py3-none-any.whl
- Upload date:
- Size: 18.2 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 |
b5539db2b5c2273b2a9393f6631129c18e767a74b13cced2360f5ef53d2d0292
|
|
| MD5 |
a35486ee6b8deb113cea3200a36b537a
|
|
| BLAKE2b-256 |
f4c397287e36e7eda9b1cab53612ffeffd5ec73865fc998849b57cca5e0de042
|