Metadata-Version: 2.4
Name: email2md
Version: 0.1.3
Summary: Pure Python EML and MSG converter
Author-email: Li Yang <hewliyang@u.nus.edu>
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: extract-msg>=0.55.0
Requires-Dist: markdownify>=0.13.1
Description-Content-Type: text/markdown

# email2md

Convert email files (`.eml`, `.msg`) to **Markdown** (default) or **HTML**.

## Install

```bash
pip install email2md
```

## CLI usage

Prefix with `uvx` to run as a portable tool "without installing".

```bash
# markdown (default)
email2md message.msg

# HTML
email2md message.eml --html

# read from stdin
cat message.msg | email2md > message.md

# save attachments, reference image instead of inlining as b64
email2md message.msg --save-attachments --reference-images -o ./output > message.md
```

For all flags:

```bash
email2md --help
```

## Python usage

```python
from email2md import ConvertOptions, to_markdown

md = to_markdown(
    "message.eml",
    ConvertOptions(include_headers=True, save_attachments=False, inline_images=True),
)
```
