Sync Notion with Paperpile
Project description
Paperpile Notion Integration
Inspired by gsarti/paperpile-notion. This is a Python CLI to manually sync your articles in Paperpile to a Notion database. Optionally, you may sync an authors database as well.
NOTE: This will only be maintained if Paperpile doesn't integrate directly with Notion. They have expressed interest, here.
This is a work in progress, and is currently intended for personal use only (no support, no warranty, no liability, etc.).
Installation
You can pip
install paperpile-notion
, preferably in a virtual environment.
pip install paperpile-notion
Requirements
To use paperpile-notion
, you'll need a few things:
- A
JSON
export from Paperpile. You can retrieve this by going to "Settings > Export > Export to JSON". - A configuration file, similar to what you'll find in
docs/config.yml
. Currently, we do not support venues, but it is planned. - Your
Article
database URL, which you can copy directly from your browser. - (optional) Your
Author
database URL, copied in a similar way as above. - Your
token_v2
(detailed below) OR your email/password (never stored bypaperpile-notion
).
NOTE: Your Article
database must have the following columns:
Name | Type | Description |
---|---|---|
ID | text |
An ID issued by Paperpile which can be used to uniquely identify papers, feel free to hide the column in Notion once created. |
Status | select |
Your reading status. Can be fully customized in your config.yml . |
Authors | multi_select OR relation |
The paper's authors. If you have an Author database, use the relation type otherwise a multi_select . |
URL | url |
A link to the paper in Paperpile. |
Fields | multi_select |
The [sub-]fields the paper belongs to. |
Methods | multi_select |
The methods/tools used in the paper. |
Usage
As we use notion-py
, we are limited by their support for either an
email/password login OR your TOKEN_V2
. Your token_v2
may be retrieved from
your [notion.so][notion] cookies.
Using your token_v2
(recommended)
You have two ways to supply your token_v2
to paperpile-notion
:
- (preferred) You may store it in an environment variable called
NOTION_TOKEN_V2
, which will be read bypaperpile-notion
. - OR you may pass your token in using the
--token <token_v2>
flag.
# Using NOTION_TOKEN_V2
$ paperpile-notion update-db --refs <YOUR_JSON>.json
# Using --token ...
$ paperpile-notion --token <token_v2> update-db --refs <YOUR_JSON>.json
Using your email/password
You will be prompted each time for your Notion email/password login.
paperpile-notion update-db --refs <YOUR_JSON>.json
Example output
When adding, adding a new paper to the database:
Example resulting database on Notion:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for paperpile_notion-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb40d1be51fae0c601c227579ff5e6a1bf3440f9825afceea040c792925b7cdc |
|
MD5 | 484d00e89c8b547d833c07db3d678d2a |
|
BLAKE2b-256 | df634b3db0ee3e391ac6f38b4f33f312f5e40b348698352e7937a0841e302400 |