aboutsummaryrefslogtreecommitdiffstats
path: root/bib-key
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2026-06-06 12:02:41 -0400
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2026-06-06 12:02:41 -0400
commiteabf1f6d74dac497ce31e3e2f441cfa25e9f74f2 (patch)
tree626d64c3574cfbc7cc38eae6d142ef22b21cf59b /bib-key
parent8351a1da3f56cde9939b934bc5533a95aff1c95e (diff)
downloadbibutils-eabf1f6d74dac497ce31e3e2f441cfa25e9f74f2.tar.gz
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.
Diffstat (limited to 'bib-key')
-rwxr-xr-xbib-key15
1 files changed, 15 insertions, 0 deletions
diff --git a/bib-key b/bib-key
new file mode 100755
index 0000000..ff3c363
--- /dev/null
+++ b/bib-key
@@ -0,0 +1,15 @@
+#!/bin/sh
+# bib-key - read bibtex entries and emit them with generated keys
+#
+# usage: bib-key [file ...] (stdin if no file given)
+
+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-key.awk" "$@"