A command-line tool for managing academic references using DOIs and the CrossRef API.
sref-db is a simple reference manager that stores bibliographic information in JSON format. It queries the CrossRef API to fetch metadata for academic papers and stores them locally for easy access and citation formatting.
make installThis will:
- Build the
sref-dbbinary - Create configuration directory at
~/.config/sref/ - Install the binary to
/usr/local/bin/
Before using the tool, add your email to ~/.config/sref/email.conf. This is part of the "polite" guidelines for the API:
echo "your.email@example.com" > ~/.config/sref/email.confsref-db add -doi "10.1007/s11104-024-06671-1"With logging:
sref-db add -doi "10.1007/s11104-024-06671-1" -o log.txtMaybe want to add a lot of DOIs from a file:
cat dois.txt | xargs -I '{}' sref-db add -doi '{}' -o log.txtPrint all references:
sref-db readPrint a specific reference:
sref-db read -doi "10.1007/s11104-024-06671-1"sref-db del -doi "10.1007/s11104-024-06671-1"By default, references are stored in ~/.config/sref/references.json. Use the -f flag to specify a different file:
sref-db add -f custom.json -doi "10.1007/s11104-024-06671-1"The scripts/ directory contains helper utilities:
json2apa- Bash script for APA formatting with jq. Not real APA, but kind of
make uninstallThis removes the binary and configuration directory.
- Go 1.23.4 or later
This project uses the crossrefapi library from Caltech Library.