{"id":19164995,"url":"https://github.com/selfboot/html2notion","last_synced_at":"2025-04-09T21:18:13.664Z","repository":{"id":149355111,"uuid":"615337733","full_name":"selfboot/html2notion","owner":"selfboot","description":"This tool can accurately convert HTML to Notion notes and is also useful for exporting Evernote notes to Notion.","archived":false,"fork":false,"pushed_at":"2023-05-20T10:17:54.000Z","size":7013,"stargazers_count":116,"open_issues_count":5,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T21:18:08.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/selfboot.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":"2023-03-17T13:21:51.000Z","updated_at":"2025-04-09T00:02:13.000Z","dependencies_parsed_at":"2023-07-03T02:11:07.029Z","dependency_job_id":null,"html_url":"https://github.com/selfboot/html2notion","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfboot%2Fhtml2notion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfboot%2Fhtml2notion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfboot%2Fhtml2notion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfboot%2Fhtml2notion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selfboot","download_url":"https://codeload.github.com/selfboot/html2notion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"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":[],"created_at":"2024-11-09T09:26:01.322Z","updated_at":"2025-04-09T21:18:13.642Z","avatar_url":"https://github.com/selfboot.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003eHtml2notion \u003ca href='https://github.com/selfboot/html2notion/blob/master/README_zh.md'\u003e简体中文\u003c/a\u003e\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/selfboot/html2notion/actions/workflows/python-package.yml\"\u003e\n    \u003cimg src=\"https://github.com/selfboot/html2notion/actions/workflows/python-package.yml/badge.svg\" alt=\"CI Test Status\"\u003e\n  \u003c/a\u003e\n \u003ca href=\"https://codecov.io/gh/selfboot/html2notion\" \u003e\n \u003cimg src=\"https://codecov.io/gh/selfboot/html2notion/branch/master/graph/badge.svg?token=SIM6I7BZU6\" alt=\"Test coverage\"/\u003e\n \u003c/a\u003e\n\u003c/p\u003e\n\nhtml2notion is an incredibly useful tool written in Python, which allows you to import content from HTML documents into Notion notes, making it more convenient for you to organize information on the Notion platform. In addition, html2notion has been specifically optimized for the content of Evernote, and you can also use it to import notes from Evernote into Notion.\n\nhtml2notion has powerful features and supports converting various tags in HTML files into corresponding Blocks in Notion, such as rich text blocks, headings, images, code blocks, quotes, links, etc. Below are examples of converting notes from Evernote into Notion pages.\n\n![yinxiang notion(simple demos)](https://raw.githubusercontent.com/selfboot/html2notion/master/demos/yinxiang_notion.png)\n\n![yinxiang notion2(rich text)](https://raw.githubusercontent.com/selfboot/html2notion/master/demos/yinxiang_notion2.png)\n\n# Prepare\n\nYou only need 3 steps to use htmlnotion to import HTML into Notion.\n\n## Duplicate database\n\nClick the link [notion template](https://selfboot.notion.site/selfboot/130bb48c6cbd4abbbb713d4d8472481a?v=ddda20d3f46b4b44a055d06792c142f0). As shown in the image below, use the \"Duplicate\" button to copy a new database to your own Notion workspace.\n\n![notion template](https://raw.githubusercontent.com/selfboot/html2notion/master/demos/notion_templage.png)\n\n## Install html2notion\n\nRequires python\u003e=3.8, install the html2notion library. You can use the pip command to install it:\n\n```\npip install html2notion\n```\n\n## Prepare Notion Configuration\n\nWe need to use the `Notion API key` and `Database ID` to authorize html2notion to access the Notion database. Please follow these steps:\n\n1. Create an integration;\n2. Share a database with your integration;\n3. Export the database ID;\n\nWhen sharing the database here, you need to choose the previously duplicated database because the import operation requires some preset [properties](https://developers.notion.com/reference/property-object) information in this database.\n\nFor specific methods, please refer to the Notion official documentation [create an integration](https://developers.notion.com/docs/create-a-notion-integration).\n\nAfter the setup is complete, write your API Key and database ID into a configuration file config.json.\n\n```shell\n{\n    \"notion\": {\n        \"database_id\": \"\u003c***demo***\u003e\",\n        \"api_key\": \"\u003c***demo***\u003e\"\n    }\n}\n```\n\n# Usage\n\nYou can use `html2notion -h` to view detailed help documentation.\n\n```shell\nusage: html2notion [-h] --conf CONF [--log LOG] [--batch BATCH] (--file FILE | --dir DIR)\n\nHtml2notion: Save HTML to your Notion notes quickly and easily, while keeping the original format as much as possible\n\noptions:\n  -h, --help     show this help message and exit\n  --conf CONF    conf file path\n  --log LOG      log direct path\n  --batch BATCH  batch save concurrent limit\n  --file FILE    Save single html file to notion\n  --dir DIR      Save all html files in the dir to notion\n```\n\nFor example, if you want to import all html files in the `./demos` directory into Notion, you can use the following command:\n\n```shell\nhtml2notion --conf config.json --dir ./demos --log ~/logs --batch 10\n```\n\nThe above command will import all html files in the `./demos` directory into Notion, while outputting logs to the `~/logs` directory, with up to 10 concurrent tasks.\n\n# More information\n\nYou can find more information and examples in the html2notion library's Issue: [html2notion](https://github.com/selfboot/html2notion/issues)\n\n## Contribution\n\nIf you find any errors or have any suggestions for improvement, please do not hesitate to submit a pull request or raise an issue, I am more than happy to accept your contributions and feedback!\n\nIf you encounter import failures, you can submit the html file and log file together in the issue for easier problem identification.\n\n\u003e If there are any private information in the files, please remove it first.\n\n\n## License\n\nThis project uses the MIT license. Please refer to the [LICENSE](./LICENSE) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfboot%2Fhtml2notion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselfboot%2Fhtml2notion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfboot%2Fhtml2notion/lists"}