I've been having three wishes since some time:
- Lean Ruby
- Find an easy and fast way to find digital camera shoots that need an invocation of exiftran, and invoke it
- Find a comfy way to code user interfaces. In particular, I've always dreamed of sticking closures into event handlers.
I've recently managed to fulfill these three wishes in a single shot by coding drézza, a minimal picture browser with quick links to invoke exiftran. If anyone is wondering, "drézza" means "make it straight" in Bolognese.
It is simple, it is easy, it does all I need: you invoke it and it will show all the pictures in the current directory. If you invoke it with a directory as commandline argument, it will show all the pictures in that directory.
It will display the pictures in a list together with their thumbnail. The thumbnail is taken from the EXIF thumbnail. If a JPEG file has no EXIF thumbnail, it invokes exiftran to generate it.
Clicking on an image in the list shows it in detail. In the toolbar there are buttons to rotate the image with exiftran, which uses a lossless transform and respects exif data.
The tool comes in a single file, no need to install. The source code is clean and commented, and is also a nice demo of various Ruby/GTK2 and Ruby/Gnome2 features and programming tricks, including:
- subclassing GTK widgets
- creating custom signals
- reacting to widget resize
- processing GTK events during long computations
- updating the Gnome status bar
- embedding pixmaps in the source code
- using custom pixmaps for the toolbar
You can get it from http://www.enricozini.org/galleries/drezza.
If you play with it, let me know and I'll keep it up to date.