Metadata-Version: 2.4
Name: multi_convert
Version: 0.1.3
Summary: A python package for converting multiple document formats
Home-page: https://github.com/tasteslikecobrachicken/multi_convert
Author: Cobra Chicken
Author-email: Cobra Chicken <tasteslikecobrachicken@gmail.com>
Project-URL: Homepage, https://github.com/tasteslikecobrachicken/multi_convert
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: markdown>=3.5
Requires-Dist: markdown-pdf>=1.4
Requires-Dist: html2text>=2024.2.26
Requires-Dist: pypdf>=4.0
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# multi_convert

Python package for converting document formats between Markdown, HTML, and PDF.

## Installation

```bash
pip install multi_convert
```

Requires Python 3.10 or newer.

## Usage

### Library

```python
from multi_convert import convert

convert("notes.md", "notes.pdf")
convert("page.html", "page.md")
```

Both formats are inferred from the file extensions. `convert` returns the output
path and raises `ConversionError` if the input is missing or either extension is
not one of `.md`, `.html`, or `.pdf`.

### Command line

```bash
multi-convert notes.md notes.pdf
```

## Supported conversions

| From | To |
| --- | --- |
| Markdown | HTML, PDF |
| HTML | Markdown, PDF |
| PDF | Markdown, HTML |

Every conversion routes through Markdown as an intermediate representation.
Because PDF text extraction recovers plain text only, converting *from* PDF
loses headings, tables, and emphasis; the other five directions preserve
structure.

## License

MIT
