Created
October 24, 2011 21:34
-
-
Save francois2metz/1310386 to your computer and use it in GitHub Desktop.
Create a screenshot of a website for each commits in a git repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Under WTPL 2 | |
# https://github.com/AdamN/python-webkit2png | |
COMMITS=$(git log --format="%H" --reverse) | |
OUTPUT_DIR="/tmp" | |
i=0 | |
for commit in ${COMMITS} | |
do | |
i=$(expr $i + 1) | |
if [ ! -f "$OUTPUT_DIR/$i.png" ]; then | |
git checkout $commit | |
webkit2png.py -F javascript --aspect-ratio crop --scale 1366 1000 -o $OUTPUT_DIR/$i.png http://localhost:9292/index.html -w 1 -x 1366 1000 | |
fi | |
done | |
ffmpeg -qscale 5 -r 5 -b 9600 -i $OUTPUT_DIR/%d.png movie.webm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment