Mercurial > hg > nodescore
view ss2thumb.sh @ 26:ac9641ecf84f
updated rasterize and ss2thumb to cycle offsets of grab for different anchors
removed some bad path stuctures
author | tzara <rc-web@kiben.net> |
---|---|
date | Mon, 16 Jul 2012 16:51:55 +0100 |
parents | aaf429469697 |
children | e4d2a8eb1450 |
line wrap: on
line source
#!/bin/bash # calls phantomjs to make screenshots # of each anchor in PROJECT then calls # imagemagick to resize them for preview # panel. The size of the screenshot # is defined in rasterize.js # nodescore@kiben.net # nodescore.kiben.net SERVER=$2 BASEDIR='m' PROJECT=$1 THUMBPATH="www/$BASEDIR/thumbs" if [ ! -d $THUMBPATH ]; echo creating $THUMBPATH then mkdir -p $THUMBPATH; fi ANCHORS=`grep '<a' www/$BASEDIR/music.html|wc -l` GAP=800 TOP=0 for each in $(seq 1 $ANCHORS); do echo $TOP TOP=$(($TOP+$GAP)); echo phantomjs rasterize.js $SERVER/$BASEDIR/music.html#$each $each.png $TOP phantomjs rasterize.js $SERVER/$BASEDIR/music.html#$each $each.png $TOP mogrify -scale 33% $each.png mv $each.png www/$BASEDIR/thumbs/ done