Rob MacLeod
Here I describe a program (a combination of shell and awk scripts actually) called parseref that converts the output of a literature search using PubMed into something BibTEX can understand. To run this requires support for the Bourne shell and the awk program, included automatically for Unix and the Mac OSX but available as a utility for Windoze. In fact, you will need the GNU awk program, called gawk on many systems, for some of the functions in the program.
Right click (control-click on the Mac) on the links below to download each of the files:
To work properly, both the shell and awk files must be in the same directory as the files you wish to convert, or they must at least be available in the PATH (or whatever it is called in your operating system). My preference is to place both the shell script and the awk file into my /bin directory, which is almost always in the PATH. Then I make a symbolic link pointing parseref to parseref.sh, so that execution requires only typing parseref.
At present, parseref.sh works best for searches of the PubMed version of Medline, but in principle, any entries that adhere to the MEDLINE format should work.
Here are the steps required to do the parsing.
parseref.sh -p [-l] [-i ABC] infilenamewhere,
You can also run the awk script directly as follows if you have problems with the Unix shell script (include entire command on the same line):
gawk -f parsepubmed.awk [initials=ABC ] [authortype=lastnamefirst] infilename.pubmed >> outfilename.bibwhere infilename.pubmed and outfilename.bib are the input and output files, respectively.
Note that the output file may also contain some string variables that we use a lot to ensure consistent listings for journal names. The current set of such strings is as follows:
@String{j-BME = "IEEE Trans Biomed Eng"} @String{j-CR = "Circ Res"} @String{j-C = "Circulation"} @String{j-AJP = "Am J Physiol"} @String{j-ABE = "Ann Biomed Eng"} @String{j-JE = "J Electrocardiol"}
These will appear at the end of the output file and you can either use them or replace the journal variables with whatever strings you prefer.
This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 3 -no_white -link 3 -no_navigation -no_math -html_version 3.2,math -show_section_numbers -local_icons parseref
The translation was initiated by Rob Macleod on 2009-10-10