mdka
HTML to Markdown (MD) converter written in Rust.
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
Development with Rust and cargo
Cargo.toml
[]
= "1"
awesome.rs
use from_html
Executable
Assets in Releases offer executables for multiple platforms.
$ ./mdka
converted-to-markdown-text will be printed
Executable help
$ ./mdka -h
Usage:
-h, --help : Help is shown.
: Direct parameter is taken as HTML text to be converted. Either this or is required.
-i : Read HTML text from it. Optional.
-o : Write Markdown result to it. Optional.
--overwrites : Overwrite if Markdown file exists. Optional.
Examples:
./mdka "Hello, world."
./mdka -i input.html
./mdka -o output.md "Hello, world."
./mdka -i input.html -o output.md --overwrites
Python integration
Bindings for Python are supported. Python scripts can import this Rust library to use the functions.
Install:
$ pip install mdka
awesome.py
# Hello, world.
#
More Python code examples with specs are here.
Acknowledgements
Depends on Servo's html5ever / markup5ever. Also, on PyO3's pyo3 / maturin on bindings for Python.