Mercurial > hg > nodescore
view ss2thumb.sh @ 22:bb02a593b7d5
server side push of datetime to client
author | tzara <rc-web@kiben.net> |
---|---|
date | Wed, 11 Jul 2012 09:51:05 +0100 |
parents | aaf429469697 |
children | ac9641ecf84f |
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/$PROJECT/img/thumbs if [ ! -d $THUMBPATH ]; echo creating $THUMBPATH then mkdir -p $THUMBPATH; fi ANCHORS=`grep '<a' www/$BASEDIR/$PROJECT/music.html|wc -l` for each in $(seq 1 $ANCHORS); do echo phantomjs rasterize.js $SERVER/$BASEDIR/$PROJECT/music.html#$each $each.png phantomjs rasterize.js $SERVER/$BASEDIR/$PROJECT/music.html#$each $each.png mogrify -scale 30% $each.png mv $each.png www/$BASEDIR/$PROJECT/img/thumbs/ done