whats-my-paper
I find it really annoying that downloaded articles from publishers will have some randomly generated names for the download which makes it a nightmare to find them after downloading (im too lazy to rename them)
So this renames them to their actual title:
1706.03762v7.pdf -> attention-is-all-you-need.pdf
The title comes from the PDF's metadata where it has any, and otherwise from a layout parse of the first page, taking the title/heading with the most words.
Install
Needs uv and Python 3.12 or newer. If you don't have uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Then:
uv tool install whats-my-paper
That puts a whats-my-paper command on your PATH, in its own isolated environment, so it
won't touch any other Python you have installed. Check it worked:
whats-my-paper --help
If the command isn't found, run uv tool update-shell and open a new terminal.
To upgrade later, or to remove it:
uv tool upgrade whats-my-paper
uv tool uninstall whats-my-paper
Or with pip, if you'd rather not use uv:
pip install whats-my-paper
From source
From a clone, install it the same way from the project root, or straight from GitHub without cloning:
uv tool install .
uv tool install git+https://github.com/tremgan/whats-my-paper
Working on it
To hack on the code instead, uv sync sets up a .venv with the dependencies, and uv run
runs your working copy without installing anything:
uv sync
uv run whats-my-paper scan ~/Downloads
A note on size
There are two separate downloads, and both are large:
- Installing pulls in docling, which depends on PyTorch — roughly a gigabyte of packages. Expect it to take a few minutes.
- The first PDF that needs the layout parse downloads docling's model weights, about 500 MB,
into
~/.cache/huggingface/hub. This happens on first use, not at install time, so that run will stall for a while with no obvious explanation. Later runs use the cache and work offline.
PDFs whose title is in their metadata never touch the layout parse, so if you're lucky you may never trigger the second download at all.
Usage
See which files in a folder look auto-generated:
whats-my-paper scan ~/Downloads
Preview the renames without touching anything:
whats-my-paper rename ~/Downloads --preview
Do it:
whats-my-paper rename ~/Downloads
Each rename is printed as it happens. Pointed at a directory, rename only touches the files scan flags. Pointed at a single file it
always renames it. Existing files are never overwritten — a clash gets a -2 suffix — and a PDF
whose title can't be read is skipped rather than failing the batch.
Notes
Only files whose name is at least 3/4 digits are flagged, so Download.pdf is left alone. Adjust
numeric_percentage_strategy in titles.py if you want a different rule.
The first PDF that falls back to the layout parse downloads docling's model weights (~500 MB, into
~/.cache/huggingface/hub); after that it runs offline.
Metadata
Release files for whats-my-paper 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| whats_my_paper-0.1.1.tar.gz | 135.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| whats_my_paper-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 142.2 kB
Release files / whats_my_paper-0.1.1.tar.gz
| Download URL | whats_my_paper-0.1.1.tar.gz |
|---|---|
| Size | 135.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e224cb63498a036829e81b1d62159bfd9522924e1091da8af6e13a2632c5fc4
|
|
BLAKE2b-256 checksum How to use checksums |
0c5514b2a52c8b7a6937454c05110d3858bdaa39e2ff2178e1c53ce105ee4975
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / whats_my_paper-0.1.1-py3-none-any.whl
| Download URL | whats_my_paper-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76cca8b8a5d7e222477abfe9643704fecd5b747f3cb1da83705ca7de520222c9
|
|
BLAKE2b-256 checksum How to use checksums |
7f5ea01bff2cda2b55fffb2356c0a36558dacd07e8f7a358f1cf49f507aa2e8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|