Skip to main content

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.

  1. With token → precision API (better quality, larger PDFs)
  2. Without token → lightweight API (PDFs ≤ 10 MB)
  3. Otherwisemd is skipped or failed; 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

  1. Bump version in pyproject.toml and src/paper_harvest/__init__.py
  2. uv run pytest && uv build && python tools/build_skill_zip.py
  3. Tag v0.x.y, push, attach dist/*-skill.zip to GitHub Release
  4. uv publish for PyPI (uvx paper-harvest)

Docs

  • docs/spec.md — product / engineering specification
  • skill/references/ — Agent-facing reference (manifest schema, MinerU setup)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paper_harvest-0.2.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paper_harvest-0.2.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

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

Hashes for paper_harvest-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dd3013aba8eed14fa22701689d032b7ba72b17043b32eff728659ab936b6e1d4
MD5 170be6bea35f9b04949ed2ffc7b1d48d
BLAKE2b-256 d82fbc5ea35ba7c0b9eec491a200320b61b554799c125347584a79ce13a57166

See more details on using hashes here.

Provenance

The following attestation bundles were made for paper_harvest-0.2.0.tar.gz:

Publisher: publish.yml on SyncLionPaw/paper-harvest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for paper_harvest-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c7f047b9a4eea19bc9d964c7f177e6a2ad049221ecd7327a950289eec85ef85
MD5 1e0796c21e658050ce7bafba0d6f3850
BLAKE2b-256 7fc9a5e845c0439038e64aac18865b09486072c70a634dadfa140c1cfcb477ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for paper_harvest-0.2.0-py3-none-any.whl:

Publisher: publish.yml on SyncLionPaw/paper-harvest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page