tool: init render-images
shwarp
Sat, 15 Aug 2026 18:20:22 -0400
1 files changed,
27 insertions(+),
0 deletions(-)
jump to
A
tools/render-images
@@ -0,0 +1,27 @@
+#!/bin/bash + + +if [[ $# -ne 3 ]] +then + echo "Usage: ./render-images <GIT_DIR> <MAP_FILENAME> <OUTPUT_DIR>" + echo -e "\texample: ./render-images . FOO.WAD out" + + exit 1 +fi + +GIT_DIR="$1" +MAP_FILENAME="$2" +OUTPUT_DIR="$3" + +mkdir -p "$OUTPUT_DIR" + +for commit in $(git -C "$GIT_DIR" log --oneline --reverse --format=format:%at_%h) +do + echo "$commit" + timestamp=$(echo $commit | cut -d_ -f1) + sha=$(echo $commit | cut -d_ -f2) + + git show \ + ${sha}:${MAP_FILENAME} \ + > ${OUTPUT_DIR}/${timestamp}_${sha}.${MAP_FILENAME} +done