1 # Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com
4 PHANTOMJS= ../node_modules/phantomjs/bin/phantomjs
6 SCREENSHOT_WIDTH_HEIGHT= 1000 1200
7 PERL_SCRIPTS= ../bin/bomb.pl
8 PROG= ../phantom/screenshot.js
9 MD5= $(shell which md5 md5sum)
13 PHANTOMJS_URL= http://cph.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi
14 PHANTOMJS_URL= http://www.indexdata.com/
19 rm -f mkws-error.png mkws-error.html
20 rm -f ${IMAGES}/*.png ${IMAGES}/*.png.tmp
21 rm -f ${IMAGES}/index.html
28 file=$$(echo "${PHANTOMJS_URL}" | perl -npe 's,(\W),-,g'); \
29 ${PHANTOMJS} ${PROG} ${PHANTOMJS_URL} ${IMAGES}/tmp.$$file.png ${SCREENSHOT_WIDTH_HEIGHT} ${TIMEOUT}; \
30 mv -f ${IMAGES}/tmp.$$file.png ${IMAGES}/$$file.png
33 for i in $$(cat ${URL_FILE}); do \
34 ${MAKE} PHANTOMJS_URL="$$i" TIMEOUT=4 screenshot; \
39 cd ${IMAGES}; ls -tr *.png | perl -ne 'chomp; print qq{<h2>$$_</h2><img src="$$_"/><br/><br/><p/>\n}' > index.html
42 @echo "make [ all | clean | distclean ]"
43 @echo " [ screenshots ]"
44 @echo " [ screenshot | index ]"