Revision: 3436
http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3436&view=rev
Author: hemna
Date: 2010-04-13 23:05:47 +0000 (Tue, 13 Apr 2010)
Log Message:
-----------
some updates...make sure rx dir exists
Modified Paths:
--------------
trunk/open2300/bin/aircam.sh
Modified: trunk/open2300/bin/aircam.sh
===================================================================
--- trunk/open2300/bin/aircam.sh 2010-03-15 17:20:11 UTC (rev 3435)
+++ trunk/open2300/bin/aircam.sh 2010-04-13 23:05:47 UTC (rev 3436)
@@ -1,26 +1,39 @@
#!/bin/bash
-TIME=`date +%H%m%S`
+TIME=`date +%H%M%S`
DATE=`date +%Y%m%d`
HUMANDATE=`date +%A\ %b\ %e,\ %Y\ \ %T\ %Z`
FONT="/home/waboring/local/Verdana_Bold.ttf"
-WXINFO="60F"
+#WXINFO="60F"
WXINFO=`cd /home/waboring/wx.hemna.com/bin; /usr/local/php5/bin/php /home/waboring/wx.hemna.com/bin/img_wx_string.php`
+if [ -e ~/wxcam/${DATE} ]
+then
+ echo "~wxcam/${DATE} exsts.";
+else
+ echo "creating ~wxcam/${DATE}";
+ mkdir ~/wxcam/${DATE}
+fi
+
+
cd /home/waboring/local/tmp
-wget -t 1 --timeout=5 http://guest:as...@wr...:82/cgi/jpg/image.cgi
+wget -t 1 --timeout=13 http://guest:as...@wr...:82/cgi/jpg/image.cgi
if [ -e image.cgi ]
then
mv image.cgi cam.jpg
#now add the stamp and such
+ echo "Add annotations"
convert cam.jpg -quality 90 \
-font $FONT \
- -pointsize 14 -gravity southwest \
- -fill '#0008' -draw 'rectangle 0,454,640,480' \
+ -pointsize 13 -gravity southwest \
+ -fill '#0008' -draw 'rectangle 0,458,640,480' \
-fill white -annotate +2+3 "$HUMANDATE" \
- -fill white -annotate +320+3 "$WXINFO °F" \
+ -fill white -annotate +320+3 "$WXINFO°F" \
-fill white -gravity southeast -annotate +2+3 "wx.hemna.com" \
cam2.jpg
+
+ echo "move to latest cam image"
cp cam2.jpg ~/wx.hemna.com/htdocs/cam/cam.jpg
+ echo cp cam2.jpg ~/wxcam/${DATE}/${TIME}.jpg
cp cam2.jpg ~/wxcam/${DATE}/${TIME}.jpg
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|