Ruby and GEDCOM

Before long I’ll need some data to work with. The easiest way to get that is to write some code that’ll convert a GEDCOM (which is easily exported from PAF) into XML or, even better, SQL code that will place it directly in a database. And turns out there’s already some stuff out there.

Ruby Quiz #6 is a GEDCOM parser, and there’s plenty of interesting code there to look through. There’s also Jamis Buck’s GEDCOM/Ruby Module, which I downloaded but haven’t had time to look at yet.

Part of me wants to write everything myself, but that’s stupid (unless the existing stuff is poorly done, of course). So I’ll evaluate the existing code and see if any of it fits the bill. Hopefully it does. :) Eventually I’ll have to write a PAF importer/exporter, though, because I’m not aware of any open source projects that do that.

Anyway, the important thing right now is to get some real data into the database (which means designing the database structure…) so I can get the prototype up. Time is the hard thing right now, with school crunching in (midterms are this week) and tight work deadlines. But that’s okay.

One last thing: coding Ruby in TextMate is really fun. Seriously. It’s something I haven’t experienced in a while, but it’s such a pleasant thing that it draws me back and makes me want to code more. That’s good. :)

[tags]Ruby, GEDCOM, XML, PAF, TextMate[/tags]