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 … Continue reading “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.
 

housekeeping script to keep jpegs manageable

This crops up periodically and it surprises me that with all the free tools you get with linux that there’s nothing (that I can find, at least) that will allow me to keep a folder tree within a manageable size. I did write a shell script to do this but I’ve lost it. With a … Continue reading “housekeeping script to keep jpegs manageable”

This crops up periodically and it surprises me that with all the free tools you get with linux that there’s nothing (that I can find, at least) that will allow me to keep a folder tree within a manageable size. I did write a shell script to do this but I’ve lost it. With a webcam using motion often triggering over 5000 images a day (four times that if it’s windy) I need to have some automated housekeeping to purge the older images.

I think what I had before was something that had a user-definable value (e.g. 5GB) and it would iteratively recurse a directory tree, deleting the older directories until the space taken up dropped below the threshhold. There are problems with this (e.g. accidentally Tagging or touching an old jpeg) that causes the directory time stamp to be updated. But all these thousands of jpegs are piling up and I’ll have to address this sometime soon.

Suppertime

I thought it’d be easier this evening. I wore drabbier clothes, and poured flatter beer. I draped the cover over the mini-greenhouse and huddled against its backdrop. I practically disappeared.

But the alarm calls of the blue tits where very insistent tonight and they were not for feeding. Time after time I heard the chicks calling for food and observed the adults doing a bodyswerve. Then Rosie, my big fat black cat came along and decided to curl up at my feet, and things were not looking good.

I saw both adults, and witnessed one getting so fed-up at the abortive attempts at returning to the nest that it ate the supper itself (quite tasty it looked too).

Guilt gained the high ground, and I decided to call it a night. I was perplexed that the birds would be more spooked tonight, when, if anything, I was drabber and more familiar. I was also interested to see both adults together. How do they manage to produce the alarm calls with their mouths full? Then as I lost interest in them, they lost interest in me, and suddenly decided I was no threat.

Suppertime at the bird table

I’ve been registered on the BTO Nestbox challenge for years and some years I’m more thorough than others. One nestbox is used year after year by blue tits. Blue South as it’s registered with the BTO, perhaps should be renamed Old Faithfull as it never fails to get used. There’s a webcam that sometimes points in the general direction but it’s rather a hit or miss affair.

But sitting quietly outside, with beer in one hand, and camera in the other, I am soon rewarded …

Blue tit returning with foodHe (she?) is nervous at first, as he knows I’m sitting there. For a few minutes I was feeling guilty as I could hear the chicks crying for food inside and the adult made a few approaches then flew away again with a series of loud alarm calls. In previous years they’ve soon accepted my presence. When the adult returned for the 3rd time I decided if he spooked out again I’d leave the scene. He didn’t and I managed to get a few nice photos in the fading light.

Meanwhile on the bird table I could see a Jay munching through the dish of the day. Shy birds, I’ve seen them around, but usually fleetingly, and easily spooked. They must be hungry as I managed to get quite close and it seemed remarkably unperturbed. I’m pretty sure it knew I was there as my fieldcraft is not something that would impress Ray Mears.

and getting stuck in …

Germolene

In a 2009 blog post called Scratch and Sniff Botany the botanist Phil Gates writes about Meadowsweet (Filipendula ulmaria) and how when you crush the leaves they smell like germolene. This is what it looks like: Meadowsweet has distinctive red stems and made a mental note to crush a few leaves the next time I … Continue reading “Germolene”

In a 2009 blog post called Scratch and Sniff Botany the botanist Phil Gates writes about Meadowsweet (Filipendula ulmaria) and how when you crush the leaves they smell like germolene. This is what it looks like:

MeadowsweetMeadowsweet has distinctive red stems and made a mental note to crush a few leaves the next time I came across some. I found some and it smelled nothing like germolene. Or so I thought. What I thought I’d found was baby meadowsweet, but clearly it’s something else entirely. Looking at it closely I can see it clearly looks nothing like meadowsweet. This is what I was crushing:

Not MeadowsweetApart from a passing resemblance they look nothing like each other. I’m not sure what it is but it might be the rather obviously named Silverweed (Potentilla anserina). I think I’ll just wait until the flowers come out.

 

Upgrading wordpress

Well that was a brief moment of unease. Still new to the whole wordpress world I logged on to see a message advising me to upgrade to 3.1.3 and reminding me to backup before proceeding. Yeah, whatever. I’d only just started so hadn’t that much to backup. Plus I was a bit lazy. I could … Continue reading “Upgrading wordpress”

Well that was a brief moment of unease. Still new to the whole wordpress world I logged on to see a message advising me to upgrade to 3.1.3 and reminding me to backup before proceeding. Yeah, whatever. I’d only just started so hadn’t that much to backup. Plus I was a bit lazy.

I could download 3.1.3 myself or get wordpress to DIY. I chose the latter and all looked well until I tried to login again and:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

That brought me down to earth with a bump and I consulted the University of Google on the message. Lots of references to .htaccess files and problems with add-ons, all of which sounded like hard work. Looking for an easy fix I had a look at my error logs and found lots of Premature end of Script errors and references to various .php files. I had a déjà vu moment and remembered the original tips I’d read on this blog when I was originally struggling with installing wordpress in the first place. Sure enough, same old same old.

Running:

find . -name "*.php" -exec chmod 755 '{}' ;
chmod 600 wp-config.php

does the trick.

youngsters at the feeders

I have a webcam pointing at the Blue Tit nest box but unfortunately it gets so much movement ‘noise’ that I end up with skipfuls of images and it’s hard to sort out the good ones and all sorts of empty images get uploaded automatically to my flickr photostream. There’s always the conventional approach of … Continue reading “youngsters at the feeders”

I have a webcam pointing at the Blue Tit nest box but unfortunately it gets so much movement ‘noise’ that I end up with skipfuls of images and it’s hard to sort out the good ones and all sorts of empty images get uploaded automatically to my flickr photostream.

young hungry starlingThere’s always the conventional approach of pointing a real camera at the birds and pressing the button.

This youngster has landed on top of the fat feeders and is screaming at the adult nearby to come and feed him. The adult, however, is older and wiser, and has spotted me nearby and is keeping a wary eye on me.

I do like this picture and its drama with the youngster screeching for attention. But there’s always something nice about getting a photo of a bird on a natural perch. Here’s the same bird again balancing on a bit of hazel:

Starling on hazel

Not as excited this time but a more natural backdrop, which I like.

And every year we get young sparrows that are always good to see. I don’t know where they’re nesting because it’s certainly not the expensive roof terrace that I put up for them years ago and has been ignored every year.

House Sparrow

Bigger versions of these photos can be found in my zenfolio gallery.



masking motion (cont …)

Still loads of noise. Time for an extreme mask file: That’s just a small area around the nest-box entrance. But still an awful lot of images I wonder if motion is actually using the mask file. Presumably there’s a debug option I can switch on …

Still loads of noise. Time for an extreme mask file:

That’s just a small area around the nest-box entrance. But still an awful lot of images

I wonder if motion is actually using the mask file. Presumably there’s a debug option I can switch on …