Created
July 13, 2012 10:55
-
-
Save bjorne/3104258 to your computer and use it in GitHub Desktop.
Take a photo using Cinema Display camera if present, built-in otherwise
This file contains hidden or 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/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