Add something to your notion TODO list from the command line
- Create a new notion integration
- Make sure to share your TODO page with your integration: (Here you have a simple example)
- Copy the page ID:
- Create the image and tag it:
> docker build . -t notion
- Run the command, make sure you have the integration token and the page ID
> docker run -it -v $(pwd):/usr/src/app notion python pytodo.py -t INTEGRATION_TOKEN -p PAGE_ID Buy almond milk
- Create an alias, (the command above is a little ugly, isn't it? So I'd rather create an alias on the bashrc/zshrc/equivalent):
...
alias todo="docker run -it -v /Your-Directory/notion-command-line-todo:/usr/src/app notion python pytodo.py -t INTEGRATION_TOKEN -p PAGE_ID"
Then you can just do this:
> todo buy almond milk
> todo buy brocoli
You will see all the TODO blocks on your notion page
> todo -l
> [X] Take out trash
[] Buy chocolate
[] Buy broccoli
[] Run a 5K marathon