Skip to content

Instantly share code, notes, and snippets.

@soramugi
Created January 21, 2016 01:09
Show Gist options
  • Save soramugi/0a04db213e541a219c96 to your computer and use it in GitHub Desktop.
Save soramugi/0a04db213e541a219c96 to your computer and use it in GitHub Desktop.
Raspberry Piでカメラ接続して定点観測
#!/bin/bash
DATE=`date "+%Y%m%d-%H%M%S"`
FILEDIR=/home/pi/observations
FILEPATH=$FILEDIR/$DATE.jpg
TMPFILE=/tmp/observation.jpg
raspistill -o $FILEPATH
find $FILEDIR/* -mtime +5 | xargs rm -f
convert -resize 520x -quality 100 $FILEPATH $TMPFILE
gyazo $TMPFILE | jq -r '.permalink_url, .url' | slack -c '#random'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment