Skip to main content

License

refren: scientific manuscript PDF renamer

Scenario: when you download a scientific paper from the Internet, the PDF file is usually named someting cryptic like 2506.19540v1.pdf

refren renames it to FirstAuthor_SecondAuthor_JournalAbbrev_Year.pdf using Claude AI to extract bibliographic metadata from the PDF

Conveniently, it can also download the supplemental data for the manuscript automatically

Usage

refren <pdf_file> [--remove] [--supplement]

--remove deletes the original PDF after creating the renamed copy.

--supplement also searches the web for the paper's supplementary material and downloads it. If a supplement is found and successfully downloaded, refren creates a FirstAuthor_SecondAuthor_JournalAbbrev_Year/ folder and puts both the renamed PDF and the downloaded supplement inside it. If no supplement can be found or downloaded (e.g. the publisher blocks automated downloads), refren falls back to the normal behavior: just rename the PDF in place, no folder created.

--supplement reliability by source

Many publishers block automated downloads outright, so this is best-effort, not guaranteed. As last verified:

Source Status Notes
arXiv ✅ Works Checked directly via arXiv's own ancillary-files listing, not a web search
Nature-branded titles (nature.com) ✅ Works Nature, Nature Medicine, Nature Biotechnology, Nature Catalysis, Nature Energy, Signal Transduction and Targeted Therapy, etc. — anything with a 10.1038 DOI, checked directly via nature.com. (Springer Nature also publishes non-Nature-branded journals on a different platform — see below.)
Springer/BioMed Central titles (link.springer.com, biomedcentral.com) ❓ Unknown Untested as a deterministic check — a different site than nature.com, despite shared corporate ownership. One example (J Cheminform) hit a separate issue: its article page is a JS-rendered SPA with no text in the raw HTML
PubMed Central (PMC) ❌ Doesn't work Article pages are readable, but file downloads are blocked by NCBI's bot-detection challenge
Elsevier / ScienceDirect ❌ Doesn't work Site returns 403 to automated requests outright
The Lancet ❌ Doesn't work Site blocks automated access; recent trials checked had no PMC copy to fall back to either
Annals of Oncology ❌ Doesn't work Same ScienceDirect/Elsevier block; recent papers checked had no PMC copy either
NEJM ❌ Doesn't work Site returns a Cloudflare bot-challenge page instead of the file
Other publishers ❓ Unknown Untested

Examples

$ refren 1758-2946-6-10.pdf 
  (calling Claude API...)
  First author last name : Krstajic
  Second author last name: Buturovic
  Journal                : Journal of Cheminformatics -> J Cheminform
  Year                   : 2014

  1758-2946-6-10.pdf  ->  Krstajic_Buturovic_JCheminform_2014.pdf
Copied to: Krstajic_Buturovic_JCheminform_2014.pdf


$ refren 2608.14705v1.pdf --supplement
  (calling Claude API...)
  Article type           : research
  First author last name : Buturović
  Second author last name: 
  Journal                : arXiv -> arXiv
  Year                   : 2026

  (checking arXiv for ancillary files...)

  2608.14705v1.pdf  ->  Buturović__arXiv_2026/Buturović__arXiv_2026.pdf
  Supplement saved to: Buturović__arXiv_2026/
    arXiv-2608.14705v1.tar.gz

Install

$ pipx install refren # Linux, Mac

Requires an ANTHROPIC_API_KEY environment variable. If you don't have the API key, please read SETUP.md for instructions.

Development

cd ~/github/refren
rm -f dist/*
uv run python -m build
uv run twine upload dist/*

Metadata

Release files for refren 0.18.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refren 0.18.0
File Size Uploaded Provenance
refren-0.18.0.tar.gz 13.5 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for refren 0.18.0
File Interpreter ABI Platform
refren-0.18.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 MB

Release files / refren-0.18.0.tar.gz

Download URL refren-0.18.0.tar.gz
Size 13.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a69fa936528b2480a3b93a71e09e6f23d8df0dfdcc76ec6588b946fc55f9e885
BLAKE2b-256 checksum
How to use checksums
848a377e28e046118ebe18743d1e80b0ceef35cde4d7cdd13f03089931e70f85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release files / refren-0.18.0-py3-none-any.whl

Download URL refren-0.18.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
353237b63c27ee0f1a84358f6f38575acaca0937ad0186b1127b6ce9be0cc7de
BLAKE2b-256 checksum
How to use checksums
c5bebd8101072de7ed982d6fb92cdcc87e15cb2149d35d17b052077c81ff75a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Security for refren 0.18.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page