From eabf1f6d74dac497ce31e3e2f441cfa25e9f74f2 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Sat, 6 Jun 2026 12:02:41 -0400 Subject: Initial implementation (only a few years later!) This is pure Claude. I'd written out the plan for this suite of scripts eons ago, but never found the time to actual do it. Remembered it this morning, pointed Claude at the README, and had something that appears to work in minutes. caveat emptor: the design is mine, but the code is purely LLM generated at this point. --- bib-check | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bib-check (limited to 'bib-check') diff --git a/bib-check b/bib-check new file mode 100755 index 0000000..062e157 --- /dev/null +++ b/bib-check @@ -0,0 +1,18 @@ +#!/bin/sh +# bib-check - lint a bibtex database +# +# usage: bib-check [file ...] (stdin if no file given) +# +# Reports missing required fields, duplicate keys, duplicate titles and +# empty field values. Exits nonzero if any problem was found. + +if [ -n "$BIBUTILS_LIB" ]; then + LIB=$BIBUTILS_LIB +elif [ -d "$(dirname "$0")/lib" ]; then + LIB=$(dirname "$0")/lib +else + LIB=/usr/local/share/bibutils +fi + +exec awk -f "$LIB/bib-parse.awk" -f "$LIB/bib-canon.awk" \ + -f "$LIB/bib-check.awk" "$@" -- cgit v1.2.3