diff --git a/.gitignore b/.gitignore index c6bd647..9f1454c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ build dist # Misc -*.gif \ No newline at end of file +*.gif +misc/secrets.sh \ No newline at end of file diff --git a/misc/demo.tape b/misc/demo.tape index aa91477..15bede9 100644 --- a/misc/demo.tape +++ b/misc/demo.tape @@ -1,11 +1,4 @@ -# How to use this: -# install vhs -# enter venv -# vhs < misc/demo.tape -# -# We need macros.lamb, so run this from -# the root of this repository. - +# See makedemo.sh #Output lambdemo.mp4 Output lambdemo.gif @@ -25,7 +18,7 @@ Enter Sleep 2000ms # Demo 1: load -Type ":load macros.lamb" +Type ":load ../macros.lamb" Sleep 500ms Enter Sleep 2000ms diff --git a/misc/makedemo.sh b/misc/makedemo.sh new file mode 100755 index 0000000..53eb196 --- /dev/null +++ b/misc/makedemo.sh @@ -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"