A command line reference manager for Notion. Source code is based on Python and using the Notion-API.
- macOS Sequoia 15.1
- zsh 5.9
- Notion 4.16.2
- Python 3.9.6
- notion-client 2.4.0
- requests 2.32.4
Install the source code from GitHub
$ git clone https://github.com/koseiohara/Thoth.git
$ cd Thoth
$ make installThe source files will be copied to the directory specified by INSTALL in the Makefile.
Add that directory to the environment paths PATH and PYTHONPATH.
When you uninstall this tool, enter:
$ make uninstallBefore running thoth, configure Notion integrations via this page.
- Click
New Integration - Fill in the required fields and click
Save. - Copy the Internal Integration Secret and note it somewhere. You should enable
Read content,Update content,Insert content, andNo user informationin the Content Capabilities - Open the Notion and create a new private page
- Click
...at the top right - Click
Connect to, then choose the connection you generated before - Click
Copy linkbutton in the same...and note it somewhere
thoth requires the notion-client and requests packages
$ pip install notion-client
$ pip install requestsMake .notion_token.csv in your home directory
$ touch ~/.notion_token.csvWrite the "referenceManager", internal integration secret, and Notion page link in ~/.notion_token.csv
referenceManager,ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,https://www.notion.so/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWhen using thoth for the first time, initialize the Notion page
$ thoth initThis command updates ~/.notion_token.csv and inserts a database into the Notion page.
You can reorder, resize, and add columns in the database as desired; however, you cannot delete the default columns.
To reinitialize thoth, delete and re-add the referenceManager line in ~/.notion_token.csv as described in Python Setup.
Now thoth is ready to manage articles.
To add new bibliography entries from the command line
$ thoth add "doi_of_article1" "doi_of_article2" ...One or more DOIs can be specified.
Each time you add an article, a subpage is created in the page.
The Title column in each row of the database has a link to a subpage.
When you want to add multiple references in a single command, the --file option is convenient.
$ thoth add --file file1.txt file2.txt ...In this option, one or more files can be specified.
In the files, DOIs need to be separated with either newlines \n or commas , like:
doi1
doi2
...
doi1,doi2,...
or
doi1,doi2
doi3,doi4,...