https://github.com/5hay/notionbackup
A small utility command line application that can recursively download Notion pages
https://github.com/5hay/notionbackup
backup go golang notion
Last synced: 5 months ago
JSON representation
A small utility command line application that can recursively download Notion pages
- Host: GitHub
- URL: https://github.com/5hay/notionbackup
- Owner: 5hay
- Created: 2021-04-16T16:36:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T10:24:23.000Z (almost 3 years ago)
- Last Synced: 2024-11-25T16:39:12.428Z (about 1 year ago)
- Topics: backup, go, golang, notion
- Language: Go
- Homepage: https://blog.shayan.eu/automate-your-notion-backups.html
- Size: 7.81 KB
- Stars: 68
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# notionbackup
A small utility command line application that can recursively download Notion pages.
I needed something scriptable that could periodically download my whole Notion workspace for backup purposes.
I have written a small blog post about this tool if you want to check it out: [Automate your Notion backups](https://blog.shayan.eu/automate-your-notion-backups.html)
## How To Use
Build it yourself or download a pre-built binary from the [Releases page](https://github.com/5hay/notionbackup/releases).
Set the following env variables
- `NOTION_TOKEN` (the token_v2 cookie value, just google "notion token_v2")
- `NOTION_PAGEID` (the id of the page you want to download recursively)
- _Optional_ `NOTION_EXPORTDIR` (the folder where the created .zip file should be placed in, **defaults to the current directory**)
- Only specify the directory, the filename will be created for you
- _Optional_ `NOTION_EXPORTTYPE` ("html" or "markdown", **defaults to markdown**)
Now you can just run `./notionbackup`.
## Building
Clone this repository and then run `go build -o notionbackup -ldflags="-s -w" app.go`
## Special Thanks
- kjk for [notionapi](https://github.com/kjk/notionapi)