Software taking shape
My image gallery replacement software for Drupal is gradually taking shape.
The database software is HaskellDB fronting sqlite3. This has the nice property of not having to embed any SQL in the Haskell source that I have to write at all. It does have some limitations thought. For instance, no indexing, foreign key constraints, auto-increment columns. I can tackle the first two by writing separate ALTER TABLE program files for sqlite3 to be run at initialization time. The lack of auto-increment means I shall have to read the latest value from the database, and then add one (probably at the start of a session, and keep a running score in an MVar). Maybe I can add these sort of facilities to HaskellDB later.
Happstack is satisfactory. I'm not using MACID, simply because I wanted to try HaskellDB.
Form processing is with the formlets package. It lacked support for multi-selection forms, but I wrote a patch today which seems to work fine (formlets took me a bit of learning - the problem is I copied example code rather blindly, then started to use it without studying how it all worked first).
Processing EXIF data is OK. The exif package works, but does not recognize MakerNote information (at least for Nikon D300). That's OK, as the information I want to use (date/time of original, aperture, shutter speed, metering mode, GPS info) is all there. Ironically, the exif package uses the GD library (same author), but if I use the GD library to write the JPEG file, then the exif data is all thrown away, replaced by a few tags that the exif library can't recognize! Simply using lazy bytestring writeFile does the trick however. If I ever want to add the MakerNote information (and there's some interesting stuff there), then the simplest alternative will be to invoke exiftool and parse the output.
I'm using Text.XHtml.Strict for markup generation. I'd like to try Typeful.Text.HTMLs, but the license won't allow me to save my code in github, as i read it, so that's a non-starter (at least for now).
- colin's blog
- Login or register to post comments
