Coder Social home page Coder Social logo

notioncrypt's Introduction

notioncrypt

A script that encrypts and decrypts your notion pages.

Setup

  • Make sure you have python and pip 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

Usage

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

  • Encrypt a page

python notioncrypt.py encrypt <notion_page_url>
  • Decrypt a page

python notioncrypt.py decrypt <notion_page_url>

Caveats

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

notioncrypt's People

Contributors

thompsonmina avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.