Write in Notion and Upload to Github Automatically
- Python3
- notion2md
- python-dotenv
- Github Token
- Notion API Token
- Prepare all you need(Requirement, Tokens etc…)
- Fill your
.env
file
GITHUB_USER_NAME =
GITHUB_REPO_NAME =
GITHUB_TOKEN =
OUTPUT_PATH = "./output/"
- Save your notion token in your local terminal
(Set your notion api integrations first and then get token → https://www.notion.so/my-integrations)
export NOTION_TOKEN="{your_notion_token}"
- Set Notion page that you want upload
(If you set your Connections in page that you want, then you don’t need to set in your child page, only set Connections once in parent page)
- Write down in Notion! And copy Notion link
- Run
main.py
python3 main.py https://www.notion.so/{username}/{page_id}
- [] show github url after upload success
- [] when output folder exsit delete first and then upload