{"id":13620082,"url":"https://github.com/tim-gromeyer/html2md","last_synced_at":"2025-04-05T02:03:50.573Z","repository":{"id":64928931,"uuid":"544543209","full_name":"tim-gromeyer/html2md","owner":"tim-gromeyer","description":"Transform your HTML into clean, easy-to-read markdown with html2md.","archived":false,"fork":false,"pushed_at":"2025-03-24T20:03:35.000Z","size":1386,"stargazers_count":55,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:03:22.343Z","etag":null,"topics":["cpp-library","cpp17","html","html-to-markdown","html2markdown","html2md","html5","markdown","python3"],"latest_commit_sha":null,"homepage":"https://tim-gromeyer.github.io/html2md/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tim-gromeyer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-02T18:35:52.000Z","updated_at":"2025-03-08T20:21:16.000Z","dependencies_parsed_at":"2023-11-16T16:39:29.266Z","dependency_job_id":"6e6baa92-8d14-4ea0-9a14-07308982cd99","html_url":"https://github.com/tim-gromeyer/html2md","commit_stats":{"total_commits":88,"total_committers":5,"mean_commits":17.6,"dds":0.2272727272727273,"last_synced_commit":"edb22842a7381c16b4b76feba62c931f7f8ecedb"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tim-gromeyer%2Fhtml2md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tim-gromeyer%2Fhtml2md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tim-gromeyer%2Fhtml2md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tim-gromeyer%2Fhtml2md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tim-gromeyer","download_url":"https://codeload.github.com/tim-gromeyer/html2md/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276161,"owners_count":20912288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp-library","cpp17","html","html-to-markdown","html2markdown","html2md","html5","markdown","python3"],"created_at":"2024-08-01T21:00:52.010Z","updated_at":"2025-04-05T02:03:50.550Z","avatar_url":"https://github.com/tim-gromeyer.png","language":"C++","readme":"# html2md\n\nTransform your HTML into clean, easy-to-read markdown with html2md\n\n## Table of Contents\n\n- [What does it do](#what-does-it-do)\n- [How to use this library](#how-to-use-this-library)\n- [Supported Tags](#supported-tags)\n- [Bindings](#bindings)\n- [Requirements](#requirements)\n- [License](#license)\n\n\n## What does it do\n\nhtml2md is a fast and reliable C++ library for converting HTML content into markdown. It offers support for a wide range of HTML tags, including those for formatting text, creating lists, and inserting images and links. In addition, html2md is the only HTML to markdown converter that offers support for **table formatting**, making it a valuable tool for users who need to convert HTML tables into markdown.\n\n\n## How to use this library\n\n### CMake\n\nInstall html2md. Use eighter the prebild packages from [GitHub releases](https://github.com/tim-gromeyer/html2md/releases) or build and install it yourself.\n\nAfterwards:\n\n```cmake\nfind_package(html2md)\ntarget_link_library(your_target PRIVATE html2md)\n```\n\n### Manually\n\nTo use html2md, follow these steps:\n\n1. Clone the library: `git clone https://github.com/tim-gromeyer/html2md`\n2. Add the files `include/html2md.h` and `src/html2md.cpp` to your project\n3. Include the `html2md.h` header in your code\n4. Use the `html2md::Convert` function to convert your HTML content into markdown\n\nHere is an example of how to use the `html2md::Convert` function:\n\n```cpp\n#include \u003chtml2md.h\u003e\n\n//...\n\nstd::cout \u003c\u003c html2md::Convert(\"\u003ch1\u003efoo\u003c/h1\u003e\"); // # foo\n```\n\n## Supported Tags\n\nhtml2md supports the following HTML tags:\n\n| Tag          | Description        | Comment                                             |\n|--------------|--------------------|-----------------------------------------------------|\n| `a`          | Anchor or link     | Supports the `href`, `name` and `title` attributes. |\n| `b`          | Bold               |                                                     |\n| `blockquote` | Indented paragraph |                                                     |\n| `br`         | Line break         |                                                     |\n| `cite`       | Inline citation    | Same as `i`.                                        |\n| `code`       | Code               |                                                     |\n| `dd`         | Definition data    |                                                     |\n| `del`        | Strikethrough      |                                                     |\n| `dfn`        | Definition         | Same as `i`.                                        |\n| `div`        | Document division  |                                                     |\n| `em`         | Emphasized         | Same as `i`.                                        |\n| `h1`         | Level 1 heading    |                                                     |\n| `h2`         | Level 2 heading    |                                                     |\n| `h3`         | Level 3 heading    |                                                     |\n| `h4`         | Level 4 heading    |                                                     |\n| `h5`         | Level 5 heading    |                                                     |\n| `h6`         | Level 6 heading    |                                                     |\n| `head`       | Document header    | Ignored.                                            |\n| `hr`         | Horizontal line    |                                                     |\n| `i`          | Italic             |                                                     |\n| `img`        | Image              | Supports `src`, `alt`, `title` attributes.          |\n| `li`         | List item          |                                                     |\n| `meta`       | Meta-information   | Ignored.                                            |\n| `ol`         | Ordered list       |                                                     |\n| `p`          | Paragraph          |                                                     |\n| `pre`        | Preformatted text  | Works only with `code`.                             |\n| `s`          | Strikethrough      | Same as `del`.                                      |\n| `span`       | Grouped elements   | Does nothing.                                       |\n| `strong`     | Strong             | Same as `b`.                                        |\n| `table`      | Table              | Tables are formatted!                               |\n| `tbody`      | Table body         | Does nothing.                                       |\n| `td`         | Table data cell    | Uses `align` from `th`.                             |\n| `tfoot`      | Table footer       | Does nothing.                                       |\n| `th`         | Table header cell  | Supports the `align` attribute.                     |\n| `thead`      | Table header       | Does nothing.                                       |\n| `title`      | Document title     | Same as `h1`.                                       |\n| `tr`         | Table row          |                                                     |\n| `u`          | Underlined         | Uses HTML.                                          |\n| `ul`         | Unordered list     |                                                     |\n\n## Bindings\n\n- [Python](python/README.md)\n\n## Requirements\n\n1. A compiler with **c++11** support like *g++\u003e=9*\n\nThat's all!\n\n## License\n\nhtml2md is licensed under [The MIT License (MIT)](https://opensource.org/licenses/MIT)\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftim-gromeyer%2Fhtml2md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftim-gromeyer%2Fhtml2md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftim-gromeyer%2Fhtml2md/lists"}