Skip to main content

A tool to download arXiv papers, intelligently extract appendices with math formulas, and manage source files.

Project description

arXiv Appendix Extractor

A powerful command-line tool to download LaTeX source files for arXiv papers, intelligently extract appendix sections, and clean up source files for papers without appendices.

This tool is ideal for researchers and data scientists who need to programmatically analyze the mathematical derivations and proofs often found in the appendices of scientific papers.

Features

  • Download by Date or ID: Fetch papers from a specific date and category, or by a list of individual arXiv IDs.
  • Intelligent Appendix Extraction: Uses a hybrid approach:
    1. HTML-Assisted: Prefers high-quality HTML from ar5iv.org for accurate section detection.
    2. Heuristic Fallback: If HTML is unavailable, it uses robust heuristics to find appendices in the raw LaTeX source.
  • Robust and Resumable: Maintains a progress file to automatically resume interrupted jobs, saving time and bandwidth.
  • Parallel Processing: Leverages multiple CPU cores to process papers in parallel, significantly speeding up large jobs.
  • Smart Cleanup: Includes a separate utility to safely remove the source files of papers that were found to have no appendix, saving disk space.
  • Easy to Use: Packaged as a simple command-line tool.

Installation

# (After you build and upload to PyPI)
pip install arxiv-appendix-extractor

Usage

Main Extractor Tool

The main tool is arxiv-extractor. You must provide either --date or --ids.

1. Process papers from a specific date:

This command will process the first 10 papers from the 'cs' (Computer Science) category on August 15, 2025, using 4 parallel workers.

arxiv-extractor --date 2025-08-15 --category cs --max-papers 10 --workers 4

2. Process specific papers by ID:

arxiv-extractor --ids 2310.06825 2403.00318

All results and intermediate files will be saved in the pipeline_output_refactored/ directory by default.

Cleanup Tool

After running the extractor, you can clean up the source files for papers that had no appendices.

The arxiv-cleanup tool requires the report file and the papers directory generated by the extractor.

1. Perform a "dry run" (highly recommended first):

This will show you which directories would be deleted, without actually deleting anything.

arxiv-cleanup \
  --report-file pipeline_output_refactored/final_appendix_results.json \
  --papers-dir pipeline_output_refactored/papers \
  --dry-run

2. Execute the cleanup:

This will prompt you for confirmation before deleting files.

arxiv-cleanup \
  --report-file pipeline_output_refactored/final_appendix_results.json \
  --papers-dir pipeline_output_refactored/papers

To skip the confirmation prompt (e.g., in a script), add the -y flag.

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

arxiv_appendix_extractor-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

arxiv_appendix_extractor-0.1.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file arxiv_appendix_extractor-0.1.0.tar.gz.

File metadata

  • Download URL: arxiv_appendix_extractor-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for arxiv_appendix_extractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47981026a24a2e7b9881ce44172140aafb748ec2956f687046869017947a6b62
MD5 55c51d9304b556177d1f6a1a42aac6cb
BLAKE2b-256 a91c47e24f20398c662d90e02192b6474ca9caa18b7a4335b8730b238247947f

See more details on using hashes here.

File details

Details for the file arxiv_appendix_extractor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for arxiv_appendix_extractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e98e586991e52c36010e178eb2627502de32f33d2201b155f6ee52fde41178c
MD5 422c78ef0b9fea80a1b7e94e3ca9698d
BLAKE2b-256 6e424fb40085431e506c1979b34b2719fe7beccc81a415100a4198c509a3f8e6

See more details on using hashes here.

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