Sequential cleanup commands fixed the VHS parse error but exposed a deeper issue: the test runner was blind to Hide/Show blocks, so cleanup commands ran as tests and could delete jobs mid-sequence. - test-tapes.sh now reads tapes line-by-line tracking Hide/Show state; only Type lines in visible (Show) blocks are executed as tests - Pre-clean named jobs from each tape at start of run_tape to handle leftovers from previously failed runs (mirrors what the Hide cleanup does when VHS records the tape) - 19 tape commands tested (cleanup commands correctly excluded) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
206 lines
4.5 KiB
VHS
206 lines
4.5 KiB
VHS
# systab — All Features
|
|
# A complete walkthrough: timers, services, status, logs,
|
|
# disable/enable, list mode, notifications, and edit mode.
|
|
|
|
Output demo/all-features.gif
|
|
Set Shell bash
|
|
Set Width 1200
|
|
Set Height 700
|
|
Set FontSize 16
|
|
|
|
Set TypingSpeed 50ms
|
|
|
|
Sleep 1s
|
|
|
|
# Clean up any pre-existing jobs with names used in this demo
|
|
Hide
|
|
Type "systab -X healthcheck_home 2>/dev/null; systab -X monitor_home 2>/dev/null; systab -X backup_home 2>/dev/null; systab -X health2_home 2>/dev/null; true"
|
|
Enter
|
|
Sleep 1s
|
|
Show
|
|
|
|
# ── Job Creation ──────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Recurring timer with a name'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -t 'every 5 minutes' -n healthcheck_home -c 'uptime'"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'One-time reminder with desktop notification'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -t 'in 30 minutes' -c 'echo reminder: meeting soon' -i"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Persistent service — starts on login, auto-restarts on failure'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -s -n monitor_home -c 'ping -c 1 localhost'"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# ── Status ────────────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Status of all jobs and services'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -S"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 3s
|
|
|
|
# ── Logs ──────────────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Viewing logs for a specific job'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -L healthcheck_home"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# ── Disable / Enable ──────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Disabling a job by name'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -D healthcheck_home"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 1s
|
|
|
|
Type "systab -S healthcheck_home"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Re-enabling the job'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -E healthcheck_home"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# ── Restart ───────────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Restart a job — resets the timer countdown'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -R healthcheck_home"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# ── Notifications ─────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Add desktop notification with -i (fires on job completion)'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -t 'daily' -n backup_home -c '/home/user/backup.sh' -i"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# ── List mode ─────────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'List all jobs in crontab format with -l'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -l"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# ── Edit mode ─────────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Edit mode — manage jobs in your $EDITOR'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "EDITOR=nano systab -e"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 3s
|
|
|
|
# Navigate to end of file in nano and add a new job with flags
|
|
Ctrl+V
|
|
Sleep 500ms
|
|
Down 5
|
|
Sleep 500ms
|
|
Type "new:n=health2_home,i,e=admin@example.com | hourly | curl -s https://example.com/health"
|
|
Sleep 1s
|
|
Enter
|
|
Sleep 500ms
|
|
|
|
Ctrl+O
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 500ms
|
|
Ctrl+X
|
|
Sleep 3s
|
|
|
|
# Show updated status
|
|
Hide
|
|
Type "./demo/note.sh 'Status after edit — new job added with flags'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -S"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 3s
|
|
|
|
# ── Clean ─────────────────────────────────────────────────────
|
|
|
|
Hide
|
|
Type "./demo/note.sh 'Clean up completed one-time timers'"
|
|
Enter
|
|
Sleep 500ms
|
|
Show
|
|
Sleep 1s
|
|
Type "systab -C"
|
|
Sleep 500ms
|
|
Enter
|
|
Sleep 2s
|
|
|
|
Sleep 2s
|