From fea2f6968629c1b185511474962b5250232a5273 Mon Sep 17 00:00:00 2001 From: Matt Way Date: Thu, 15 Aug 2024 16:53:52 +1000 Subject: [PATCH] Include media files in the root of the spl-data repo --- make-council-pages.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/make-council-pages.sh b/make-council-pages.sh index 988a4aa..93bac3c 100644 --- a/make-council-pages.sh +++ b/make-council-pages.sh @@ -23,6 +23,11 @@ function create_or_update_page() { media_inputs+=("$file") fi done + for file in "$DATA_PATH"/*.{jpeg,jpg,png,gif}.json; do + if test -f "$file"; then + media_inputs+=("$file") + fi + done jq -n '[inputs | { (input_filename | sub("\\.json$"; "") | sub("^.+/"; "")): . }] | reduce .[] as $item ({}; . + $item)' "${media_inputs[@]}" > "$DATA_PATH"/$slug/media.json