all repos — doom @ 7f894f33ce7574bda6fbe1f1ac9d14a9144b7ac5

Grab bag of versioned doom files (maps, scripts, notes, etc)

tool: remove my scripts

Track these in another repo now.
shwarp
Sat, 24 Oct 2026 12:37:55 -0400
commit

7f894f33ce7574bda6fbe1f1ac9d14a9144b7ac5

parent

55fe70d9b09587958a47cd3076ac558536e5dcb7

2 files changed, 0 insertions(+), 143 deletions(-)

jump to
D util/autocommit

@@ -1,62 +0,0 @@

-#!/bin/bash - -if [[ $# -ne 1 ]] -then - echo "Usage: ./autocommit <FILE_PATH>" - exit 1 -fi - -if ! [ -x "$(command -v inotifywait)" ] -then - echo "This script requires 'inotify-tools'" - exit 1 -fi - -if ! [ -x "$(command -v git)" ] -then - echo "This script requires 'git'" - exit 1 -fi - -FILE=$(basename "$1") -DIRECTORY=$(echo ${1::-"$((${#FILE} + 1))"}) -COMMIT_MESSAGE="auto: $FILE changed" - -if [ ! -d "$DIRECTORY/.git" ] || ! git -C "$DIRECTORY" rev-parse 2>/dev/null -then - echo "'${DIRECTORY}' must be an initialised GIT directory" -fi - -echo "Using GIT directory '${DIRECTORY}':" -echo -echo -e "Changes:\t$(git -C "$DIRECTORY" log --oneline|wc -l)" -echo -e "Last commit:\t$(git -C "$DIRECTORY" log -1 --format=format:%s)" -echo -ne "First change:\t$(git -C "$DIRECTORY" log --format=format:%aD | tail -1) " -echo "($(git -C "$DIRECTORY" log --format=format:%ar | tail -1))" -echo -ne "Last change:\t$(git -C "$DIRECTORY" log -1 --format=format:%aD) " -echo "($(git -C "$DIRECTORY" log -1 --format=format:%ar))" -echo -echo "Now watching '${DIRECTORY}/${FILE}' for changes >> " - -while true -do - cd "$DIRECTORY" - - inotifywait -qq -e CLOSE_WRITE "$FILE" - - echo -n ? - - # Keep duplicate updates out - sleep 1s - - git add "$FILE" - - # Bail if nothing to commit - git diff --cached --quiet && continue - - echo -ne \\r\\a - - git commit -qm "$COMMIT_MESSAGE" - - echo "[$(date -Is)] File changed: $DIRECTORY/$FILE" -done
D util/render-timelapse

@@ -1,81 +0,0 @@

-#!/bin/bash - - -if [[ $# -lt 1 ]] -then - echo "Usage: ./render-timelapse <FILE_PATH> [IWAD_PATH]" - echo -e "\texample: ./render-images ./FOO.WAD ~/doom/DOOM.WAD" - echo -e "\texample: ./render-images ./file_path/FOO.WAD" - - exit 1 -fi - -if ! [ -x "$(command -v wad2svg)" ] -then - echo "This script requires the program 'wad2svg'" - exit 1 -fi - -MAP_FILENAME=$(basename "$1") -GIT_DIR=$(echo ${1::-"$((${#MAP_FILENAME} + 1))"}) -IWAD_PATH="${2-"~/doom/DOOM2.WAD"}" - -OUTPUT_DIR="${GIT_DIR}/timelapse-output" - -if [ ! -d "$GIT_DIR/.git" ] || ! git -C "$GIT_DIR" rev-parse 2>/dev/null -then - echo "'${GIT_DIR}' must be an initialised GIT directory" -fi - -map_name="map01" -shopt -s nocasematch -if [[ "$IWAD_PATH" =~ doom\.wad$ ]] -then - map_name="e1m1" -fi -shopt -u nocasematch - -mkdir -p "$OUTPUT_DIR" - -echo -n "Collecting up map versions " - -count=$((0)) -for commit in $(git -C "$GIT_DIR" log --reverse --format=format:%at_%h) -do - echo -n . - - timestamp=$(echo $commit | cut -d_ -f1) - sha=$(echo $commit | cut -d_ -f2) - - git -C "$GIT_DIR" show \ - ${sha}:${MAP_FILENAME} \ - > ${OUTPUT_DIR}/.${timestamp}_${sha}.${MAP_FILENAME} - - ((count++)) -done - -echo "done ($count)" -echo -n "Converting map versions to images " - -count=$((0)) -shopt -s nocaseglob -for file in $OUTPUT_DIR/.*.WAD -do - echo -n . - - wad2image $file -c yadex -i "$IWAD_PATH" -o "$OUTPUT_DIR" --thing-scale 2 --scale 0.1 --thickness 2 --width 640 --height 480 - mv "$OUTPUT_DIR/${map_name}.png" -- "${file}.png" - - ((count++)) -done - -echo "done ($count)" -echo -n "Combining images into animated GIF ... " - -OUTPUT_ARTEFACT_PATH="${OUTPUT_DIR}/${MAP_FILENAME}.gif" - -shopt -s extglob nullglob -magick "$OUTPUT_DIR"/.*.@(svg|png) +repage -delay 10 "$OUTPUT_ARTEFACT_PATH" - -echo \ done -echo -e "Output: '${OUTPUT_ARTEFACT_PATH}'"