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)
12 PHANTOMJS_URL= http://cph.koha.indexdata.com/cgi-bin/koha/opac-search.pl?q=sushi
13 PHANTOMJS_URL= http://www.indexdata.com/
18 rm -f mkws-error.png mkws-error.html
19 rm -f ${IMAGES}/*.png ${IMAGES}/*.png.tmp
20 rm -f ${IMAGES}/index.html
27 file=$$(echo "${PHANTOMJS_URL}" | perl -npe 's,(\W),-,g'); \
28 ${PHANTOMJS} ${PROG} ${PHANTOMJS_URL} ${IMAGES}/tmp.$$file.png ${SCREENSHOT_WIDTH_HEIGHT} ${TIMEOUT}; \
29 mv -f ${IMAGES}/tmp.$$file.png ${IMAGES}/$$file.png
32 for i in $$(cat url.txt); do \
33 ${MAKE} PHANTOMJS_URL="$$i" TIMEOUT=4 screenshot; \
38 cd ${IMAGES}; ls -tr *.png | perl -ne 'chomp; print qq{<h2>$$_</h2><img src="$$_"/><br/><br/><p/>\n}' > index.html
41 @echo "make [ all | clean | distclean ]"
42 @echo " [ screenshots ]"
43 @echo " [ screenshot | index ]"