Skip to content

Instantly share code, notes, and snippets.

@i8degrees
Created April 9, 2013 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i8degrees/5345440 to your computer and use it in GitHub Desktop.
Save i8degrees/5345440 to your computer and use it in GitHub Desktop.
timecap() mod
# Derives from Fielding's dotfiles repo
# https://github.com/justfielding/dotfiles
timecap () {
filenumber=${1:-1}
delay=${2:-5}
scdir=${3:-./}
date_bin=$(which date)
screencap_bin="$(which screencapture)"
i=$filenumber
while [ 1 ]
do $screencap_bin -t jpg -x ${scdir}${i}_${timestamp}.jpg
timestamp="$($date_bin +%y-%m-%d_%s)"
echo "Capturing to ${i}_${timestamp}.jpg"
let i++
sleep $delay
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment