Last active
June 24, 2016 15:30
-
-
Save achabotl/2a21182b1817b8308c08 to your computer and use it in GitHub Desktop.
doi2bib
This file contains hidden or 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
Updated because the
text/bibligraphy
header stopped working.