Created
June 11, 2014 16:54
-
-
Save vvasabi/a266fc4e37e372a1ad8c to your computer and use it in GitHub Desktop.
Automated CutyCapt site screenshots generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dir="$HOME/capture" | |
output="$dir/output" | |
urls=`cat "$dir/list.txt"` | |
i=1 | |
for url in $urls; do | |
# Convert url to file name | |
path=`echo $url | sed -e 's/http:\/\/domain\.name\///g'` | |
if [ -z $path ]; then | |
path=home | |
fi | |
escaped=`echo $path | sed -e 's/\//__/g'` | |
printf -v filename "%03d-%s.png" $i "$escaped" | |
# Begin capture | |
echo "Generating $filename..." | |
CutyCapt --url="$url" --out="$output/$filename" \ | |
--min-width=1280 --min-height=800 > /dev/null 2>&1 | |
i=$(($i + 1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just want to say that cutycapt should be in small letter otherwise it will not work.