(no subject)

Jan 31, 2017 14:34

Let's say you want to make a Stranger Things style christmas light-up message, but strangergif seems to be talking a half hour to load, and you realize the cockeyed.com generator doesn't make a gif, but uses sprites.

NOT A PROBLEM.

Save and run this bash script:

!#/bin/bash

foo=6take6your6meds6
for (( i=0; i<${#foo}; i++ )); do
wget -O meds$i.jpg "http://www.cockeyed.com/stranger/alphabet${foo:$i:1}.jpg"
done

Replace foo= with your message, replacing spaces with the numeral 6. I recommended putting a 6 at the front and back of your message to cause a pause.

Run the bash script.

run

convert -resize 400 -delay 40 -loop 0 `ls -v meds*` takem.gif

(convert is an imagemagick tool, you'll need that installed.)

jigger with the size and delay to get a gif you like.

potential gotchas: the spacer jpg is actually a png. Imagemagick doesn't care, and will use it correctly, but other command line processes may be confused. the strange ls -v is to cause meds1 to come before meds10, which could have been avoided with left-padding, but I didn't bother figuring that out.

This post also on dreamwidth (
comments)

nerdery: bash

Previous post Next post
Up