Skip to content

Commit bfed025

Browse files
committed
l33t CSI skillz
1 parent 66cf29d commit bfed025

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

enhance.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
echo "say cheese" | festival --tts
3+
sleep 5;
4+
FILENAME="shot-`date +%F.%H-%M-%S`.jpg"
5+
FILE="/tmp/$FILENAME"
6+
echo "Ca-cheek" | festival --tts &
7+
/opt/vc/bin/raspistill --nopreview -t 3 -w 1280 -h 960 -o $FILE.1.jpg
8+
if [ "$?" != "0" ]; then exit 1; fi
9+
curl -o $FILE.2.jpg http://10.0.0.64:8080/latest.jpg
10+
if [ "$?" == "0" ]; then
11+
convert $FILE.2.jpg -resize 1280x960 $FILE.3.jpg
12+
convert $FILE.1.jpg $FILE.3.jpg +append $FILE
13+
else
14+
mv $FILE.1.jpg $FILE
15+
fi
16+
rm $FILE.1.jpg
17+
rm $FILE.2.jpg
18+
rm $FILE.3.jpg
19+
/usr/bin/mogrify -level 0%,10% $FILE
20+
/usr/bin/scp -p $FILE www.somakeit.org.uk:www
21+
if [ "$?" != "0" ]; then exit 1; fi
22+
echo "Enhanced: http://irccat.somakeit.org.uk/$FILENAME"
23+
rm $FILE

0 commit comments

Comments
 (0)