-
-
Save sunhwan/9ddd165e6850f4c4c06611cfeffc3809 to your computer and use it in GitHub Desktop.
doi2bib
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/sh | |
if [[ "${1}" == "http"* ]] ; then | |
doi="${1}" | |
else | |
doi="http://dx.doi.org/${1}" | |
fi | |
# Stopped working around 2015-10-04. | |
# curl -sLH "Accept: text/bibliography; style=bibtex" "${doi}" | sed 's/^ *//' | |
# This still works and seems to be the recommended approach: http://www.crosscite.org/cn/ | |
curl -LH "Accept: application/x-bibtex" "${doi}" | sed 's/^ *//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment