Created
August 26, 2015 17:24
-
-
Save DNA/7616b825261f97223953 to your computer and use it in GitHub Desktop.
take photo and screenshot every 5 minutes
This file contains 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 | |
# 0/5 * * * * $HOME/Code/autophoto.sh >> /dev/null | |
if [ ! -d "$HOME/Pictures/AutoPhotos/screen/$(date +%Y%m%d)/" ]; then | |
mkdir -p "$HOME/Pictures/AutoPhotos/screen/$(date +%Y%m%d)/" | |
fi | |
if [ ! -d "$HOME/Pictures/AutoPhotos/picz/$(date +%Y%m%d)/" ]; then | |
mkdir -p "$HOME/Pictures/AutoPhotos/picz/$(date +%Y%m%d)/" | |
fi | |
/usr/sbin/screencapture -x -t jpg ~/Pictures/AutoPhotos/screen/$(date +%Y%m%d)/$(date +%H%M)s.jpg | |
/usr/bin/imagesnap -w 1.5 -q ~/Pictures/AutoPhotos/picz/$(date +%Y%m%d)/$(date +%H%M)p.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment