Script for downloading bibtex file using DOI

Digital Object Identifier (DOI) and bibtex files are common for anyone citing scientific articles. The DOI is used to uniquely identify any object, such as an electronic document, while bibtex is used to cite an article in Latex environment.

An article can be found on the internet via the address dx.doi.org/ followed by the DOI, e.g. http://dx.doi.org/10.1016/j.ocemod.2004.08.002. However, it takes a while to browse the publishers website, locate the appropriate bibtex file and save it to disk.

Here is a very handy Python script that fetches a bibtex file from NASA’s Astrophysics Data System using the article’s DOI.

It requires Python Beautiful Soup XML/HTML parser.
In Ubuntu-like linux distributions it can be installed easily:
sudo apt-get install python-beautifulsoup

Example:

>>doi2bibtex.py 10.1016/j.ocemod.2004.08.002
@ARTICLE{2005OcMod...9..347S,
author = {{Shchepetkin}, A.~F. and {McWilliams}, J.~C.},
title = "{The regional oceanic modeling system (ROMS): a split-explicit, free-surface, topography-following-coordinate oceanic model}",
journal = {Ocean Modelling},
year = 2005,
volume = 9,
pages = {347-404},
doi = {10.1016/j.ocemod.2004.08.002},
adsurl = {http://adsabs.harvard.edu/abs/2005OcMod...9..347S},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Advertisements

2 Responses to “Script for downloading bibtex file using DOI”


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: