iMessage previews, caption hints, double-click .command launchers#3
Open
johansolve wants to merge 8 commits into
Open
iMessage previews, caption hints, double-click .command launchers#3johansolve wants to merge 8 commits into
johansolve wants to merge 8 commits into
Conversation
Photos refuses to coerce `id of p` for IPmi class items and rejects exporting them via `media item id "..."` references. We extract the uuid from AppleScript's coercion error message (which dumps the whole selection list literally) and look up the preview derivative via osxphotos — IPmi items live under `scopes/syndication/resources/ derivatives/` and load fine that way. Per-item export with try-wrapper as fallback: lets normal items export even when an IPmi item is in the selection, instead of failing the whole batch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Default behaviour: read the photo's current description from osxphotos and feed it to Gemma as guidance — useful when the model otherwise mis-identifies details a human got right (e.g. specific car brands). Opt out with --replace-caption when you want a fresh analysis. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…mand Finder runs .command files in Terminal on double-click, and they're indistinguishable from .sh scripts when invoked from a shell. Single extension covers both entry points. Adds gemma-photos.command and gemma-yearbook.command at repo root — thin wrappers around bin/gemma-photos and bin/gemma-yearbook that resolve the repo path from \$BASH_SOURCE so they work regardless of where the repo lives. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # photos_caption.py
…ion + IPmi Surface Finder double-click as the primary install/run path now that .command launchers exist for the installer, photos and yearbook. Mention --replace-caption and the IPmi/iMessage preview path picked up in the recent merges. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # README.md
Author
|
Heads-up: this PR ended up bundling three independent feature branches by accident — The three features are functionally independent and could be split into separate PRs if you'd prefer to review them apart — happy to reset and re-open as three. Otherwise the commits are still individually reviewable in the Commits tab. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three independent quality-of-life improvements to
gemma-photosand the install flow.iMessage / IPmi previews
Photos shared via iMessage live in the library with AppleScript class
«IPmi»instead ofmedia item. Two failure modes I hit:id of praises -1700 — the id property can't be coerced to text the normal waymedia item id "…"references (-1728)Fix: the AppleScript coercion error message dumps the whole selection list literally with every item's id inline, so we extract the i-th id from that. Once we have the uuid, osxphotos finds the on-disk preview under
Photos Library/scopes/syndication/resources/derivatives/and we hand that to Gemma — no Photos export needed.When an item genuinely has no derivative on disk (iCloud-only with derivative purged), per-item AppleScript export with a try-wrapper handles it; IPmi items that can't be exported drop out silently without taking the rest of the batch with them.
Existing caption as a hint
By default the photo's current description is fed to the model as a soft hint. Useful when a human got a detail right that the vision model gets wrong — e.g. a BMW the model kept insisting was a Volvo.
--replace-captionopts out for a clean re-pass.Double-click
.commandlaunchersinstall.sh/uninstall.shrenamed to.command— Finder runs them in Terminal on double-click, and they're indistinguishable from.shwhen invoked from a shell. Single extension covers both entry points.Adds
gemma-photos.commandandgemma-yearbook.commandat repo root: thin wrappers aroundbin/gemma-photosandbin/gemma-yearbookthat resolve the repo path from$BASH_SOURCE, so they work regardless of where the repo lives.README updated to lead with the double-click flow and document
--replace-caption+ the IPmi preview path.