Category Archives: DB engineering

Installing Gerd Neu­ge­bauer’s Bibtool on OS X

I struggled for more hours than I would like to say trying to compile Gerd Neugebauer’s BibTool utility on my mac (OS 10.9.2). I kept running into problems with the kpathsea libraries. Not surprisingly, an old thread on the Mac OS-TeX mailing list provided the necessary insight. I’m reposting it here so that it might get better exposure on the Internet for those trying to do the same thing. Of course, someone who wasn’t shamelessly hacking away at it probably wouldn’t have had any problem at all . . .

BibTool is an amazing utility that does all those things we all wished BibDesk would do, but doesn’t: command line tools for removing fields, rewriting fields, grabbing references based on various criteria including regular expressions, pretty printing.

On Nov 23, 2009, at 1:49 PM, Jan Erik Moström wrote:

> I’m a bit slow (in all kind of ways 😉 and I’m just trying to figure out the MacTeX distribution … one thing that that I would like to do is to install “bibtool” (not bibtools) but I can’t figure out how to do this in a simple way. Using Gerbens TeX distribution it was possible to use the i-installer but now I’m at a loss how to do it.

You can download the source and compile it yourself from
(Get the *.gz) file.
Once you have expanded the tar archive, copy the makefile.unx file to makefile, then run
sudo make install
sudo make
This will place a working copy and manual pages in the /usr/local tree.
As long as you have /usr/local/bin in your path, things should work.

Of course, you have to have the developer tools to do this.
There are many options to set specific details during the compilation process, but I just did a vanilla “make” and
./bibtool -h
gave me the typical “usage” statement.

I’ve never used bibtool, don’t know how to use it, and don’t have any test files to ensure that it works in a real-life situation.
Otherwise, I now have a seemingly-functional version of “bibtool” that runs on X86_64 Snow Leopard.
I don’t guess that really helps you, but if you want it, send me a message off-list.

Graphviz: There’s an app for that!

The iPhone and the iPad touch have, admittedly, proven to be amusing. With the release of Instaviz, an implementation of Graphviz, it turns out that they can really be useful. At $9.99, Instaviz is one of the more expensive applications, but it is more than worth it. Graphs are created by tracing out shapes and connecting them by tracing out a line between them. Nodes of various shapes can be drawn, just as in the dot language. The app is remarkably good at determining what shape the user intends to draw, but will sometimes interpret what is intended to be a circle or ellipse as a diamond or record style. Node label, font, color, border, thickness, corner style, and fill color can be adjusted for each node. Misinterpretation of the the intended shape can be remedied using the formatting tools. Rendering of the graphs is animated (fun to watch!). Selecting a node by tapping it and shaking the iPod Touch/iPhone will delete a node. Graphs can be exported by email in a variety of formats, including Graphviz GV, PNG, PDF, Visio VDX, and—according to the documentation on the web site—can be imported from the Internet, and  exported to Mac and Windows machines using the Instavue tool.

Drawing graphs is easier than doing so in OmniGraffle—which uses Graphviz to lay out directed graphs—or coding in dot, and I use it like a notepad for sketching graphs while writing or brainstorming using pen and paper or my laptop. It’s easy enough to draw, format, and revise graphs while standing on a crowded NYC subway, the ultimate test of usability for an iPod Touch/iPhone app.

Here’s the .gv code and the graph it generated, which I exported by email. Multiple formats can be emailed at once; the graph and code below were sent in a single email.

digraph "" {
graph [layout=dot, IVFileName="Graph", bb="0 0 82 260", IVLastNodeNumber=6, IVLastNodeChangeForDiamond="\"style\" = \"rounded\"; ", IVScale="1.344304", IVContentOffset="0.000000,0.000000"];
node [label="\N"];
graph [IVFileName="Graph 2"];
"EF25C82B-1C2D-4522-9C04-44398A56A51C" [label=1, IVPosition="20,159", shape=circle];
"49973C53-DFEE-4B54-B3B1-4B0CC2FCF66B" [label=3, IVPosition="112,-27", shape=ellipse];
"E4C0BEAD-41FE-44E5-9EAF-19E4A46896F9" [label=4, IVPosition="223,7", shape=ellipse];
"2067E4D4-502B-426C-85F7-1F26B8193D2B" [label=6, IVPosition="117,46", shape=ellipse];
"E4C0BEAD-41FE-44E5-9EAF-19E4A46896F9" -> "EF25C82B-1C2D-4522-9C04-44398A56A51C";
"49973C53-DFEE-4B54-B3B1-4B0CC2FCF66B" -> "EF25C82B-1C2D-4522-9C04-44398A56A51C";
"49973C53-DFEE-4B54-B3B1-4B0CC2FCF66B" -> "E4C0BEAD-41FE-44E5-9EAF-19E4A46896F9";
"2067E4D4-502B-426C-85F7-1F26B8193D2B" -> "49973C53-DFEE-4B54-B3B1-4B0CC2FCF66B";

Creating a local copy of PubMed

I just updated a previous post about my plans to create a local copy of PubMed with a few more remarks about how I intend to proceed. I hope to have that work completed in the next two or three weeks. Check it out here: It will be a challenge to integrate the various data sources, including PubMed, our previously existing BibTeX database, and records in MARC format with one another. Semantic interoperability will be the greatest challenge.