Add year-based folders, attribution overlay, notifications, crontab/systemd
season_info.py - Add ASTRO_YEAR: year of the Winter solstice that started the current cycle (Spring/Summer/Autumn 2026 → 2025; Winter Dec-2026 → 2026) 4-seasons.sh - Daily clip output path now includes ASTRO_YEAR: movies/$name/$ASTRO_YEAR/$SEASON/Mvt$N/ montage-mvt.sh (full rewrite) - Attribution is now a drawtext overlay (top 6 s of the video, fade in/out) instead of an appended black card — no frame-size matching needed, and year-end join requires no special handling - Output path mirrors the new year-based folder structure - Sends notification via notify.sh when done - Automatically triggers year-end-join.sh after Autumn Mvt 3 year-end-join.sh (new) - Concatenates all 12 movement montages for a given ASTRO_YEAR - Output: movies/$name/$ASTRO_YEAR/$name-$ASTRO_YEAR.mp4 - Sends notification when done notify.sh + notify_config.txt (new) - Generic best-effort notification helper: ntfy, email, Mattermost text post - All methods disabled by default; user fills in notify_config.txt sky-cam.crontab + systemd/ (new) - Crontab file: sunrise at 09:00, 4-seasons at 01:00, fullday at 02:00 - systemd .service + .timer units for all three daily jobs - montage/year-end triggered internally, not by cron https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
Installing systemd timers
|
||||
========================
|
||||
|
||||
1. Edit the ExecStart paths in each .service file to match where your scripts live.
|
||||
|
||||
2. Copy units to the systemd user directory (no root needed):
|
||||
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp sky-cam-*.service sky-cam-*.timer ~/.config/systemd/user/
|
||||
|
||||
Or system-wide (root required):
|
||||
|
||||
sudo cp sky-cam-*.service sky-cam-*.timer /etc/systemd/system/
|
||||
|
||||
3. Reload and enable:
|
||||
|
||||
# User-level
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now sky-cam-sunrise.timer
|
||||
systemctl --user enable --now sky-cam-4seasons.timer
|
||||
systemctl --user enable --now sky-cam-fullday.timer
|
||||
|
||||
# System-level (replace --user with no flag, add sudo)
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now sky-cam-sunrise.timer
|
||||
...
|
||||
|
||||
4. Check status:
|
||||
|
||||
systemctl --user list-timers sky-cam-*
|
||||
journalctl --user -u sky-cam-4seasons.service -f
|
||||
|
||||
Notes
|
||||
-----
|
||||
- Persistent=true means missed runs (e.g. system was off at 01:00) are
|
||||
caught up on next boot, within the same day.
|
||||
- montage-mvt.sh and year-end-join.sh are NOT scheduled directly — they
|
||||
are triggered automatically by 4-seasons.sh on the appropriate days.
|
||||
- notify.sh fires inside montage-mvt.sh and year-end-join.sh; it is not
|
||||
a separate scheduled job.
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Sky-Cam Four Seasons daily clip (+ montage trigger on last day)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/home/motion/drives/local-2tb/sunrise-scripts/4-seasons.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Sky-Cam Four Seasons daily clip — 01:00
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 01:00:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Sky-Cam full-day timelapse (10-day retention)
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/home/motion/drives/local-2tb/sunrise-scripts/fullday-video.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Sky-Cam full-day timelapse — 02:00
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 02:00:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Sky-Cam daily sunrise video → Mattermost
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
# ── Edit this path ────────────────────────────────────────────────────────────
|
||||
ExecStart=/home/motion/drives/local-2tb/sunrise-scripts/sunrise_video.10s.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Sky-Cam sunrise video — daily at 09:00
|
||||
|
||||
[Timer]
|
||||
# Run at 09:00 every day (after sunrise window has ended).
|
||||
OnCalendar=*-*-* 09:00:00
|
||||
# If the system was off at 09:00, run as soon as it boots (within 1 hour).
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user