porg is a command line tool to download research papers and add corresponding entries to a Notion paper collection database.
porg is almost completely written by Claude Code.
First, install the project:
pip install .Install in editable mode if you want to customize the source file:
pip install -e .You need a Notion account. Create a Notion database page that is a superset of the example page. You are encouraged to duplicate the example page. Then, follow the instructions given by to connect port to your Notion integrations.
porg notion --setupporg uses a flexible directory structure that separates active reading from long-term storage:
# ~/.porg/config.yaml
download_dir: "~/Desktop/quick_reads" # Active reading cache
archive_dir: "~/Desktop/Readings/Papers/General" # Long-term storage (write)
archive_read_dir: "~/Desktop/Readings/Papers" # Long-term storage (read)How it works:
download_dir: Your active reading cache where papers are temporarily stored for quick accessarchive_dir: Where papers are permanently stored when usingporg flusharchive_read_dir: The root directory for recursive paper searches
You can manually organize papers into subdirectories like:
~/Desktop/Readings/Papers/
├── General/ # Default archive location
├── CSE585/ # Course-specific papers
├── Research/ # Research project papers
└── Conferences/ # Conference proceedings
Benefits:
porg syncandporg openwill find papers in any subdirectoryporg flushalways writes to the consistentGeneral/directory- You maintain full control over paper organization
- No need to update configuration when creating new subdirectories
Some papers sit behind a paywall or otherwise refuse to be fetched from their
URL. When a download fails, porg add still records the metadata and creates
the Notion entry, and reports the PDF as missing:
Process Summary:
✅ Metadata saved: Yes
✗ PDF: missing
✅ Notion integration: Success
Every command that lists papers shows where each PDF actually is:
local— indownload_dirarchived— somewhere underarchive_read_dirmissing— in neither, so you do not have the paper yet
$ porg get
• DistServe (OSDI 2024) [local]
• Exokernel (SIGOPS 1995) [archived]
• Paywalled Thing (ISCA 2022) [missing]Download such a paper by hand into download_dir or anywhere under
archive_read_dir, and the next command that looks for it will find it. There
is no state to update: the directories are the source of truth for whether you
have a paper. Note the asymmetry — porg looks for a known paper in both
places, but only offers to adopt unknown PDFs out of download_dir.
porg sync keeps three things in step — your metadata config, your paper
directories, and your Notion database:
- Config → disk and Notion. Every paper in
papers.jsonthat has no PDF is downloaded, and every one without a Notion entry gets one. A paper with no URL is reported as needing a manual download instead. download_dir→ config. Any PDF indownload_dirthat no metadata entry claims was downloaded by hand, so sync offers to adopt it. It asks for a codename and conference exactly likeporg add, and — since there is no URL for a paper you fetched yourself — the Notion page it creates does not link out. Accepting a conventional name that differs from the filename renames the PDF to match. The archive is never scanned for papers to adopt: it is a store you organize yourself, not a queue of things to record.- Notion → config. Any Notion entry that no metadata entry claims is shown to you, and you can add it to the config or delete it from Notion.
The config stays the source of truth for a paper's details — sync never rewrites the codename, conference, or URL of a paper you have already recorded. The directories are the source of truth for whether the paper is actually on hand.
Sync is interactive whenever it finds something unclaimed. Skipping a paper is not remembered, so a PDF you keep declining will be offered again next time.
Basic usage:
porg add <paper-url>This will:
- Prompt for paper metadata (title, conference)
- Download the PDF with consistent naming (
<codename>-<conference>.pdf) - Add an entry to your Notion database
- Store metadata in your local configuration
porg add will do everything at once, but each component is also exposed to the CLI:
usage: porg [-h] {add,sync,open,flush,get,download,notion} ...
Download and organize research papers
positional arguments:
{add,sync,open,flush,get,download,notion}
Available commands
add Add paper (metadata + download + Notion)
sync Sync papers from config to downloads and Notion
open Open a paper by codename
flush Flush papers from download_dir to archive_dir
get Query paper information from Notion
download Download a research paper
notion Notion integration commands
optional arguments:
-h, --help show this help message and exit
You can use porg <command> -h|--help to understand how to run each of the commands.
porg stores configuration and metadata in ~/.porg/:
config.yaml- Directories for quick read and long term storage locationsnotion.json- Notion integration tokens and database settingspapers.json- Local paper metadata and naming information
MIT License - see LICENSE file for details.