{"id":22555882,"url":"https://github.com/inkdropapp/html2markdown","last_synced_at":"2025-04-10T05:20:38.284Z","repository":{"id":37824560,"uuid":"171076289","full_name":"inkdropapp/html2markdown","owner":"inkdropapp","description":"It converts HTML to Markdown based on remark and rehype.","archived":false,"fork":false,"pushed_at":"2025-03-11T04:22:57.000Z","size":1485,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T06:45:17.474Z","etag":null,"topics":["html","markdown","mdast","micromark","rehype","remark"],"latest_commit_sha":null,"homepage":"https://www.inkdrop.app/","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/inkdropapp.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}},"created_at":"2019-02-17T03:07:06.000Z","updated_at":"2025-03-11T04:23:02.000Z","dependencies_parsed_at":"2023-02-15T03:16:53.117Z","dependency_job_id":null,"html_url":"https://github.com/inkdropapp/html2markdown","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Fhtml2markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Fhtml2markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Fhtml2markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkdropapp%2Fhtml2markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inkdropapp","download_url":"https://codeload.github.com/inkdropapp/html2markdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161483,"owners_count":21057600,"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","markdown","mdast","micromark","rehype","remark"],"created_at":"2024-12-07T19:09:15.250Z","updated_at":"2025-04-10T05:20:38.259Z","avatar_url":"https://github.com/inkdropapp.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# html2markdown\n\nIt converts HTML to Markdown using [remark][] and [rehype][].\n\n## install\n\n```sh\nnpm install @inkdropapp/html2markdown\n```\n\n## How to use\n\nSay we have the following markdown file, `example.md`:\n\n```markdown\n\u003ch1\u003eHello, world!\u003c/h1\u003e\n```\n\nAnd our script, `example.js`, looks as follows:\n\n```js\nimport { html2Markdown } from '@inkdropapp/html2markdown'\nimport fs from 'fs'\n\nconst doc = fs.readFileSync('example.md')\n\nconst md = html2Markdown(doc)\n\nconsole.log(md)\n```\n\nNow, running `node example` yields:\n\n```js\n# Hello, world!\n```\n\n## API\n\n### `html2Markdown(html, options)`\n\nConverts the given HTML to Markdown.\n\n#### Options\n\n- `options.toMdast` — The options for [hast-util-to-mdast][]\n- `options.stringify` — The formatting options for [mdast-util-to-markdown][]\n\n## License\n\n[MIT][license] © [Takuya Matsuyama][author]\n\n[remark]: https://github.com/remarkjs/remark\n[rehype]: https://github.com/rehypejs/rehype\n[hast-util-to-mdast]: https://github.com/syntax-tree/hast-util-to-mdast\n[mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown#formatting-options\n[license]: LICENSE\n[author]: https://www.craftz.dog/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkdropapp%2Fhtml2markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finkdropapp%2Fhtml2markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkdropapp%2Fhtml2markdown/lists"}