Skip to content

Instantly share code, notes, and snippets.

@vvasabi
Created June 11, 2014 16:54
Show Gist options
  • Save vvasabi/a266fc4e37e372a1ad8c to your computer and use it in GitHub Desktop.
Save vvasabi/a266fc4e37e372a1ad8c to your computer and use it in GitHub Desktop.
Automated CutyCapt site screenshots generation
#!/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
@nickoli1
Copy link

just want to say that cutycapt should be in small letter otherwise it will not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment