torchcell.literature.capture_by_doi
- capture_by_doi(lib: ZoteroLibrary, doi: str, *, dryad_doi: str | None = None, extra_si_urls: list[str] | None = None, si_expected: list[str] | None = None, do_ocr: bool = True, data_root: str | Path | None = None) Path[source]
Capture a paper’s full artifact from Zotero + external SI data.
Pipeline: resolve the Zotero item by DOI -> download main + SI PDFs -> fetch SI data files (DRYAD / extra URLs) -> OCR every PDF to markdown -> write
manifest.jsonrecording provenance + per-file sha256. The manifest is written last so it captures every produced file.- Parameters:
lib – Connected Zotero library.
doi – Paper DOI (the join key); must exist in the library.
dryad_doi – Optional DRYAD dataset DOI for the SI data files.
extra_si_urls – Additional direct URLs to pull into
si/si_data/.si_expected – SI items the paper says should exist (completeness check).
do_ocr – Run MinerU OCR (slow on first run – downloads models).
data_root – Mirror root; defaults to
$DATA_ROOT.
- Returns:
The artifact directory path.