Posts from May 2026

Manipulating the Mac Photos Library

Trees on Dunwich Heath

If you're not a technically-inclined user of the Apple Photos app, you may want to skip this one!

The master copies of my photos live in two different worlds.

There are the quick snaps taken on my iPhone: handy to browse, to share, to sync across devices and, increasingly important for me, to search by using a map. I generally access these, like everyone else, using the Apple Photos app, and they're backed up to iCloud.

Then there are the 'proper' photos: taken on a 'real' camera, stored on a ZFS filesystem on my NAS, backed up automatically to two remote locations, and managed using Photo Mechanic and Capture One.

But increasingly, of course, the boundary between these is blurring, as phone cameras become capable of taking serious pictures, and as modern-day tasks such as sharing on social media and sending using Airdrop become something I want to do with my 'proper' photos too.

So I've started to experiment with ways to blend the two, and will talk more about them in a later post if they work well! But in the meantime, I just wanted to introduce Rhet Turnbull's excellent osxphotos software, which is really handy for anyone wanting to do something similar.

It's a command-line tool (and Python module) that can provide access to the Photos library and gives you a wide range of options. Here's just one example as an illustration:

osxphotos export ~/PhotoSync/FromPhotos \
--favorite --update --sidecar XMP \
--download-missing --exiftool \
--skip-edited

This will export any photos marked as 'Favourites' to the ~/PhotoSync/FromPhotos directory, only if they're new or updated since a previous export. It will create an XMP sidecar file -- a standard XML format for storing metadata alongside the images -- for each one. If the file is on iCloud but not on your local device, it will attempt to download it first, and it will skip versions edited in Photos because I just want the raw originals for my particular workflow. (There is a vast array of further options available, just on the export command! If, say, the Photos app has recognised the faces in your photos, you can turn the names into keywords in your exported files.)

And hey presto, I have a nice directory of favourite iPhone photos to incorporate in the library of my 'proper' photo-management software.

The import and export subcommands are the key ones for most people, but there are a couple of dozen other options...for example:

  • osxphotos labels will print out all the automatically-assigned labels given to your photos; I was interested to find things like 'floodplain' and 'handwriting' in there; terms I wouldn't otherwise have thought of typing into the search box.
  • osxphotos add-locations will let you find photos that have no location info and assign them a location if found on another photo taken within a specified time period: handy if, say, you took a photo with your good camera (which has no GPS) and would like to copy the geotags from the snaps you took at the same time with your iPhone.
  • Some of the commands, though entered on the command line, will operate by default on any images you've currently got selected in the Photos app. I've just clicked a couple of pictures of Rose and Tilly, and set their captions using:
    osxphotos batch-edit --caption "Rose and Tilly {created.year}-{created.mm}-{created.dd}"

Anyway, I hope this gives you some ideas. I'll be playing with this a lot in future, I think!

Running with the night

I have friends who run marathons. Seems a bit daft to me, though I do quite like the idea of walking one. But I learned from friends who had recently done the London one that there's also a recent tradition of the Reverse London Marathon, which starts at midnight and follows the course in reverse, arriving at the start a little while before all the other competitors set off.

Some sites refer to this as the Nohtaram Nodnol . But surely a reverse Marathon should really be called an 'Athens'?

Up to no good

When I'm ruler of the world — something which is, by the way, on my list of retirement projects, but keeps getting usurped by urgent tasks like booking an MOT for my mum's car, so I haven't got around to it yet — one of my first actions will be to ban the phrase 'up to' from all marketing materials.

Last year, I complained here about our bathroom cleaner, which announced that it removes 'up to 100% of bathroom grime and limescale', presumably to avoid disappointment for customers who thought it might remove 120% of either. It might actually only remove 80%, but that's fine, because they said 'up to', and it's still clearly a superior product to any competitor which did the same but only claimed to remove up to 90%.

Then a week or two ago, I was sent something that said, if I remember correctly, "Did you know your toilet could be costing you up to £581?" Well, I did, because it might be leaking through the floor, one drip at a time, into the dining room below and the water could seep from there into the secret trunk full of lost Gainsborough paintings that I have hidden below the floorboards. Oh, but, wait... then, it would be costing me much more than £581. So, no, I didn't know it could only be costing me up to £581. Perhaps I was the target market for this advertisement after all.

So I read a little bit further, where I discovered that what they meant (but hadn't said clearly) was £581 per year, but they made no mention of damaged masterpieces, and were really talking to people about the water bill incurred if their WC had a perpetual leak from the cistern into the bowl... people who presumably had previously assumed that this could only be costing them up to £580 per year!

So what I want to know is who came up with the precise £581 figure, and how they could be confident that the cost could never be, say, £600? I couldn't find the notice just now, and, doing a Google search for similar warnings, I discover pages stating that my loo could be costing me up to £200 per year, or up to as much as £1000. But, of course, it could be costing me 5p per annum, and all of their claims would still be valid.

So do watch out for these dubious phrases, but you only need to be on your guard for the next eight months or so, because by the end of this year I shall be ruler of up to 100% of the entire globe.