Metadata-Version: 2.4
Name: dm2xcod
Version: 0.3.8
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: File Formats
Summary: DOCX to Markdown converter written in Rust
Keywords: docx,markdown,converter,document
Home-Page: https://github.com/KimSeogyu/dm2xcod
License: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/KimSeogyu/dm2xcod
Project-URL: Issues, https://github.com/KimSeogyu/dm2xcod/issues
Project-URL: Repository, https://github.com/KimSeogyu/dm2xcod

# dm2xcod

[![PyPI](https://img.shields.io/pypi/v/dm2xcod.svg)](https://pypi.org/project/dm2xcod/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

DOCX to Markdown converter. Written in Rust with Python bindings.

## Features

- Converts `.docx` files to Markdown format
- Preserves heading hierarchy, text formatting (bold, italic, underline), tables, and images
- Handles DOCX numbering (ordered/unordered lists)
- Korean heading localization support (`--lang ko`)

## Requirements

- Rust 1.75+
- Python 3.12+ (for Python bindings)

## Installation

### Python

```bash
pip install dm2xcod
```

### Rust

```toml
[dependencies]
dm2xcod = "0.1"
```

### CLI

```bash
cargo install dm2xcod
```

## Usage

### Python

```python
import dm2xcod

markdown = dm2xcod.convert_docx("document.docx")
print(markdown)
```

### Rust

```rust
use dm2xcod::{DocxToMarkdown, ConvertOptions};

let converter = DocxToMarkdown::new(ConvertOptions::default());
let markdown = converter.convert("document.docx").unwrap();
```

### CLI

```bash
dm2xcod input.docx output.md
dm2xcod input.docx --lang ko  # Korean heading localization
```

## Build from Source

```bash
# Rust library
cargo build --release

# Python wheel
pip install maturin
maturin develop --features python
```

## License

MIT

