switched to vhs demo creator

This commit is contained in:
2025-09-11 19:04:02 +02:00
parent 9cb9a66332
commit 4cdc4c8e18
13 changed files with 222 additions and 215 deletions

15
vhsdemo/Makefile Normal file
View File

@@ -0,0 +1,15 @@
.PHONY: demo check clean-demo
VHS = vhs
clean-demo:
%.gif: %.tape
@echo "vhs $<"
env PATH=..:$(PATH) vhs $<
check:
ls -l ../tablizer
demo: check clean-demo demo.gif

BIN
vhsdemo/demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB

157
vhsdemo/demo.tape Normal file
View File

@@ -0,0 +1,157 @@
# -*-sh-*-
Output demo.gif
Set FontSize 20
Set Width 1200
Set Height 1000
Set Theme { "name": "Whimsy", "black": "#535178", "red": "#ef6487", "green": "#5eca89", "yellow": "#fdd877", "blue": "#65aef7", "magenta": "#aa7ff0", "cyan": "#43c1be", "white": "#ffffff", "brightBlack": "#535178", "brightRed": "#ef6487", "brightGreen": "#5eca89", "brightYellow": "#fdd877", "brightBlue": "#65aef7", "brightMagenta": "#aa7ff0", "brightCyan": "#43c1be", "brightWhite": "#ffffff", "background": "#29283b", "foreground": "#b3b0d6", "selection": "#3d3c58", "cursor": "#b3b0d6" }
Set WindowBar Colorful
Set BorderRadius 10
Set Shell zsh
Set FontFamily "IBM Plex Mono"
Set CursorBlink false
Set PlaybackSpeed 1
Set TypingSpeed .05
# initialize
Hide
Type `PROMPT=''`
Enter
Type "setopt interactivecomments"
Enter
Type "autoload -U colors && colors"
Enter
Type `PS1="%{$fg[magenta]%}demo> %{$reset_color%}"`
Enter
Type "clear"
Enter
Show
Type "# Our input data"
Enter
Sleep 1s
Type "cat input | head -10"
Enter
Sleep 2s
Enter
Type "# Filter over all rows"
Enter
Sleep 1s
Type "tablizer Central < input"
Enter
Sleep 2s
Enter
Type "# Filter over all rows case insensitive"
Enter
Sleep 1s
Type "tablizer '/penc/i' < input"
Enter
Sleep 2s
Enter
Type "# Filter over specific column"
Enter
Sleep 1s
Type "tablizer -Fcost=4.99 < input"
Enter
Sleep 2s
Enter
Type "# Filter by regex on specific column"
Enter
Sleep 1s
Type "tablizer -Funits=Pen. < input"
Enter
Sleep 2s
Enter
Type "# Output as markdown"
Enter
Sleep 1s
Type "tablizer -Funits=Pen. -M < input"
Enter
Sleep 2s
Enter
Type "# Output as CSV"
Enter
Sleep 1s
Type "tablizer -Funits=Pen. -C < input"
Enter
Sleep 2s
Enter
Type "# Output as shell evaluable"
Enter
Sleep 1s
Type "tablizer -Funits=Pen. -S < input"
Enter
Sleep 2s
Type "bat eval.sh"
Enter
Sleep 2s
Type "tablizer -Funits=Pen. -S < input | ./eval.sh"
Enter
Sleep 2s
Enter
Type "# Reduce columns"
Enter
Sleep 1s
Type "tablizer -Funits=Pen. -c region,customer,units,count < input"
Enter
Sleep 2s
Enter
Type "# Sort by COUNT column numerically "
Enter
Sleep 1s
Type "tablizer -Funits=Pen. -c region,customer,units,count -kcount -i < input"
Enter
Sleep 2s
Enter
Type "# Do further filtering interactively"
Enter
Sleep 1s
Type "tablizer -Funits=Pen. -c region,customer,units,count -I -O < input"
Enter
Sleep 2s
Type "?"
Sleep 2s
Type "/"
Sleep 2s
Type "J"
Sleep 1s
Type "o"
Sleep 1s
Type "n"
Sleep 1s
Type "e"
Sleep 1s
Type "s"
Sleep 1s
Enter
Sleep 2s
Tab
Sleep 1s
Tab
Sleep 1s
Tab
Sleep 1s
Tab
Type "n"
Sleep 2s
Space
Sleep 1s
Down
Sleep 1s
Down
Sleep 1s
Space
Sleep 2s
Type "q"
Sleep 10s

5
vhsdemo/eval.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
while read LINE; do
eval "$LINE"; echo "$Customer ordered $Count ${Units}s"
done

44
vhsdemo/input Normal file
View File

@@ -0,0 +1,44 @@
Date Region Customer Units Count Cost Total
2016-01-06 East Jones Pencil 95 1.99 189.05
2016-01-23 Central Kivell Binder 50 19.99 999.50
2016-02-09 Central Jardine Pencil 36 4.99 179.64
2016-02-26 Central Gill Pen 27 19.99 539.73
2016-03-15 West Sorvino Pencil 56 2.99 167.44
2016-04-01 East Jones Binder 60 4.99 299.40
2016-04-18 Central Andrews Pencil 75 1.99 149.25
2016-05-05 Central Jardine Pencil 90 4.99 449.10
2016-05-22 West Thompson Pencil 32 1.99 63.68
2016-06-08 East Jones Binder 60 8.99 539.40
2016-06-25 Central Morgan Pencil 90 4.99 449.10
2016-07-12 East Howard Binder 29 1.99 57.71
2016-07-29 East Parent Binder 81 19.99 1619.19
2016-08-15 East Jones Pencil 35 4.99 174.65
2016-09-01 Central Smith Desk 2 125.00 250.00
2016-09-18 East Jones Pen Set 16 15.99 255.84
2016-10-05 Central Morgan Binder 28 8.99 251.72
2016-10-22 East Jones Pen 64 8.99 575.36
2016-11-08 East Parent Pen 15 19.99 299.85
2016-11-25 Central Kivell Pen Set 96 4.99 479.04
2016-12-12 Central Smith Pencil 67 1.29 86.43
2016-12-29 East Parent Pen Set 74 15.99 1183.26
2017-01-15 Central Gill Binder 46 8.99 413.54
2017-02-01 Central Smith Binder 87 15.00 1305.00
2017-02-18 East Jones Binder 4 4.99 19.96
2017-03-07 West Sorvino Binder 7 19.99 139.93
2017-03-24 Central Jardine Pen Set 50 4.99 249.50
2017-04-10 Central Andrews Pencil 66 1.99 131.34
2017-04-27 East Howard Pen 96 4.99 479.04
2017-05-14 Central Gill Pencil 53 1.29 68.37
2017-05-31 Central Gill Binder 80 8.99 719.20
2017-06-17 Central Kivell Desk 5 125.00 625.00
2017-07-04 East Jones Pen Set 62 4.99 309.38
2017-07-21 Central Morgan Pen Set 55 12.49 686.95
2017-08-07 Central Kivell Pen Set 42 23.95 1005.90
2017-08-24 West Sorvino Desk 3 275.00 825.00
2017-09-10 Central Gill Pencil 7 1.29 9.03
2017-09-27 West Sorvino Pen 76 1.99 151.24
2017-10-14 West Thompson Binder 57 19.99 1139.43
2017-10-31 Central Andrews Pencil 14 1.29 18.06
2017-11-17 Central Jardine Binder 11 4.99 54.89
2017-12-04 Central Jardine Binder 94 19.99 1879.06
2017-12-21 Central Andrews Binder 28 4.99 139.72