Added demo script

master
Mark 2022-11-12 19:15:08 -08:00
parent 1b951813f4
commit da997b80c7
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
3 changed files with 38 additions and 10 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ dist
# Misc # Misc
*.gif *.gif
misc/secrets.sh

View File

@ -1,11 +1,4 @@
# How to use this: # See makedemo.sh
# install vhs
# enter venv
# vhs < misc/demo.tape
#
# We need macros.lamb, so run this from
# the root of this repository.
#Output lambdemo.mp4 #Output lambdemo.mp4
Output lambdemo.gif Output lambdemo.gif
@ -25,7 +18,7 @@ Enter
Sleep 2000ms Sleep 2000ms
# Demo 1: load # Demo 1: load
Type ":load macros.lamb" Type ":load ../macros.lamb"
Sleep 500ms Sleep 500ms
Enter Enter
Sleep 2000ms Sleep 2000ms

34
misc/makedemo.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# Should be run from the misc directory.
# Will not work with any other root.
# Create this file.
# Should define two variables:
# DAV_USER="name:password"
# DAV_URL="https://site.com/dav-path"
if [[ -f "secrets.sh" ]]; then
source secrets.sh
else
echo "Cannot run without secrets.sh"
exit
fi
# Activate venv if not in venv
if [[ "$VIRTUAL_ENV" == "" ]]; then
source ../venv/bin/activate
fi
# Make sure our venv is running the latest
# version of lamb.
pip install --editable ..
# Make gif
vhs < demo.tape
# Upload
curl \
--user $DAV_USER \
--url $DAV_URL \
--upload-file "lambdemo.gif"