export_photo
Exports one photo from the macOS Photos library to an allowed folder as a still image, saving the edited version when available without launching Photos or overwriting files.
Instructions
Write one photo out as a still image file (Full Disk Access).
Writes the edited still, the image as Photos shows it; the original when there is
no edit. id is a photo id from photos (the old
<UUID>/L0/001 form is accepted). dest_dir must be inside the allowed root
(~/Downloads by default; MACOS_APPS_FILE_ROOT moves it) and is created if needed;
a path outside it is REFUSED. The filename is derived from the original name plus
the first 8 characters of the id, and an existing file is never overwritten.
Files over 250 MiB are refused.
Reads the library at rest, so it never launches Photos and needs no Automation. A
photo whose file is only in iCloud comes back status: "absent" with a reason:
nothing is downloaded. Videos are refused; a Live Photo exports its still only and
says skipped: "live photo motion". Hidden and Recently Deleted ids are refused.
Returns {id, status: "written", path, bytes, edited, dest_dir}. Additive: writes a new file, never modifies the Photos library.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| dest_dir | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||