The fundamental mania at work here is basically “wring all the motion out of a thing you can.” I wrote imgup because I hated what Microblog was doing to my photos, but also hated the whole shuffle of “upload an image to SmugMug, hand-write the markup to embed it in a post.”
So it was an incremental improvement to build a web UI that stripped all the extraneous motion out of that workflow using the only thing I knew very well, which is Ruby/Sinatra.
My recent journey into better note management reminded me it’s not terrible to work in a shell scripting environment, so that’s why I dusted off imgup, which was nothing but a web front-end until this week, and bolted on a CLI interface. I started that thinking “well, you usually just export photos from Lightroom or Photos onto ~/Desktop before uploading them with imgup, so just save a trip to the browser.”
Then that became “why even open a shell when you have Raycast there and understand how to work on selections in Photos or Finder with AppleScript?”
And then I remembered that an early pass at imgup extracted the exif caption to provide the alt text (since then Adobe has exposted a literal alt text field in Lightroom) because I was thinking “why not just embed that in the photo itself once, when you’re already processing it?” I don’t know why I abandoned that, but this evening my thinking took me toward “why even work on a file in the Finder from Raycast when you could just export the image straight from Lightroom to Smugmug via this shell tool you’ve built?”
So I wired imgup’s CLI to a Hazel folder action:
- Edit the photo in Lightroom
- Make sure to edit the caption field (this is the only thing Photos and Lightroom expose in common)
- Export to a Hazel-watched folder
- Set up a folder action that grabs the photo, extracts the caption, and feeds that as an argument to imgup
- Copy the resulting SmugMug link/markup/etc. to the clipboard
- Hazel dumps the copy in the trash
Barring Adobe doing something freakishly helpful, like adding a scripting library, I can’t think of any way to wring any more motion out of this thing: Type in a caption, press cmd-e to do the last export action, and the photo goes from Lightroom up to SmugMug and back to a snippet in my clipboard.
There’s one small tragedy in this, which is that Apple Photos both tells you that you are setting the “Caption” for a photo, then seems to fail to actually store that anywhere in the EXIF data. exiftool
can’t find it, anyhow. OTOH, now that I have the Hazel/imgup folder going, I can process images-to-snippets from any photo tool, and Photos was at least amenable to making a QuickAction to dump the selected photo into the upload folder. I just end up having to add the caption after the snippet is made, and my SmugMug photo hygiene suffers.
(Update: Apple Photos actually does seem to set the field, but my code was exporting the original photo, and Apple seems to treat any metadata you add in Photos as a non-destructive change, so you have to disable the “original” flag in the AppleScript export.)