feat: enhance iPhone photo inbox receiver with notification, reveal, and clipboard copy options

This commit is contained in:
2026-05-11 11:27:42 -06:00
parent e01b59c065
commit 97ef0be216
2 changed files with 116 additions and 0 deletions

View File

@@ -30,6 +30,54 @@ IPHONE_PHOTO_OUTPUT_DIR="$HOME/Pictures/iPhone Inbox" \
python3 scripts/iphone-photo-inbox/receiver.py
```
Useful receive modes:
```bash
# Show a macOS notification when a photo arrives.
IPHONE_PHOTO_NOTIFY=1 IPHONE_PHOTO_TOKEN="choose-a-token" python3 scripts/iphone-photo-inbox/receiver.py
# Reveal each received photo in Finder.
IPHONE_PHOTO_REVEAL=1 IPHONE_PHOTO_TOKEN="choose-a-token" python3 scripts/iphone-photo-inbox/receiver.py
# Copy each received photo file to the Mac clipboard for pasting into apps.
IPHONE_PHOTO_COPY=1 IPHONE_PHOTO_TOKEN="choose-a-token" python3 scripts/iphone-photo-inbox/receiver.py
```
These can be combined:
```bash
IPHONE_PHOTO_NOTIFY=1 \
IPHONE_PHOTO_COPY=1 \
IPHONE_PHOTO_OUTPUT_DIR="$HOME/Pictures/iPhone Inbox" \
IPHONE_PHOTO_TOKEN="choose-a-token" \
python3 scripts/iphone-photo-inbox/receiver.py
```
The flags also accept `true`, `yes`, or `on`:
```bash
IPHONE_PHOTO_NOTIFY=true IPHONE_PHOTO_COPY=true ...
```
When these modes are active, the receiver startup log should include:
```text
notifications enabled
clipboard copy enabled
```
After each upload, it should also print:
```text
notification sent
copied file to clipboard
```
If those startup lines do not appear, the environment variables were not passed
to the running receiver process. If the startup lines appear but the post-upload
lines do not, check the printed `macOS action failed:` error and macOS privacy
permissions for Terminal/Codex automation and notifications.
Find the Mac IP address on the current network:
```bash