Created
April 15, 2018 06:55
-
-
Save lujiajing1126/d94a0dd6db0af220b45611dee64d7712 to your computer and use it in GitHub Desktop.
DOI to BIB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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