mdka 1.3.2

HTML to Markdown converter
Documentation

mdka

HTML to Markdown (MD) converter written in Rust.

crates.io Documentation License Dependency Status

Summary

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

  • Fast speed
  • Low memory consumption
  • Easy usage

Usage

Executable

Releases' Assets offer executables for multiple platforms.

$ ./mdka <html-text> # not html file path

Development with Rust and cargo

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.
    // 
}

Python integration

As of 1.3.1, this library can be called from Python script. Releases' Assets offer .whl for multiple platforms.

Install:

$ pip install ./${RELEASES_ARTIFACT_FOR_PLATFORM}.whl

awesome.py

from mdka import md_from_html

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

Acknowledgements

Depends on Servo's html5ever / markup5ever.