Created
March 24, 2020 16:47
-
-
Save deeplycloudy/e72bc1379e7b2e5451bec0acf2aaa376 to your computer and use it in GitHub Desktop.
Use dx.doi.org service to get a BibTeX-formatted reference from a DOI.
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 | |
# | pbcopy; pbpaste are mac-only commands; delete to simply print to the shell. | |
# Use: getbib $DOI where $DOI is something like 10.xxx/xxxxxx | |
getbib(){ | |
curl -LH "Accept:text/bibliography; style=bibtex" http://dx.doi.org/$1 2>/dev/null | cut -c 2- | pbcopy ; pbpaste | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment