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
+8 -6
View File
@@ -149,7 +149,7 @@ SCRIPT_DIR="${SCRIPT_DIR:-$(dirname "$(realpath "${BASH_SOURCE[0]}")")}"
# an external drive or network mount (recommended for production).
BASE_DIR="${BASE_DIR:-$SCRIPT_DIR/data}"
MOVIES_DIR="${MOVIES_DIR:-$BASE_DIR/movies}" # override if videos live on a different drive
MUSIC_DIR="/home/motion/drives/local-2tb/music/4 Seasons"
MUSIC_DIR="${MUSIC_DIR:-$SCRIPT_DIR/music}"
# ── Location & timezone ───────────────────────────────────────────────────────
# Used by sunrise.py to calculate sunrise time each day.
@@ -162,9 +162,11 @@ MUSIC_DIR="/home/motion/drives/local-2tb/music/4 Seasons"
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# (use the value in the "TZ identifier" column, e.g. America/Chicago)
#
LATITUDE=25.0000
LONGITUDE=-38.0000
TIMEZONE=America/New_York
# Set your real values in .env — these placeholder defaults keep the file
# shareable without leaking your exact location.
LATITUDE="${LATITUDE:-25.0000}"
LONGITUDE="${LONGITUDE:-0.0000}"
TIMEZONE="${TIMEZONE:-America/New_York}"
# ── Cameras ───────────────────────────────────────────────────────────────────
# List every camera name here (space-separated inside the parentheses).
@@ -334,8 +336,8 @@ AMBIENT_RETENTION_DAYS=30 # delete files older than this; 0 = keep
# ntfy — push notifications, zero signup for self-hosted or free cloud tier:
# Self-hosted: https://docs.ntfy.sh/install/
# Cloud: pick any topic name at ntfy.sh (no account needed)
#NTFY_ENABLED=true
#NTFY_URL=https://ntfy.sh/your-topic-here
NTFY_ENABLED="${NTFY_ENABLED:-false}"
NTFY_URL="${NTFY_URL:-}" # set in .env — keeps your topic URL out of git
# Email — requires the 'mail' command (package: mailutils or s-nail).
# Configure outbound SMTP via /etc/ssmtp/ssmtp.conf or msmtp.