housekeeping script to remove dead images

I use mnemosyne daily to learn plant identification and make heavy use of images. All the images are stored in ~dougie/.mnemosyne/images and are referenced from the .mnemosyne config file in ~/.mnemosyne/default.mem.

Sometimes I delete cards that I don’t like, are poorly phrased, or have something wrong about them. This doesn’t delete the corresponding image.

I need to write a shell script to scan the default.mem file and extract all the filenames for the image jpegs, then check whether they exist. No, hang it, that’s the wrong way round. Although that would be useful too as sometimes I delete an image but not a card.

Ah, so it has to be a two-way script. Checking for orphans both ways. Are there images that are not in cards? And are there cards that reference images that aren’t there?

I should probably also wait until version 2.x of mnemosyne hits the streets in case there are any layout changes.

Time delay of adding caption to photo slideshow

photos make a great screensaver and the xscreensaver with glslideshow option is what I use. I often use it for ident practice, e.g. plants, birds etc. The image appears randomly on the screen and I think, I know what that is…

At the moment I have various scripts that can create ad-hoc collections of images based on the embedded tags. I also overlay a caption over the images using the convert bit of imagemagick and that works well.

What I want to do is have a time delay so that an image appears for say, 10 seconds, and then a caption appears over it. The filename would be ok. I can control how long the image appears in xscreensaver, and it’s surprisingly easy to train yourself to not-look at the filename or caption, but I’m curious as to whether it’s possible (without too much effort) to add the caption after some time-out period.