bigbib2itsybitsy shrinks my BibTeX database down to only the entries a paper actually cites.
Written with Claude Sonnet 5 on 5 August (2026). Version 1.0.
Scans a .tex file for every \cite-family command (\cite, \citep, \citet, \textcite, \autocite, ...), looks each key up across ~/bib/sci.bib, ~/bib/arXiv.bib and ~/bib/Books.bib, and writes out only the matched entries verbatim — original formatting kept. Any @string shortcut a kept entry needs (e.g. journal = prl) is carried along too, so the output file stands on its own.
bigbib2itsybitsy paper.tex # -> paper.bib
bigbib2itsybitsy paper.tex -o - # to stdout
File:Bigbib2itsybitsy.gz — the script itself, gzipped.