Skip to content

Instantly share code, notes, and snippets.

@gabrielflorit
Last active December 18, 2015 13:29
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 gabrielflorit/5790714 to your computer and use it in GitHub Desktop.
Save gabrielflorit/5790714 to your computer and use it in GitHub Desktop.
make movie out of livecoding gists
git clone https://gist.github.com/$1.git
cd $1
curl -o rasterize.js 'https://gist.github.com/gabrielflorit/5790387/raw/aa64995b1eedff6efac19a662419c975df291bd7/rasterize.js'
git rev-list HEAD > commits.txt
COUNTER=0
while read p; do
COUNTER=$[$COUNTER +1]
done < commits.txt
while read p; do
echo 'capturing version ' $p
phantomjs rasterize.js http://livecoding.io/s/$1/$p img$COUNTER.png
COUNTER=$[$COUNTER -1]
done < commits.txt
rm rasterize.js
echo 'creating movie'
convert -antialias -delay 1x2 *.png $1.mp4
rm *.png
mv $1.mp4 ../$1.mp4
cd ..
rm -rf $1
echo 'done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment