Files
q-tools/reporting/doi2bib

12 lines
260 B
Bash
Executable File

#!/bin/bash
function helpexit() {
echo Print out bibtex entry from a DOI.
echo Give DOI code as the argument
exit
}
[[ -z "$1" ]] && helpexit
[[ "$1" = "-h" ]] && helpexit
curl -LH "Accept: text/bibliography; style=bibtex" "http://dx.doi.org/$1"