Skip to content

Instantly share code, notes, and snippets.

@johnflan
Created September 19, 2011 21:00
Show Gist options
  • Save johnflan/1227600 to your computer and use it in GitHub Desktop.
Save johnflan/1227600 to your computer and use it in GitHub Desktop.
#!/bin/sh
filename="sites.txt"
while read URL; do
dtg=`date +%d_%m_%y_%H%M`
if [ ! -d "$URL" ]; then
mkdir "$URL"
fi
OPTIONS="--height 1000 --crop-h 1000 --quality 80"
genPDFOfSite="./wkhtmltoimage-amd64 $OPTIONS http://$URL ./$URL.png"
$genPDFOfSite
movecmd="mv ./$URL.png ./$URL/$dtg.png"
$movecmd
done < "$filename"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment