A script that encrypts and decrypts your notion pages.
-
Make sure you have
python
andpip
properly installed in your system.python --version pip --version
-
Clone the repo
git clone https://github.com/Thompsonmina/notioncrypt cd notioncrypt
-
Create a virtual env and activate it
python -m venv .venv && source .venv/bin/activate
-
Install the dependencies
pip install -r requirements.txt
-Optionally if you have pipenv installed you can create a virtual env and install dependencies in one step
pipenv install
pipenv shell
- Go to notion.so/my-integrations to create an integration. Copy the token given by Notion.
After you create an integration you have to share the pages you want to be able to edit with it
-
Generate an encryption key using the command
python notioncrypt.py generate_key
Warning: Do not lose your key, if not you won't be able to decrypt your notion pages
- Copy your Notion token and encryption key into a
.env
file.
NOTION_TOKEN=""
ENCRYPT_KEY=""
or run the command python notioncrypt create_env
to create your .env
from the shell
python notioncrypt.py encrypt <notion_page_url>
python notioncrypt.py decrypt <notion_page_url>
The notion api is still in beta and is not fully featured yet.
For now you can only encrypt or decrypt:
- pages that have a another page as a parent (top level pages and pages that belong to a database are not supported yet)
- pages that contain only text-like blocks