Skip to content

Instantly share code, notes, and snippets.

@theraccoonbear
Created September 15, 2019 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theraccoonbear/81e172419a045af8c3b0e1eba36e7b3a to your computer and use it in GitHub Desktop.
Save theraccoonbear/81e172419a045af8c3b0e1eba36e7b3a to your computer and use it in GitHub Desktop.
Generate a slideshow of images for cover art trivia
#!/bin/bash
# Generate a slideshow of images for cover art trivia.
# Files should be named like {SORT-NUMBER} blah blah blah.jpg
for f in *.jpg; do
num=$(echo $f | sed -En "s/^([0-9]+).+?/\1/p")
formatNum="$((10#$num + 1 - 1))"
output=final_$num.jpg
echo "Processing $f file...";
convert -caption "Cover #$formatNum" $f -pointsize 48 -gravity center -background black +polaroid $output
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment