Metadata-Version: 2.2
Name: md_to_docx
Version: 0.1.0
Summary: Convert Markdown to DOCX with support for Mermaid diagrams
Author-email: Your Name <your.email@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/md_to_docx
Project-URL: Bug Tracker, https://github.com/yourusername/md_to_docx/issues
Keywords: markdown,docx,mermaid,converter
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Text Processing :: Markup
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.28.1
Requires-Dist: mcp[cli]>=1.3.0
Requires-Dist: markdown>=3.7
Requires-Dist: python-docx>=1.1.2
Requires-Dist: beautifulsoup4>=4.13.3
Requires-Dist: pillow>=11.1.0
Requires-Dist: requests>=2.32.3

# md_to_docx

A Python tool to convert Markdown documents to DOCX format with special support for Mermaid diagrams.

## Features

- Convert Markdown to DOCX while preserving formatting
- Render Mermaid diagrams as images in the resulting DOCX file
- Support for common Markdown elements:
  - Headers
  - Lists (ordered and unordered)
  - Tables
  - Bold and italic text
  - Code blocks
  - And more!

## Installation

```bash
pip install md_to_docx
```

## Usage

### Command Line

```bash
md-to-docx input.md output.docx
```

### Python API

```python
from md_to_docx import md_to_docx

# Convert markdown to docx
md_to_docx("path/to/input.md", "path/to/output.docx")

# Or with string content
markdown_content = "# Hello World\n\nThis is a test."
md_to_docx(markdown_content, "output.docx")
```

### MCP Server

This tool can also be used as an MCP server:

```python
from mcp.client import Client

client = Client()
result = client.md_to_docx(md_content="# Hello World", output_file="output.docx")
```

## Mermaid Support

The tool automatically renders Mermaid diagrams found in the Markdown. Example:

````markdown
```mermaid
graph TD
    A[Start] --> B{Decision}
    B -->|Yes| C[Do Something]
    B -->|No| D[Do Nothing]
```
````

## Requirements

- Python 3.8+
- Dependencies are automatically installed with the package

## License

MIT
