Move location/music/ntfy config to .env; add paths to notifications

sky-cam.conf:
- MUSIC_DIR now uses override pattern (MUSIC_DIR="${MUSIC_DIR:-$SCRIPT_DIR/music}")
  so the real path can be set in .env without hardcoding it
- LATITUDE/LONGITUDE use override pattern; set real coords in .env to keep
  location private and out of git
- NTFY_URL now uses override pattern with empty default; set in .env
- NTFY_ENABLED moved out of comments into active config with false default

sunrise.py:
- Reads .env after sky-cam.conf so .env values override (same source order
  as sky-cam.conf itself)
- Handles ${VAR:-default} bash syntax when parsing sky-cam.conf values

All completion notifications now include the full output file path so you
can tell at a glance where the file landed:
- daily_sunrise_video.sh: "filename — Xs, sunrise at HH:MM | /full/path"
- 4-seasons.sh: "filename — Xs | /full/path"
- montage-mvt.sh: "filename | checks | /full/path | verify: ..."
- year-end-join.sh: "filename — Xmin | /full/path" (also adds [cam] to title)

install.sh .env.example now includes LATITUDE, LONGITUDE, MUSIC_DIR, NTFY_URL

https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
Claude
2026-04-22 13:30:02 +00:00
parent ae40b898f6
commit 74a74570fc
7 changed files with 47 additions and 20 deletions
+12 -1
View File
@@ -264,12 +264,23 @@ env_example="$HERE/.env.example"
echo "CAM_RTSP_${cam}='rtsp://admin:PASSWORD@192.168.1.XXX:554/stream1'"
done
echo ""
echo "# Location — used by sunrise.py to calculate sunrise time each day."
echo "# Right-click your location in Google Maps to get coordinates."
echo "LATITUDE=0.0000"
echo "LONGITUDE=0.0000"
echo ""
echo "# Music directory — path to your Four Seasons music files."
echo "# Files must be named so that the season and Mvt number appear in the filename,"
echo "# e.g. 'Vivaldi_Spring_Mvt1.mp3'. Defaults to a 'music' subfolder next to the scripts."
echo "# MUSIC_DIR=/path/to/your/music/4 Seasons"
echo ""
echo "# Mattermost upload"
echo "mattermost_url=https://your-mattermost-server.example.com"
echo "access_token=your-access-token-here"
echo "channel_id=your-daily-upload-channel-id-here"
echo ""
echo "# Notifications (uncomment whichever you use)"
echo "# Notifications"
echo "# ntfy — set NTFY_ENABLED=true in sky-cam.conf, then set your topic URL here:"
echo "#NTFY_URL=https://ntfy.sh/your-topic"
echo "#EMAIL_TO=you@example.com"
echo "#MM_NOTIFY_CHANNEL_ID=your-notify-channel-id-here"