Metadata-Version: 2.4
Name: mdka
Version: 1.5.3
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Intended Audience :: Developers
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Classifier: Operating System :: OS Independent
License-File: LICENSE
Summary: HTML to Markdown converter
Keywords: html,markdown,parser,conversion
Author: nabbisen <nabbisen@scqr.net>
Author-email: nabbisen <nabbisen@scqr.net>
License: Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Source Code, https://github.com/nabbisen/mdka-rs

# mdka: Bindings for Python

**HTML to Markdown (MD)** converter written in [Rust](https://www.rust-lang.org/).

## Summary

A kind of text manipulator named mdka. "ka" means "化 (か)" pointing to conversion.    
Designed with in mind:

- Fast speed
- Low memory consumption
- Easy usage

Bindings for Python are supported. Functions are available Python scripts can import. For more details about functions, check out [the docs](https://github.com/nabbisen/mdka-rs/blob/main/docs/functions.md).

## Install

```console
$ pip install mdka
```

---

## Usage

### Convert from HTML text

```python
from mdka import from_html

print(from_html("<p>Hello, world.</p>"))
# Hello, world.
# 
```

### Convert from HTML file

```python
from mdka import from_file

print(from_file("tests/fixtures/simple-01.html"))
# Hello, world.
# 
```

### Convert from HTML text and write the result to file

```python
from mdka import from_html_to_file

from_html_to_file("<p>Hello, world.</p>", "tests/tmp/out.md", False)
```

### Convert from HTML file and write the result to file

```python
from mdka import from_file_to_file

from_file_to_file("tests/fixtures/simple-01.html", "tests/tmp/out.md", False)
```

---

## Open-source, with care

This project is lovingly built and maintained by volunteers.  
We hope it helps streamline your API development.  
Please understand that the project has its own direction — while we welcome feedback, it might not fit every edge case 🌱

## Acknowledgements

Depends on Servo's [html5ever](https://github.com/servo/html5ever) / markup5ever.
Also, on PyO3's [pyo3](https://github.com/PyO3/pyo3) / [maturin](https://github.com/PyO3/maturin) on bindings for Python. [napi-rs](https://github.com/napi-rs/napi-rs) for binding for Node.js.

