Member Since: May 19, 2009
Location: Waiting for a mate . . .
Mac Specs: 21" iMac 2.9Ghz 10.9.4 13"MBP 2.9Ghz i7 Yosemite 10.10 ~ iPhone5 iOS 8 ~ iPad Mini iOS 8 ~ ATV3 6.1
11-10-2009, 06:52 PM
Originally Posted by dbnoise
Another way to display weather in geektool is use yweather.pl, which is a really nice script someone wrote that uses yahoo weather.
Here's a link if you want to check it out: yweather - Project Hosting on Google Code
Thanks db ill check this out too
Originally Posted by Dysfunction
Ok, so.. I redid that whole thing piping things to files (which eliminated the transmission details)...
mikeMbp:~ mike$ cat wundweather.tst |sed -n '21p' |sed -e 's/<span class="nowrap"><b>//g' |sed -e 's/<\/b.*//g'
mikeMbp:~ mike$ cat hobartweather.tst |sed -n '21p' |sed -e 's/<span class="nowrap"><b>//g' |sed -e 's/<\/b.*//g'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
so.. this should work...
curl http://www.eldersweather.com.au/tas/lower-derwent/hobart?fc=9329 |sed -n '448p' |sed -e 's/<td class="center bold">//g' |sed -e 's/&.*//g'
mikeMbp:~ mike$ cat hobartweather.tst |sed -n '448p' |sed -e 's/<td class="center bold">//g' |sed -e 's/&.*//g'
edit.. how did I find the line number?
mikeMbp:~ mike$ cat -n hobartweather.tst |grep 14.5
448 <td class="center bold">14.5°C</td>
Bloody awesome mate.. Thank you muchly.
I ran it and it works a treat and ill use the same code to get my conditions as well
Ill do some work and learn from it ... Ill break down my old code and the new one produced by you and see the differences.
This is a great leaning curve and hope i become more proficient at it.
Like using my local weather site and widgets take up too much resources so AAA+++
Dont forget to use the Reputation System if someone has helped you out !!!
Arguing with a zealot is only slightly easier than tunneling through a mountain with your forehead!!!!!