Well I got it running. I didn't have time to figure out the perl with
the work insanity lately, and a little bit of laziness so I copied the
html file to the WX pc and sub'd things like WXTemp where the actual
numbers were and then wrote a quickie shell script to sed the data from
my file:

#/usr/bin/cat /cygdrive/c/Program\ Files/Weather\ View\ 32\ 600/wu.txt
| /usr/bin/awk -F\& '{print $3 " "$5 " " $6 " " $7 " " $8 " " $9 " "
$10}' > /cygdrive/c/Program\ Files/Apache\
Group/Apache2/htdocs/wx.html

Humid=$(/usr/bin/cat /cygdrive/c/Program\ Files/Weather\ View\ 32\
600/wu.txt | /usr/bin/awk -F\& '{print $7}' | /usr/bin/awk -F\= '{print
$2}')

Temp=$(/usr/bin/cat /cygdrive/c/Program\ Files/Weather\ View\ 32\
600/wu.txt | /usr/bin/awk -F\& '{print $8}' | /usr/bin/awk -F\= '{print
$2}' | /usr/bin/cut -c1-3)

Wind=$(/usr/bin/cat /cygdrive/c/Program\ Files/Weather\ View\ 32\
600/wu.txt | /usr/bin/awk -F\& '{print $5}' | /usr/bin/awk -F\= '{print
$2}')


#strip leading zeros
Humid=${Humid#0}
Temp=${Temp#0}
Wind=${Wind#0}

DateTime=$(/usr/bin/date)


#put it in a simpler format for later
echo ${Temp} " " ${Humid} " " ${Wind} " " ${DateTime} > 
/cygdrive/c/Program\ Files/Apache\ Group/Apache2/htdocs/wx.html


#kludge the template
/usr/bin/cat /home/Administrator/weather.com.template.html |
/usr/bin/sed "s/WXHumid/$Humid/g" | /usr/bin/sed "s/WXTemp/$Temp/g" |
/usr/bin/sed "s/WXWind/$Wind/g" >  /cygdrive/c/Program\ Files/Apache\
Group/Apache2/htdocs/wu.html 


As you can see I made provisions for when I get to modifying the Perl,
but for now it works great even if it is a bit Rube Goldberg-ish....


-- 
jakematic
------------------------------------------------------------------------
jakematic's Profile: http://forums.slimdevices.com/member.php?userid=2687
View this thread: http://forums.slimdevices.com/showthread.php?t=10274

_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to