Friday, 1 November 2013

Bibpup: a Perl script for updating Bibtex files using Inspire

Bibtex is a nice way to manage bibliographies, by collecting the bibliographical data of many articles in one Bibtex file, and then citing only some of these articles in a given document. However, the bibliographical data of an article can change when the article gets published in a journal. If the article was initially entered in the Bibtex file as a preprint, the Bibtex file must then be updated.
Here I propose a Perl script which does this automatically using the search engine Inspire, which is the standard search engine for high-energy physics and related fields.

Of course I do not believe that it is very relevant or useful to know whether an article is published and in which journal, but journals typically require such data to be displayed in bibliographies. In any case, the decision to display publication data or not is done at the level of the bibliography style file -- the Bibtex file itself is only a database, which should be as complete as possible.

So what does the script do? the script takes a Bibtex file, and for each entry which has no publication data, but an eprint field with an Arxiv number, a request is sent to Inspire. If publication data are found, then the entry is modified to include them. (The rest of the entry, and in particular the key, are not changed.)