ishan0102 / rsrch

Manage your ever-growing list of research papers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rsrch

Manage your research papers from Python. This project lets you update a Notion database with arXiv links and download PDFs of papers to your local machine.

image

Installation

  1. Create an internal integration in Notion.

  2. Add the integration to the database you want to download from.

  3. Store your NOTION_TOKEN and NOTION_DATABASE_ID somewhere safe. Your NOTION_TOKEN can be found in your integrations page and is called the Internal Integration Token. The NOTION_DATABASE_ID can be found in the URL of your database (https://www.notion.so/{workspace_name}/{database_id}?v={view_id}).

  4. Install local dependencies:

    pip install rsrch
  5. Important: Your Notion database must have the following columns with the corresponding types:

    • Title: Title
    • URL: URL
    • Date: Date
    • Authors: Text

    You can add more columns, but these are the ones that are required.

Usage

Setup

from rsrch import RsrchClient

client = RsrchClient(
    token=NOTION_TOKEN,
    database_id=NOTION_DATABASE_ID,
)

Download

This will download all the papers from your Notion database to the papers/ directory.

client.download()

image

Upload

You can upload arXiv abstract links, PDF links, or IDs to your Notion database and have it autofill all of the relevant fields.

client.upload(
    arxiv_urls=[
        "https://arxiv.org/abs/1706.03762",
        "https://arxiv.org/pdf/1706.03762.pdf",
        "1706.03762",
    ]
)

image

Alternatively, you can add non-arXiv links manually to Notion.

Notes

  • Uploading papers to Notion is currently only supported for arXiv links. Papers with titles that already exist in the database will not be uploaded.
  • I plan on adding support for other databases in the future, but for now it only works with Notion databases.
  • To build and release this:
    • Make new code accessible in src/__init__.py
    • Update the version in src/__about__.py
    • Run python3 -m build
    • Run python3 -m twine upload dist/*

Resources

About

Manage your ever-growing list of research papers

License:MIT License


Languages

Language:Python 100.0%