Skip to content

Instantly share code, notes, and snippets.

@bjorne
Created July 13, 2012 10:55
Show Gist options
  • Save bjorne/3104258 to your computer and use it in GitHub Desktop.
Save bjorne/3104258 to your computer and use it in GitHub Desktop.
Take a photo using Cinema Display camera if present, built-in otherwise
#!/bin/bash
dir="$HOME/Documents/commit-photos"
if [[ ! -d $dir ]]; then
mkdir -p $dir
fi
f=`echo \`date "+%Y%m%d-%H%M%S"\``
device=`imagesnap -l | grep -v "Video Devices:" | head -n 1`
imagesnap -d "$device" -q -w 1 $dir/$f.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment