archive-nihocc
Quick Start
- Command:
archive-nihocc [daily|-index] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/archive-nihocc - Full reference: See references/help.md for detailed documentation
When To Use This Tool
- Build a local NIH Open Citation Collection snapshot for offline PMID citation-link lookups.
- Refresh local
CITED/CITESposting files after the upstream OCC bundle changes. - Keep citation data in the standard EDirect archive layout instead of managing ad hoc zip downloads by hand.
- Rebuild index, invert, merge, and posting layers when downstream local search commands need updated citation edges.
Common Patterns
# 1) Download or refresh the local OCC archive
export EDIRECT_LOCAL_ARCHIVE=/data/edirect
archive-nihocc
# 2) Incrementally rebuild index and invert layers after new data arrives
archive-nihocc daily
# 3) Rebuild the full local search/postings structures
archive-nihocc -index
Recommended Workflow
- Set
EDIRECT_LOCAL_ARCHIVEand confirm the archive root is writable before invoking the script. - Make sure the supporting EDirect helpers and a local Go toolchain are available.
- Run
archive-nihoccto refresh the downloaded OCC bundle in the archive tree. - Follow with
dailyor-indexas a separate command, depending on whether you need only incremental rebuilds or a full postings refresh. - Review the
DWN,IDX,INV,MRG, andPSTtiming lines before trusting the local archive.
Guardrails
--helpand--versionare not metadata-only here; they still enter archive setup logic and fail if prerequisites are missing.- The script requires
EDIRECT_LOCAL_ARCHIVE,pm-setup,pm-prepare, and a working localgocompiler. - Cleaning and indexing are mutually exclusive in one invocation; run cleanup commands separately from
daily/-index. - The cleanup aliases (
clean,scrub,scour,scratch,erase) remove local scratch material and should be treated as destructive maintenance. - The OCC zip download is large and the script warns it can take hours; do not treat this like a lightweight helper command.