You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mdka

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdka

HTML to Markdown converter

1.5.4
pipPyPI
Maintainers
1

mdka: Bindings for Python

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

Bindings for Python are supported. Functions are available Python scripts can import. For more details about functions, check out the docs.

Install

$ pip install mdka

Usage

Convert from HTML text

from mdka import from_html

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

Convert from HTML file

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

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

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 / markup5ever. Also, on PyO3's pyo3 / maturin on bindings for Python. napi-rs for binding for Node.js.

Keywords

html

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts