mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-16 20:20:57 +01:00
added demo generator
This commit is contained in:
31
demo/demo.sh
Executable file
31
demo/demo.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
prompt() {
|
||||
if test -n "$1"; then
|
||||
echo
|
||||
echo -n "% $*"
|
||||
sleep 1
|
||||
echo
|
||||
$*
|
||||
echo
|
||||
echo -n "% "
|
||||
else
|
||||
echo -n "% "
|
||||
fi
|
||||
}
|
||||
|
||||
PATH=..:$PATH
|
||||
clear
|
||||
while IFS=$'\t' read -r flags table msg source _; do
|
||||
echo "#"
|
||||
echo "# source tabular data:"
|
||||
cat $table
|
||||
echo
|
||||
echo "#"
|
||||
echo "# $msg:"
|
||||
prompt "tablizer $flags $table"
|
||||
|
||||
sleep 4
|
||||
clear
|
||||
done < <(yq -r tables.yaml \
|
||||
| yq -r '.tables[] | [.flags, .table, .msg, .source] | @tsv')
|
||||
Reference in New Issue
Block a user