Skip to main content

Module source

Module source 

Source
Expand description

doiget source <ref> — download an arXiv submission’s source bundle (every file) or just its figures to a directory (ADR-0034, issue #343).

Fetches the same arXiv source tarball as doiget tex-source (export.arxiv.org/src/<id>, one request) but, instead of extracting only the main .tex text, materialises files to --out:

  • default: the full bundle (*.tex, *.bib, *.sty, figures, …),
  • --figures-only: just the image artifacts.

Files are written opaque (never interpreted; ADR-0034 D2). Tar entry paths are sanitised in the core (sanitize_entry_path, ADR-0034 D3) and the join under --out is re-checked here as defence-in-depth, so a malicious archive cannot write outside the output directory (zip-slip).

  • arXiv id → files under --out.
  • DOINO_OA_AVAILABLE (pass the arXiv id).
  • PDF-only / single-file / figure-less submissionTEXT_UNAVAILABLE (wire) with an actionable doiget fetch note.

--mode json emits {ok, arxiv_id, out_dir, figures_only, count, files[]}.

Functions§

run
Run the source subcommand.