From 745bba1474efe9161468d44bf959f4e830e3dce9 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Thu, 23 Jan 2025 08:58:18 -0500 Subject: convenience scripts --- roles/prerec/templates/get-file-prefix | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 roles/prerec/templates/get-file-prefix (limited to 'roles/prerec/templates/get-file-prefix') diff --git a/roles/prerec/templates/get-file-prefix b/roles/prerec/templates/get-file-prefix new file mode 100755 index 0000000..0240b99 --- /dev/null +++ b/roles/prerec/templates/get-file-prefix @@ -0,0 +1,10 @@ +#!/bin/bash +# {{ ansible_managed }} +# Usage: get-file-prefix $slug [talks.json] +# You can also set the TALKS_JSON environment variable + +SLUG=$1 +if [ -z "$TALKS_JSON" ]; then + TALKS_JSON=${2:-~orga/current/talks.json} +fi +jq -r '.talks[] | select(.slug=="'$SLUG'")["file-prefix"]' < $TALKS_JSON -- cgit v1.2.3