Skip to content

Instantly share code, notes, and snippets.

@jontelang
Created June 30, 2015 13:20
Show Gist options
  • Save jontelang/0147787432152508f455 to your computer and use it in GitHub Desktop.
Save jontelang/0147787432152508f455 to your computer and use it in GitHub Desktop.
function snapimage(){
cd /tmp #/Volumes/FUJITSU/Automatic-Images-Via-Imagesnap/
/usr/sbin/screencapture -x screensnap.png
imagesnap -w 2 camerasnap.png
#convert -resize x480 /tmp/screensnap.png /tmp/screensnap.png
filename=$(date +%Y-%m-%d___%H.%M.%S.png)
/usr/local/bin/convert +append camerasnap.png screensnap.png $filename
mv $filename /Volumes/FUJITSU/Automatic-Images-Via-Imagesnap/$filename
}
##
## Run imagesnap every hour
##
00 * * * * source /Users/jontelang/.bash_profile; snapimage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment