Add gum-styled annotations and less paging to VHS demo tapes
Annotations use demo/note.sh (gum style with clear) wrapped in Hide/Show so only the styled box appears. Long output commands pipe through less with search to highlight key fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d19709dc1f
commit
e636ea323c
4 changed files with 140 additions and 23 deletions
|
|
@ -12,9 +12,12 @@ Set TypingSpeed 50ms
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
|
|
||||||
# First create some jobs to edit
|
# First create some jobs to edit
|
||||||
Type "# Create some jobs to work with"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Creating some jobs to work with'"
|
||||||
Enter
|
Enter
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
Type "systab -t 'every 5 minutes' -c 'echo ping'"
|
Type "systab -t 'every 5 minutes' -c 'echo ping'"
|
||||||
Enter
|
Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
@ -23,8 +26,11 @@ Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Open edit mode with EDITOR=nano for visibility
|
# Open edit mode with EDITOR=nano for visibility
|
||||||
Type "# Open edit mode — add notifications, create and modify jobs"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Opening edit mode — add notifications, create and modify jobs'"
|
||||||
Enter
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
Type "EDITOR=nano systab -E"
|
Type "EDITOR=nano systab -E"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
|
|
@ -54,17 +60,28 @@ Ctrl+X
|
||||||
Sleep 3s
|
Sleep 3s
|
||||||
|
|
||||||
# Show the result
|
# Show the result
|
||||||
Type "# See the changes applied"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Changes applied — checking status'"
|
||||||
Enter
|
Enter
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Type "systab -S"
|
Show
|
||||||
|
Sleep 1s
|
||||||
|
Type "systab -S | less"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 4s
|
Sleep 2s
|
||||||
|
Type "/Job:"
|
||||||
|
Enter
|
||||||
|
Sleep 3s
|
||||||
|
Type "q"
|
||||||
|
Sleep 1s
|
||||||
|
|
||||||
# Re-open edit mode to show flags are persisted
|
# Re-open edit mode to show flags are persisted
|
||||||
Type "# Re-open edit mode — flags are persisted"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Re-opening edit mode — flags are persisted'"
|
||||||
Enter
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
Type "EDITOR=nano systab -E"
|
Type "EDITOR=nano systab -E"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
|
|
|
||||||
3
demo/note.sh
Executable file
3
demo/note.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
clear
|
||||||
|
gum style --bold --foreground 6 --border rounded --border-foreground 8 "$*"
|
||||||
|
|
@ -12,8 +12,11 @@ Set TypingSpeed 50ms
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
|
|
||||||
# Desktop notification — success case
|
# Desktop notification — success case
|
||||||
Type "# Desktop notification on success/failure"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Desktop notification on success'"
|
||||||
Enter
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
Type "systab -t 'in 1 minute' -c 'echo success' -i"
|
Type "systab -t 'in 1 minute' -c 'echo success' -i"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
|
|
@ -21,14 +24,23 @@ Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Desktop notification — failure case
|
# Desktop notification — failure case
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Desktop notification on failure'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
Type "systab -t 'in 1 minute' -c 'exit 1' -i"
|
Type "systab -t 'in 1 minute' -c 'exit 1' -i"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Email notification
|
# Email notification
|
||||||
Type "# Email notification via sendmail"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Email notification via sendmail'"
|
||||||
Enter
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
Type "systab -t 'in 1 minute' -c 'echo test' -m user@example.com"
|
Type "systab -t 'in 1 minute' -c 'echo test' -m user@example.com"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
|
|
@ -36,8 +48,11 @@ Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Both notifications
|
# Both notifications
|
||||||
Type "# Both desktop and email"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Both desktop and email notifications'"
|
||||||
Enter
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
Type "systab -t 'every day at 9am' -c '/home/user/backup.sh' -i -m admin@example.com"
|
Type "systab -t 'every day at 9am' -c '/home/user/backup.sh' -i -m admin@example.com"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
|
|
@ -45,18 +60,37 @@ Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Show the generated service file to see ExecStopPost lines
|
# Show the generated service file to see ExecStopPost lines
|
||||||
Type "# Inspect generated service file"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Inspecting generated service file'"
|
||||||
Enter
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
Type "cat ~/.config/systemd/user/systab_*.service | head -20"
|
Type "cat ~/.config/systemd/user/systab_*.service | less"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 4s
|
Sleep 2s
|
||||||
|
Type "/ExecStopPost"
|
||||||
# Check status
|
|
||||||
Type "systab -S"
|
|
||||||
Sleep 500ms
|
|
||||||
Enter
|
Enter
|
||||||
Sleep 3s
|
Sleep 3s
|
||||||
|
Type "q"
|
||||||
|
Sleep 1s
|
||||||
|
|
||||||
|
# Check status
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Checking status of all jobs'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
|
Type "systab -S | less"
|
||||||
|
Sleep 500ms
|
||||||
|
Enter
|
||||||
|
Sleep 2s
|
||||||
|
Type "/Job:"
|
||||||
|
Enter
|
||||||
|
Sleep 3s
|
||||||
|
Type "q"
|
||||||
|
Sleep 1s
|
||||||
|
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
|
||||||
|
|
@ -12,48 +12,111 @@ Set TypingSpeed 50ms
|
||||||
Sleep 1s
|
Sleep 1s
|
||||||
|
|
||||||
# Create a recurring job
|
# Create a recurring job
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Creating a recurring health check (every 5 minutes)'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
Type "systab -t 'every 5 minutes' -c 'echo health check OK'"
|
Type "systab -t 'every 5 minutes' -c 'echo health check OK'"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Create a one-time job
|
# Create a one-time job
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Creating a one-time reminder (30 minutes from now)'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
Type "systab -t 'in 30 minutes' -c 'echo reminder: meeting soon'"
|
Type "systab -t 'in 30 minutes' -c 'echo reminder: meeting soon'"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Check status of all jobs
|
# Check status of all jobs
|
||||||
Type "systab -S"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Checking status of all jobs'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
|
Type "systab -S | less"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 4s
|
Sleep 2s
|
||||||
|
Type "/Job:"
|
||||||
# View logs
|
|
||||||
Type "systab -L"
|
|
||||||
Sleep 500ms
|
|
||||||
Enter
|
Enter
|
||||||
Sleep 3s
|
Sleep 3s
|
||||||
|
Type "q"
|
||||||
|
Sleep 1s
|
||||||
|
|
||||||
|
# View logs
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Viewing job logs'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
|
Type "systab -L | less"
|
||||||
|
Sleep 500ms
|
||||||
|
Enter
|
||||||
|
Sleep 2s
|
||||||
|
Type "/Logs for"
|
||||||
|
Enter
|
||||||
|
Sleep 3s
|
||||||
|
Type "q"
|
||||||
|
Sleep 1s
|
||||||
|
|
||||||
# Pause a job (uses the first job ID from status)
|
# Pause a job (uses the first job ID from status)
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Pausing a job'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
Type "systab -P $(systab -S 2>/dev/null | grep -m1 'Job:' | awk '{print $2}')"
|
Type "systab -P $(systab -S 2>/dev/null | grep -m1 'Job:' | awk '{print $2}')"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Show it's paused
|
# Show it's paused
|
||||||
Type "systab -S"
|
Hide
|
||||||
|
Type "./demo/note.sh 'Verifying job is paused'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
|
Type "systab -S | less"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
|
Sleep 2s
|
||||||
|
Type "/Disabled"
|
||||||
|
Enter
|
||||||
Sleep 3s
|
Sleep 3s
|
||||||
|
Type "q"
|
||||||
|
Sleep 1s
|
||||||
|
|
||||||
# Resume it
|
# Resume it
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Resuming the paused job'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
Type "systab -R $(systab -S 2>/dev/null | grep -m1 'Disabled' -B4 | grep 'Job:' | awk '{print $2}')"
|
Type "systab -R $(systab -S 2>/dev/null | grep -m1 'Disabled' -B4 | grep 'Job:' | awk '{print $2}')"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
Sleep 2s
|
Sleep 2s
|
||||||
|
|
||||||
# Clean up completed one-time jobs
|
# Clean up completed one-time jobs
|
||||||
|
Hide
|
||||||
|
Type "./demo/note.sh 'Cleaning up completed one-time jobs'"
|
||||||
|
Enter
|
||||||
|
Sleep 500ms
|
||||||
|
Show
|
||||||
|
Sleep 1s
|
||||||
Type "systab -C"
|
Type "systab -C"
|
||||||
Sleep 500ms
|
Sleep 500ms
|
||||||
Enter
|
Enter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue