What I've been programming on like mad these past few days is SMML - St. Mary's Music Library. At least search now works, even if I don't have the log-in-so-you-can-comment bit working yet.
Background:
Jennifer's been cataloging the assorted sheet music that has accumulated in the chior room at our
church on a scrounged computer (built mostly out of bits of machine I've cast off, plus a donated old vga
monitor from work and a yard-sale dot matrix printer) using an old package called
dbman and lynx.
Well, that has a few problems. First off, dbman isn't a very functional program to begin with; secondly, we need to advertize for them if we put it up somewhere so that other people are able to search with it.
So I'm a programmer, right? So it should be a simple matter to put something
like this together. I mean, it's just throwing up a database based on DBD::CSV,
and writing a few pages with Mason. These choices were made because dbman
stores things in a file format that DBD::CSV can use, or at least I thought it did. It turns out that DBD::CSV is a bit picky about some things.
I chose Mason because I thought it would be easy to set it up in an environment
where all I can set up is a cgi script; actually, that was true, modulo having
to work around the fact that the webserver's chroot contained almost no perl
modules. Plus, if it becomes possible to move to a mod_perl setup, Mason will let me do that.
So two weekends and several long nights later, the searching that shouldn't take me "more than a few hours" is up and functional. (Lots of stupid stuff I ran into along the way - including an interesting bug that vanished when I looked at it with the debugger, because the condition I set on a breakpoint caused an integer comparison to happen. perl's string<->number equivalence can get whacky) Now I need to add everything necessary to let Jennifer make changes, and then I can work on allowing other people to add annotations (maybe; we're still not certain that there's any need for this feature). The changes bit is interesting since I have to keep three copies of the database in sync - one on cush (my home machine), one on snowplow, and one on phoenix (the machine sitting in the chior room basement). Fortunately only one person is going to be making any changes.
The search language parser is a neat hack, if I do say so myself. I should document it sometime as an example of leveraging perl's parser to do your work for you.
While taking a break I ran across some old pictures I had taken while in Baltimore, and my lj picture needed changing.