Skip to content

Instantly share code, notes, and snippets.

@RandomEtc
Created September 13, 2011 04:00
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 RandomEtc/1213087 to your computer and use it in GitHub Desktop.
Save RandomEtc/1213087 to your computer and use it in GitHub Desktop.
conversion loops in bash
# to make a folder full of animated gifs into a folder full of vertical frames
# (brew install imagemagick)
for i in *.gif;do echo $i
convert "$i" "`echo $i | sed -e 's/\.gif//g'`%02d.gif"
convert "`echo $i | sed -e 's/\.gif//g'`*.gif" -append $i
done
# to make a folder full of html into a folder full of pdfs
# (brew install wkhtml2pdf)
for i in *.html;do echo $i
wkhtmltopdf "$i" "`echo $i | sed -e 's/\.html/\.pdf/g'`"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment