MCPcopy Index your code
hub / github.com/Kaned1as/html2md

github.com/Kaned1as/html2md @0.2.10

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.10 ↗ · + Follow
118 symbols 286 edges 23 files 20 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

HTML2MD

Library to convert simple html documents into markdown flavor. Implements markdown as written on its inception page.

Features

Currently supported:

  • Lists (and inner lists)
  • Headers
  • Quotes (and inner quotes)
  • Paragraphs
  • Horizontal rulers
  • Images and links
  • Tables
  • Formatting (bold, italic, strikethrough, underline)
  • Code

Limitations

  • no markdown flavors support (-/+ unordered list styles, ##/== headers etc.)
  • doesn't yet detect code style

Used libraries

html5ever - Servo egine HTML parsing library, used to convert html input to DOM

regex - PCRE support in Rust, used to correct whitespaces

Contributions

You may create merge request or bug/enhancement issue right here on GitLab, or send formatted patch via e-mail. For details see CONTRIBUTING.md file in this repo.

License

Copyright (C) 2018-2019  Oleg `Kanedias` Chernovskiy

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Extension points exported contracts — how you extend this code

TagHandler (Interface)
Trait interface describing abstract handler of arbitrary HTML tag. [15 implementers]
src/lib.rs
TagHandlerFactory (Interface)
Tag handler factory. This class is required in providing proper custom tag parsing capabilities to users of this library [1 …
src/lib.rs

Core symbols most depended-on inside this repo

parse_html
called by 51
src/lib.rs
append_str
called by 30
src/lib.rs
insert_newline
called by 28
src/lib.rs
get_tag_attr
called by 7
src/common.rs
collect_children
called by 7
src/tables.rs
insert_str
called by 6
src/lib.rs
tag_name
called by 5
src/tables.rs
apply_at_bounds
called by 4
src/styles.rs

Shape

Function 66
Method 33
Class 17
Interface 2

Languages

Rust100%

Modules by API surface

src/lib.rs18 symbols
tests/unit.rs14 symbols
src/tables.rs9 symbols
tests/lists.rs7 symbols
tests/images.rs7 symbols
tests/tables.rs6 symbols
tests/integration.rs6 symbols
src/dummy.rs6 symbols
tests/quotes.rs5 symbols
src/styles.rs4 symbols
src/lists.rs4 symbols
src/iframes.rs4 symbols

For agents

$ claude mcp add html2md \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact