Ok I can get geektool to work on Yahoo weather by copying someones script see below and thanks.
However their is a local site for my location in Norway that provides great xml data for the weather. Now I can call some of the information out with grep but struggle when it gets complex. Below is an extract from the xml file
This is repeated around 30 times in the xml file for different times of the day. Now I would like to get geektool to display a couple of the options on the first entry only, something like name, temp and windspeed. I keep calling too many entries.
can anyone help.
Thanks
Andy
Code:
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=NOXX0035&u=c" | grep -E '(Current Conditions:|C<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'
However their is a local site for my location in Norway that provides great xml data for the weather. Now I can call some of the information out with grep but struggle when it gets complex. Below is an extract from the xml file
Code:
<time from="2010-08-19T00:00:00" to="2010-08-19T06:00:00" period="0">
<!-- Valid from 2010-08-19T00:00:00 to 2010-08-19T06:00:00 -->
<symbol number="9" name="Rain" />
<precipitation value="0.7" />
<!-- Valid at 2010-08-19T00:00:00 -->
<windDirection deg="12.3" code="NNE" name="North-northeast" />
<windSpeed mps="1.6" name="Light breeze" />
<temperature unit="celcius" value="18" />
<pressure unit="hPa" value="999.1" />
</time>
This is repeated around 30 times in the xml file for different times of the day. Now I would like to get geektool to display a couple of the options on the first entry only, something like name, temp and windspeed. I keep calling too many entries.
can anyone help.
Thanks
Andy