Skip to content

Instantly share code, notes, and snippets.

@edsu
Created April 11, 2013 21:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/5367140 to your computer and use it in GitHub Desktop.
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
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}}
@natejenkins
Copy link

very cool, thanks!

@hubgit
Copy link

hubgit commented Apr 11, 2013

JS version, could be helpful.

@natejenkins
Copy link

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