Pandemic Journal, Day 523

After a very nice walk this morning, I sat down to continue working on yesterday’s problem.

You might ask “What was the problem?” since I was incredibly vague yesterday. I’m not as fried today as I was last night, so I can go into more detail. Possibly too much more detail.

Diane wants to take photos from our Apple Photos library and upload them to her Forever account to make photo books for our trips. It would be helpful if the title and description in Apple Photos went along for the ride, but trying to do it in the obvious way (use the built-in export in Apple Photos) has some problems:

• Forever only has a “description” field; you can fake the title by renaming the photo to use the title as the filename, but that’s ugly at best.
• Olympus digital cameras insist on writing “OLYMPUS DIGITAL CAMERA” into one of the description fields in the photo metadata; it’s not easy to get rid of it.

So I decided to use osxphotos to export the photos; it gives much more control over the process, including being able to suppress “OLYMPUS DIGITAL CAMERA” and merge the title and description into one field that Forever will happily display.

I wanted to go a little further, though, and provide a visual separation like a hyphen between the title and description (“title – description”) but only if both parts were present. The README showed exactly how to do it, with a template like this:

"{title}{title?{descr?{descr != OLYMPUS DIGITAL CAMERA? - ,},},}{descr != OLYMPUS DIGITAL CAMERA?{descr},}" 

which, obviously, says put the title in; if there is a title AND a description AND the description isn’t OLYMPUS DIGITAL CAMERA, append a hyphen; then append the description (unless it’s OLYMPUS DIGITAL CAMERA).

Suppressing OLYMPUS DIGITAL CAMERA worked fine – but I always got the hyphen, even if the title or description was empty, like in the photo below, which is mostly here so Facebook has an image to use. The photo is of a pizza we had from Otto Portland in the South End of Boston when we were visiting Jeff earlier in the month.

I couldn’t figure out why the hyphen was always created, even though I spent several hours trying – and that’s where I finally stopped last night to write my very vague and frustrated journal entry.

Today, I decided to keep working on the problem so, if nothing else, I could file a good bug report (when I first started at IBM, one of the groups I worked with on RPS wouldn’t accept bug reports unless you could PROVE that the problem was theirs – that early experience scarred me, I’m afraid, but I write better bug reports as a result).

I figured out how to use my preferred Python debugger (PyCharm) on a program packaged as a standalone executable and set to work. Hours later, I had it – a change that the author had made a month ago broke the handling of boolean tests for empty strings. I sent him a fix – and then discovered that my fix isn’t quite complete.

I updated my report to tell him what was left unfixed, and I’m hoping he’ll be able to solve the problem completely. And if not, I think I have a simple workaround.

But that’s for tomorrow.

One thought on “Pandemic Journal, Day 523

Comments are closed.