Harvest arXiv papers into organized article directories with PDF, TeX, and Markdown.
Project description
paper-harvest
Collect arXiv papers into a unified article directory: PDF, TeX source, optional Markdown, and a structured manifest.
Python 3.9+, stdlib only at runtime. Two ways to use it:
| Audience | How |
|---|---|
| Terminal / automation | uvx paper-harvest (PyPI) |
| Cursor / Agent | Install the skill zip |
Quick start
uvx paper-harvest 'https://arxiv.org/abs/2403.18074' --json
From a local checkout:
uvx --from . paper-harvest 'https://arxiv.org/abs/2403.18074' --json
Install permanently:
uv tool install paper-harvest
paper-harvest 'https://arxiv.org/abs/2403.18074' --json
Input: arXiv URLs only (arxiv.org, abs / pdf / src).
Output
<article_id>/
pdf/<article_id>.pdf
tex/
arXiv-<id>.tar.gz
source/
md/
<article_id>.md
assets/
mineru_result.json
harvest_result.json
Each step reports ok, skipped, or failed in harvest_result.json. Failed steps do not remove earlier artifacts.
CLI flags
| Flag | Effect |
|---|---|
--target-dir <dir> |
Output root (default: .) |
--skip-tex |
Skip TeX source download |
--skip-md |
Skip Markdown extraction |
--force |
Overwrite existing md/ |
--json |
Print structured JSON to stdout |
--timeout <sec> |
Download timeout (default: 120) |
Markdown (MinerU)
Markdown is optional and uses MinerU.
- With token → precision API (better quality, larger PDFs)
- Without token → lightweight API (PDFs ≤ 10 MB)
- Otherwise →
mdisskippedorfailed; PDF and TeX are kept
Configure a token via any one of:
export MINERU_API_TOKEN='your-token'
echo 'your-token' > ~/.mineru_token && chmod 600 ~/.mineru_token
Also checked: ./.mineru_token, ~/.config/mineru/token. Never commit token files.
Re-run Markdown only after adding a token:
uvx paper-harvest '<same-arxiv-url>' --skip-tex --force --json
Cursor Skill
The skill is Agent instructions only; execution still goes through the CLI.
Install — download paper-harvest-<version>-skill.zip from releases:
unzip paper-harvest-0.2.0-skill.zip -d ~/.cursor/skills/
Build locally:
uv build
python tools/build_skill_zip.py
# → dist/paper-harvest-0.2.0-skill.zip
Skill sources live in skill/ (SKILL.md, references/, scripts/harvest.sh).
Project layout
paper-harvest/
pyproject.toml
src/paper_harvest/ # CLI + core
skill/ # Agent skill (shipped as zip)
docs/spec.md # product specification
tools/build_skill_zip.py
tests/
Development
uv sync --extra dev
uv run pytest
uv build
uvx --from . paper-harvest --help
Publish
- Bump
versioninpyproject.tomlandsrc/paper_harvest/__init__.py uv run pytest && uv build && python tools/build_skill_zip.py- Tag
v0.x.y, push, attachdist/*-skill.zipto GitHub Release uv publishfor PyPI (uvx paper-harvest)
Docs
docs/spec.md— product / engineering specificationskill/references/— Agent-facing reference (manifest schema, MinerU setup)
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paper_harvest-0.2.0.tar.gz.
File metadata
- Download URL: paper_harvest-0.2.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd3013aba8eed14fa22701689d032b7ba72b17043b32eff728659ab936b6e1d4
|
|
| MD5 |
170be6bea35f9b04949ed2ffc7b1d48d
|
|
| BLAKE2b-256 |
d82fbc5ea35ba7c0b9eec491a200320b61b554799c125347584a79ce13a57166
|
Provenance
The following attestation bundles were made for paper_harvest-0.2.0.tar.gz:
Publisher:
publish.yml on SyncLionPaw/paper-harvest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paper_harvest-0.2.0.tar.gz -
Subject digest:
dd3013aba8eed14fa22701689d032b7ba72b17043b32eff728659ab936b6e1d4 - Sigstore transparency entry: 2023831512
- Sigstore integration time:
-
Permalink:
SyncLionPaw/paper-harvest@bcc24b92292fa4a0bb786b7524bfd39c50021b75 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SyncLionPaw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bcc24b92292fa4a0bb786b7524bfd39c50021b75 -
Trigger Event:
release
-
Statement type:
File details
Details for the file paper_harvest-0.2.0-py3-none-any.whl.
File metadata
- Download URL: paper_harvest-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c7f047b9a4eea19bc9d964c7f177e6a2ad049221ecd7327a950289eec85ef85
|
|
| MD5 |
1e0796c21e658050ce7bafba0d6f3850
|
|
| BLAKE2b-256 |
7fc9a5e845c0439038e64aac18865b09486072c70a634dadfa140c1cfcb477ae
|
Provenance
The following attestation bundles were made for paper_harvest-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on SyncLionPaw/paper-harvest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paper_harvest-0.2.0-py3-none-any.whl -
Subject digest:
0c7f047b9a4eea19bc9d964c7f177e6a2ad049221ecd7327a950289eec85ef85 - Sigstore transparency entry: 2023831594
- Sigstore integration time:
-
Permalink:
SyncLionPaw/paper-harvest@bcc24b92292fa4a0bb786b7524bfd39c50021b75 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SyncLionPaw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bcc24b92292fa4a0bb786b7524bfd39c50021b75 -
Trigger Event:
release
-
Statement type: