Convert Markdown <-> DOCX easily with full formatting support
Project description
md-ops
🔄 Convert Markdown ↔️ DOCX easily
A powerful Python library for converting between Markdown and DOCX formats with ease.
📦 Installation
pip install md-ops
🚀 Quick Start
Convert Markdown to DOCX
from md_ops import md_to_docx
markdown = """
# Hello World
This is **bold** and this is *italic*.
- Item 1
- Item 2
"""
md_to_docx(markdown, "output.docx")
Convert DOCX to Markdown
from md_ops import docx_to_md
markdown = docx_to_md("input.docx")
print(markdown)
📖 API Reference
md_to_docx(markdown_text, output_path='output.docx')
Converts Markdown text to a DOCX file.
Parameters:
markdown_text(str): The Markdown content to convertoutput_path(str, optional): Output file path (default: 'output.docx')
Returns: str - Path to the created DOCX file
Example:
md_to_docx("# My Document", "my-file.docx")
docx_to_md(docx_path)
Converts a DOCX file to Markdown text.
Parameters:
docx_path(str): Path to the DOCX file
Returns: str - The Markdown content
Example:
markdown = docx_to_md("document.docx")
✨ Supported Features
Markdown → DOCX
- ✅ Headings (H1-H6)
- ✅ Bold and Italic text
- ✅
Inline code - ✅ Code blocks
- ✅ Links
- ✅ Lists (ordered & unordered)
- ✅ Blockquotes
- ✅ Horizontal rules
DOCX → Markdown
- ✅ Headings
- ✅ Text formatting (bold, italic)
- ✅ Lists
- ✅ Blockquotes
🧪 Testing
Run the included test file:
python test.py
📄 License
Proprietary © Consult Anubhav - All Rights Reserved
👨💻 Author
Consult Anubhav
Made with ❤️ for developers who need easy document conversion
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 md_ops-1.0.0.tar.gz.
File metadata
- Download URL: md_ops-1.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1fe2d8d3cd10cad6228066fe4abd6a6f94d344110ea08c11c573d02b0fd628c
|
|
| MD5 |
4303b24d8cc7904c3823eb02a8520be2
|
|
| BLAKE2b-256 |
3404b643ac845bff414a2d1ae14a505771aa8546643b9e5c18cca9033b4b862a
|
File details
Details for the file md_ops-1.0.0-py3-none-any.whl.
File metadata
- Download URL: md_ops-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea416d854117555078f9491c0bba4be108184fda747436253f1a42eb0d7db782
|
|
| MD5 |
32a435fc9958d3a213617a88a088fc4b
|
|
| BLAKE2b-256 |
6931bcaadb502ef1eb5c3b255dfc1eae63fbffa92c9f15b9d93e2534318305fd
|