annotate ss2thumb.sh @ 35:5775286673c1

Merge branch 'master' of gitorious.org:nodescore/nodescore Conflicts: www/m/thumbs/1.png www/m/thumbs/2.png www/m/thumbs/3.png www/m/thumbs/4.png www/m/thumbs/5.png www/m/thumbs/6.png
author tzara <rc-web@kiben.net>
date Sun, 19 Aug 2012 22:23:11 +0000
parents c4719d1b7633
children 7f0485e0d0ff
rev   line source
rc-web@13 1 #!/bin/bash
rc-web@13 2
rc-web@21 3 # calls phantomjs to make screenshots
rc-web@21 4 # of each anchor in PROJECT then calls
rc-web@21 5 # imagemagick to resize them for preview
rc-web@21 6 # panel. The size of the screenshot
rc-web@21 7 # is defined in rasterize.js
rc-web@21 8
rc-web@21 9 # nodescore@kiben.net
rc-web@21 10 # nodescore.kiben.net
rc-web@21 11
rc-web@21 12 SERVER=$2
rc-web@21 13 BASEDIR='m'
rc-web@21 14 PROJECT=$1
rc-web@26 15 THUMBPATH="www/$BASEDIR/thumbs"
rc-web@21 16
rc-web@21 17 if [ ! -d $THUMBPATH ];
rc-web@21 18 echo creating $THUMBPATH
rc-web@21 19 then mkdir -p $THUMBPATH;
rc-web@21 20 fi
rc-web@21 21
rc-web@26 22 ANCHORS=`grep '<a' www/$BASEDIR/music.html|wc -l`
rc-web@32 23 GAP=450
rc-web@26 24 TOP=0
rc-web@26 25 for each in $(seq 1 $ANCHORS);
rc-web@26 26 do
rc-web@26 27 echo $TOP
rc-web@26 28 TOP=$(($TOP+$GAP));
rc-web@26 29 echo phantomjs rasterize.js $SERVER/$BASEDIR/music.html#$each $each.png $TOP
rc-web@21 30
rc-web@26 31 phantomjs rasterize.js $SERVER/$BASEDIR/music.html#$each $each.png $TOP
rc-web@32 32 #mogrify -resize 400x $each.png
rc-web@26 33 mv $each.png www/$BASEDIR/thumbs/
rc-web@21 34
rc-web@26 35 done