{"id":15130793,"url":"https://github.com/spider-rs/html2md","last_synced_at":"2025-10-23T07:30:50.390Z","repository":{"id":257789528,"uuid":"860892935","full_name":"spider-rs/html2md","owner":"spider-rs","description":"Fast HTML to markdown lib for Rust","archived":false,"fork":false,"pushed_at":"2024-12-03T15:16:23.000Z","size":1262,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T09:19:10.417Z","etag":null,"topics":["html","html2md","markdown","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/fast_html2md/latest/html2md/","language":"HTML","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/spider-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T12:57:13.000Z","updated_at":"2024-12-18T20:53:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"0446f7d8-1d80-4951-9a9b-290adaceabcb","html_url":"https://github.com/spider-rs/html2md","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"3093a04bcfa02771cf693cf51d23f2730c9f06de"},"previous_names":["spider-rs/html2md"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spider-rs%2Fhtml2md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spider-rs%2Fhtml2md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spider-rs%2Fhtml2md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spider-rs%2Fhtml2md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spider-rs","download_url":"https://codeload.github.com/spider-rs/html2md/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237793907,"owners_count":19367421,"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":["html","html2md","markdown","rust"],"created_at":"2024-09-26T03:06:17.632Z","updated_at":"2025-10-23T07:30:42.716Z","avatar_url":"https://github.com/spider-rs.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# fast_html2md\n\nThe fastest Rust library for transforming HTML into Markdown. Designed for performance and ease-of-use in Rust projects.\n\n## Installation\n\nAdd `fast_html2md` to your `Cargo.toml`:\n\n```sh\ncargo add fast_html2md\n```\n\n## Usage\n\nBelow are examples to get started quickly. The library provides several methods depending on your needs.\n\n### Using the Rewriter (Default)\n\nWith the default `rewriter` feature, recommended for high performance:\n\n```rust\nlet md = html2md::rewrite_html(\"\u003cp\u003eJAMES\u003c/p\u003e\", false);\nassert_eq!(md, \"JAMES\");\n```\n\n### With Async Streaming\n\nFor handling large or concurrent workloads, use async streaming with the `stream` and `rewriter` feature. Ensure you have a tokio async runtime:\n\n```rust\nlet md = html2md::rewrite_html_streaming(\"\u003cp\u003eJAMES\u003c/p\u003e\", false).await;\nassert_eq!(md, \"JAMES\");\n```\n\n### Using the Scraper\n\nFor a different approach, enable the `scraper` feature:\n\n```rust\nlet md = html2md::parse_html(\"\u003cp\u003eJAMES\u003c/p\u003e\", false);\nassert_eq!(md, \"JAMES\");\n```\n\n## Features\n\n- **rewriter:** High performance transformation using the `rewriter` feature (default).\n- **scraper:** Alternative approach for HTML parsing with the `scraper` feature.\n- **stream:** enables streaming chunks for rewriter.\n\n### About\n\nThe features are split to help you choose the library you need. If your project heavily depends on [`scraper`](https://docs.rs/html5ever/latest/html5ever/) and you need to keep the binary small, you can enable just that feature flag. The same applies to the `rewriter` feature using [`lol_html`](https://docs.rs/lol_html/latest/lol_html/). This project is actively used in production at [Spider](https://spider.cloud).\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspider-rs%2Fhtml2md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspider-rs%2Fhtml2md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspider-rs%2Fhtml2md/lists"}