Metadata-Version: 2.4
Name: repo2word
Version: 0.0.1
Summary: Convert a Python package directory into a single syntax-highlighted Word (.docx) document.
Keywords: docx,word,pandoc,pygments,documentation,source-code
Author: voorhs
Author-email: voorhs <ilya_alekseev_2016@list.ru>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Dist: pypandoc~=1.17
Requires-Python: >=3.14
Project-URL: Homepage, https://github.com/voorhs/repo2word
Project-URL: Repository, https://github.com/voorhs/repo2word
Project-URL: Issues, https://github.com/voorhs/repo2word/issues
Description-Content-Type: text/markdown

# repo2word

Convert a Python **package directory** (the folder that directly contains the root `__init__.py`) into a single Word (`.docx`) file: each `*.py` file is a section with a path heading, line numbers, and syntax-highlighted code.

## Requirements

- **Python** 3.14+
- **Pandoc** installed and on your `PATH` (or pass `pandoc_path=` to the API)

On macOS: `brew install pandoc`. On Ubuntu/Debian: `sudo apt-get install pandoc`.

## Installation

```bash
pip install repo2word
```

(or `uv add repo2word`). Pandoc is an external dependency and is **not** installed by pip — see [Requirements](#requirements).

## Usage

```python
from pathlib import Path
from repo2word import repo2word

repo2word(Path("path/to/mypackage"), Path("out.docx"))
```

`path/to/mypackage` must be the package root (it must contain `__init__.py`). The parent directory of the output `.docx` must already exist unless you pass `mkdir_parents=True`.

## Development

```bash
uv sync --all-groups
uv run ruff check . && uv run ruff format .
uv run mypy .
uv run pytest
```

## License

[Apache-2.0](./LICENSE)
