From 077112b718eb29aecf331b1e703e7e90d8538e6c Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 13 Sep 2023 08:58:06 -0400 Subject: add some more scripts, change 2022 to emacsconf_year --- roles/obs/templates/intro | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'roles/obs/templates/intro') diff --git a/roles/obs/templates/intro b/roles/obs/templates/intro index 85ee895..7b5d4ab 100755 --- a/roles/obs/templates/intro +++ b/roles/obs/templates/intro @@ -5,17 +5,19 @@ if screen -list | grep -q background; then screen -S background -X quit fi # Update the overlay +SLUG=$1 FILE=$1 if [[ ! -f $FILE ]]; then - LIST=(/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm) + LIST=(/data/emacsconf/assets/stream/emacsconf-{{ emacsconf_year }}-$FILE--*.webm) FILE="${LIST[0]}" BY_SLUG=1 +else + SLUG=$(echo "$FILE" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }') fi shift -SLUG=$(echo "$FILE" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }') overlay $SLUG if [[ -f /data/emacsconf/assets/intros/$SLUG.webm ]]; then mpv /data/emacsconf/assets/intros/$SLUG.webm else firefox /data/emacsconf/assets/in-between/$SLUG.png -fi \ No newline at end of file +fi -- cgit v1.2.3