diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:02:41 -0400 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:02:41 -0400 |
| commit | eabf1f6d74dac497ce31e3e2f441cfa25e9f74f2 (patch) | |
| tree | 626d64c3574cfbc7cc38eae6d142ef22b21cf59b /README.md | |
| parent | 8351a1da3f56cde9939b934bc5533a95aff1c95e (diff) | |
| download | bibutils-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 'README.md')
| -rw-r--r-- | README.md | 45 |
1 files changed, 42 insertions, 3 deletions
@@ -21,7 +21,19 @@ formatted bibtex entry will be emitted on stdout. ## bib-extract A script which filters a bibtex database provided on stdin or as an argument -and emits only those entries contained within a specified aux file. +and emits only those entries contained within a specified aux file. Both +classic bibtex and biblatex/biber aux files are understood, and \nocite{*} +selects the whole database. (roff citation sources are planned but not yet +supported.) + +## bib-ls +List the entries in a database, one key per line, or with -l as +tab-separated key, type, author, year and title. + +## bib-check +Lint a database: reports missing required fields, duplicate keys, +duplicate titles (likely duplicated entries) and empty field values. +Exits nonzero if any problem was found. ## bib-key A script which accepts a bibtex entry on stdin, and emits it on stdout with @@ -29,5 +41,32 @@ an automatically generated bibtex key. ## bib-fetch A script which accepts a pdf file as an input argument and will attempt to -fetch a corresponding bibtex entry from crossref.org based on its DOI, if -one is available. +fetch a corresponding bibtex entry based on its DOI (via crossref.org) or, +failing that, its arXiv id (via arxiv.org). An identifier can also be given +directly with -d (DOI) or -a (arXiv id). + +## bib-convert +Convert between bibtex and refer database formats. The direction is detected +automatically from the input, or can be forced with -b (to bibtex) or -r +(to refer). + +# Canonical form +Entries that pass through these tools are canonicalized: lowercase entry +types and field names, 2-space indentation, brace-delimited values with +internal whitespace collapsed, bare numbers left bare, and macro +references/concatenations preserved verbatim. @string and @preamble blocks +pass through untouched. + +# Installation + make install # PREFIX=/usr/local by default + +The scripts look for the shared awk library in $BIBUTILS_LIB, then in +lib/ next to the script, then in /usr/local/share/bibutils. If installing +with a non-default PREFIX, set BIBUTILS_LIB accordingly. + +# Dependencies +POSIX shell and awk only, with two exceptions: bib-fetch requires curl, +plus pdftotext (poppler) for DOI extraction from pdfs. + +# Tests + make test |