Created
April 11, 2013 21:04
-
-
Save edsu/5367140 to your computer and use it in GitHub Desktop.
example of getting bibtex from a DOI url ; this is the list of supported formats https://github.com/citation-style-language/styles
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
curl -LH "Accept: text/bibliography; style=bibtex" http://dx.doi.org/10.1038/nrd842 | |
@article{Atkins_Gershell_2002, title={From the analysts couch: Selective anticancer drugs}, volume={1}, url={http://dx.doi.org/10.1038/nrd842}, DOI={10.1038/nrd842}, number={7}, journal={Nature Reviews Drug Discovery}, publisher={Nature Publishing Group}, author={Atkins, Joshua H. and Gershell, Leland J.}, year={2002}, month={Jul}, pages={491-492}} |
JS version, could be helpful.
I am not seeing quite the same output as this example. On the command line, in the title, it has a special character between the 't' and the 's'. Looking at Nature's online version, it should be:
From the analyst's couch
but what I see (and I'll insert the hex code for the character):
From the analyst\x19s couch
This is the output on both the command line using curl and in ruby using Mechanize.
I can't quite make sense of this. It doesn't appear to be standard ascii or utf-8. Trying this in the JS version given by hubgit (thank you), it simply eats the bogus character, there is no apostrophe in the title. Any ideas?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
very cool, thanks!