Skip to content

Instantly share code, notes, and snippets.

@lujiajing1126
Created April 15, 2018 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lujiajing1126/d94a0dd6db0af220b45611dee64d7712 to your computer and use it in GitHub Desktop.
Save lujiajing1126/d94a0dd6db0af220b45611dee64d7712 to your computer and use it in GitHub Desktop.
DOI to BIB
#!/bin/bash
usage() {
echo "doi2bib [doi]"
exit 127
}
[ $# -lt 1 ] && usage
fetchDOI() {
curl -L -s -H 'Accept: application/x-bibtex; charset=utf-8' "https://doi.org/$1"
}
fetchDOI $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment