| Crates.io | mdka |
| lib.rs | mdka |
| version | 1.5.4 |
| created_at | 2024-01-04 01:42:51.990828+00 |
| updated_at | 2025-06-09 13:06:25.647687+00 |
| description | HTML to Markdown converter |
| homepage | |
| repository | https://github.com/nabbisen/mdka-rs |
| max_upload_size | |
| id | 1087989 |
| size | 303,627 |
HTML to Markdown (MD) converter written in Rust.
A kind of text manipulator named mdka. "ka" means "化 (か)" pointing to conversion.
Designed with in mind:
# Cargo.toml
[dependencies]
mdka = "1"
// awesome.rs
use mdka::from_html
fn awesome_fn() {
let input = r#"
<h1>heading 1</h1>
<p>Hello, world.</p>"#;
let ret = from_html(input);
println!("{}", ret);
// # heading 1
//
// Hello, world.
//
}
For more details about functions, check out the docs.
Assets in Releases offer executables for multiple platforms → For usage.
Bindings for Python are supported → For more examples | PyPi.
$ pip install mdka
# awesome.py
from mdka import md_from_html
print(md_from_html("<p>Hello, world.</p>"))
# Hello, world.
#
Bindings for Node.js are supported → For more examples | npm.
$ npm install mdka
// awesome.js
const { fromHtml } = require("mdka")
console.log(fromHtml("<p>Hello, world.</p>"))
// Hello, world.
//
This project is lovingly built and maintained by volunteers.
We hope it helps streamline your work.
Please understand that the project has its own direction — while we welcome feedback, it might not fit every edge case 🌱
Depends on Servo's html5ever / markup5ever. Also, on PyO3's pyo3 / maturin on bindings for Python. napi-rs for binding for Node.js.