Lem/Docs

citation-harvest fetch

Fetch and extract the discovered corpus, resumably.

Invocation#

Shell
lem-cli citation-harvest <id-or-title> fetch [--limit <n>]

Inputs and options#

  • --limit <n> limits this invocation to a positive number of manifest rows. Without it, the limit is unbounded.
  • Reads the existing harvest manifest and resumes rows whose PDF or text is not complete.

Output and state#

Populates pdfs/<key>.pdf and text/<key>.txt, saves manifest progress, and prints attempted, fetched, skipped, failed, pdfs, full failure reasons, text, and next.

Failed fetch rows are reported in JSON for a later resume; their count does not itself cause the CLI wrapper to exit nonzero.

Refusals#

  • --limit without a positive integer refuses with “--limit needs a positive number”.
  • Any other dash-prefixed argument refuses with “unknown fetch option: <option>”.
  • An unreadable or malformed existing manifest refuses with its path and cause before acquisition or progress writes; the stored bytes remain unchanged. A stored text/<key>.txt that is there but cannot be read refuses the run with “<path> cannot be read: <cause>” instead of being re-fetched over or treated as a row with no text; only a text that is not there is fetched.
  • A missing required harvest file or a thrown fetch error is surfaced as a refusal.