Created
December 17, 2013 18:44
-
-
Save tricker/8010393 to your computer and use it in GitHub Desktop.
Raspberry Pi Image capture and upload shell script
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 | |
NOW=$(date +"%m/%d/%Y %H:%M") | |
THIS_PATH="/home/pi/src" | |
CITY="NYC" | |
raspistill -o $THIS_PATH/$CITY-cam-in.jpg -q 50 -w 1000 -h 700 | |
convert $THIS_PATH/$CITY-cam-in.jpg -background black -fill white label:"$CITY Raspberry Pi Cam - $NOW" \ | |
+swap -gravity Center -append $THIS_PATH/$CITY-cam.jpg | |
scp $THIS_PATH/$CITY-cam.jpg [email protected]:/home/foo/foobar.net/www/cam | |
rm -f $THIS_PATH/$CITY-cam-in.jpg $THIS_PATH/$CITY-cam.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment