{"id":13907773,"url":"https://github.com/kaedea/notion-down","last_synced_at":"2025-03-26T14:31:27.673Z","repository":{"id":46053196,"uuid":"364654477","full_name":"kaedea/notion-down","owner":"kaedea","description":"Notion \u003e\u003e Markdown. Python utility that converts Notion pages into MD files, along with intergation to build static webpages such as Hexo | 自动从 Notion 笔记生成 MD 文件，并部署到 Hexo 静态博客 | Notion Pages より Markdown Files をコンバートする、更に Hexo Webpages までの自動化も可能","archived":false,"fork":false,"pushed_at":"2023-08-02T08:23:08.000Z","size":469,"stargazers_count":120,"open_issues_count":4,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T23:11:41.946Z","etag":null,"topics":["devops","hexo","markdown","notion","notion-blog","notion-markdown"],"latest_commit_sha":null,"homepage":"https://kaedea.notion.site/NotionDown-README-d3463f3d398743879d663caf87efa029","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaedea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2021-05-05T17:22:43.000Z","updated_at":"2025-03-15T17:01:29.000Z","dependencies_parsed_at":"2024-10-30T02:32:06.527Z","dependency_job_id":null,"html_url":"https://github.com/kaedea/notion-down","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fnotion-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fnotion-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fnotion-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaedea%2Fnotion-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaedea","download_url":"https://codeload.github.com/kaedea/notion-down/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245670722,"owners_count":20653409,"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":["devops","hexo","markdown","notion","notion-blog","notion-markdown"],"created_at":"2024-08-06T23:02:09.939Z","updated_at":"2025-03-26T14:31:27.266Z","avatar_url":"https://github.com/kaedea.png","language":"Python","readme":"\n# Notion Down\n\n[🇨🇳](https://www.kaedea.com/2021/05/01/devops/project-notion-down/) [🇯🇵](https://www.kaedea.com/2021/05/01/devops/project-notion-down-jp/)\n\n\u003c!-- ColumnList BGN --\u003e\n![](https://circleci.com/gh/kaedea/notion-down.svg?style=shield\u0026circle-token=9f4dc656e94d8deccd362e52400c96e709c7e8b3\u0026keep-url-source=true)\n\n\u003c!-- ColumnList END --\u003e\n\n\u003c!-- ColumnList BGN --\u003e\n![BANNER-02](/assets/banner_02_notiondown.png)\n\n\u003c!-- ColumnList END --\u003e\n\n[Notion Down](https://github.com/kaedea/notion-down), python tools that convert Notion blog pages into Markdown files, along with integration to build static webpages such as Hexo.  Its inspiration and goal is to __avoid separation  of writing__ by keep writing drafts or posts within [notion.so](http://notion.so) and then publish them into MD webpages automatically. \n\n * [Notion Down](#notion-down)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Examples](#examples)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Features](#features)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Hot It Works](#hot-it-works)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Basic usage](#basic-usage)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Advanced usage](#advanced-usage)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Getting Started](#getting-started)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Prepare](#prepare)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Run NotionDown](#run-notiondown)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[CI Build Script](#ci-build-script)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[Showcase Jobs](#showcase-jobs)\n * \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;[UnitTest Examples](#unittest-examples)\n\n## Examples\n\n[kaedea.com](http://www.kaedea.com)  \n[hexo.kaedea.com](http://hexo.kaedea.com)  \n[基于 Notion 的笔记写作和博客分享自动化方案](https://www.kaedea.com/2021/05/20/devops/notion-to-markdown-file-automating-solution/)\n\n## Features\n\nWhat can NotionDown do now:\n\n - Notion pages to MarkDown files\n     - ~~Basic Notion PageBlocks parsing~~\n     - ~~Notion images refer \u0026 download~~\n     - ~~Notion nested list blocks~~\n     - ~~Notion obfuscated-links parsing~~\n     - ~~Notion table block (Collection)~~\n     - Notion subpage / alias link parsing\n - Advanced Notion PageBlocks support\n     - ~~Pullquote Blocks (Notion ColumnList)~~\n     - Image source replacing \n         - ~~Replace notion image url with image file~~\n         - Replace notion image url with other CDN urls\n     - Notion page embed blocks\n - Writing optimized integration\n     - ~~Noton custom `ShortCode` blocks that control parametered MD files generating~~\n     - ~~Mixed CN-EN text separation format~~ ([by pangu](https://github.com/vinta/pangu))\n     - ~~Spelling inspect~~ (by [pycorrector](https://github.com/shibing624/pycorrector))\n - HEXO Integration\n     - ~~HEXO page properties config~~\n     - ~~HEXO generate~~\n     - HEXO tags plugin\n - PyPI Publish\n - Notion APIs\n     - ~~notion-py (3rd party)~~\n     - notion-sdk (official)\n\n## Hot It Works\n\n![NotionDown Workflows](/assets/notiondown_workflows_notiondown.png)\n\nNotionDown read Notion pages data using [notion-py](https://github.com/jamalex/notion-py), and then write pages into MD files.\n\n### Basic usage\n\n\u003e notion-down \u003e\u003e Notion APIs (notion-py) \u003e\u003e Notion pages data \u003e\u003e generating MD files\n\n### Advanced usage\n\n\u003e WebHook \u003e\u003e notion-down \u003e\u003e Notion APIs (notion-py) \u003e\u003e Notion pages data \u003e\u003e generating MD files \u003e\u003e Copy into Hexo source \u003e\u003e generating webpages \u003e\u003e push to GitHub pages\n\n## Getting Started\n\n### Prepare\n\nTo get started with NotionDown, you should:\n\n1. Prepare your Notion username(email) and password, or directly use `notion_token_v2`.\n1. Prepare `public notion blog_url` as root post for NotionDown to get the pages you want to handle.\n1. Run `notion-down/main.py` with your configs.\n\nCheck [here](https://github.com/kaedea/notion-down/blob/master/dist/parse_readme/notiondown_gettokenv2.md) to get `notion_token_v2`. \n\nDuplicate [NotionDown Posts Template](https://www.notion.so/kaedea/NotionDown-Posts-Template-f77f3322915a4ab48caa0f2e76e9d733) to your own notion and take it as `blog_url` (or you can just use your existing blog post url). Note that, for now the root page should be public  as well as placed in root path of notion workspace.\n\n\n### Run NotionDown\n\nBasically just run `notion-down/main.py` :\n\n```Bash\n# Run with cli cmd\nPYTHONPATH=./ python main.py \\\n    --blog_url \u003cNotion Post Url\u003e \\\n    --token_v2 \u003ctoken_v2\u003e\n    --username \u003cusername\u003e  # Only when token_v2 is not presented\n    --password \u003cpassword\u003e  # Only when token_v2 is not presented\n\n# or\nPYTHONPATH=./ python main.py \\\n    --config_file '.config_file.json'\n\n# Your can configure notion-down args by cli-args, config_file or SysEnv parameters\n# Priority: cli args \u003e config_file \u003e SysEnv parameters \u003e NotionDown default\n```\n\n\nFor custom configurations in details, see [Custom Configurations](https://github.com/kaedea/notion-down/blob/master/dist/parse_readme/notiondown_custom_configs.md).\n\nAlso check the following procedures as showcase usages for NotionDown.\n\n### CI Build Script\n\nSee building script at `/.circleci/config.yaml`.\n\n - `test-build-readme`: CircleCI jobs generating README for this repo. \n - `test-build-hexo`: CircleCI jobs generating Hexo posts for [https://github.com/kaedea/notion-down-hexo-showcase](https://github.com/kaedea/notion-down-hexo-showcase).\n - `test-run-pycorrector`: CircleCI jobs that executing spelling check for the test posts.\n\n### Showcase Jobs\n\nSee the usage showcase jobs at [/jobs](/jobs), and jobs outputs at [/dist](/dist).\n\n - [README generating](/jobs/parse_readme/)\n - [Notion sample post generating](/jobs/parse_sample_posts/)\n - [HEXO public generating](/jobs/parse_sample_posts_for_hexo/)\n - Notion image page source replacing (WIP)\n\n### UnitTest Examples\n\nSee unittest cases at `test/`.\n\n\n---\n\n\u003e This page is generated by [notion-down](https://github.com/kaedea/notion-down) from [notion.so NotionDown-README](https://www.notion.so/kaedea/NotionDown-README-d3463f3d398743879d663caf87efa029).\n\n\n\n\n\n\n\u003c!-- Generated by NotionPageWriter\nnotion-down.version = 0.2.2\nnotion-down.revision = b'5b90e23'\n--\u003e\n","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaedea%2Fnotion-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaedea%2Fnotion-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaedea%2Fnotion-down/lists"}