-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/dist/ | ||
/.coverage | ||
/result | ||
*.cast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -e -x | ||
|
||
for demofile in ./demos/*.exp; do | ||
name="${demofile##*/}" | ||
name="${name//.exp/}" | ||
asciinema rec --overwrite \ | ||
--rows 25 --cols 100 \ | ||
-c "$demofile" "demos/${name}.cast" | ||
agg \ | ||
--speed 3 \ | ||
--theme asciinema \ | ||
"demos/${name}.cast" "demos/${name}.gif" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env expect | ||
|
||
proc exp_prompt {} { | ||
expect -re {[$] $} {}; | ||
} | ||
|
||
proc exp_sleep { t } { | ||
expect { | ||
-timeout "$t" | ||
timeout {} | ||
-re {.} { exp_continue; } | ||
} | ||
} | ||
|
||
proc send_sleep { s { t 1 } } { | ||
exp_send "$s"; | ||
exp_sleep "$t"; | ||
} | ||
|
||
spawn -noecho /bin/bash -i; | ||
exp_prompt; | ||
|
||
exp_send "source venv/bin/activate\r"; | ||
exp_prompt; | ||
|
||
exp_send "src/bin/ptvertmenu-man --section 1 --menu-max-width=20\r"; | ||
expect {>} {}; | ||
|
||
set BACKSPACE "\010"; | ||
set TAB "\011"; | ||
set UP "\033\[A"; | ||
set DOWN "\033\[B"; | ||
set PGDN "\033\[6~"; | ||
|
||
exp_sleep 1; | ||
send_sleep "$DOWN"; | ||
send_sleep "$DOWN"; | ||
|
||
send_sleep "b"; | ||
send_sleep "a"; | ||
send_sleep "s"; | ||
send_sleep "h"; | ||
send_sleep "$DOWN"; | ||
send_sleep "$DOWN"; | ||
|
||
send_sleep "\011"; | ||
send_sleep "$PGDN"; | ||
send_sleep "$PGDN"; | ||
|
||
send_sleep "$TAB"; | ||
send_sleep "$UP"; | ||
send_sleep "$BACKSPACE"; | ||
send_sleep "$BACKSPACE"; | ||
send_sleep "$BACKSPACE"; | ||
send_sleep "$BACKSPACE"; | ||
send_sleep "$DOWN"; | ||
send_sleep "$DOWN"; | ||
send_sleep "$UP"; | ||
send_sleep "$UP"; | ||
|
||
exp_send "\033q"; | ||
exp_prompt; | ||
exp_send "exit\r"; | ||
expect eof | ||
wait | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.