View Single Post
TattooedMac

 
TattooedMac's Avatar
 
Member Since: May 19, 2009
Location: Waiting for a mate . . .
Posts: 7,711
TattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant futureTattooedMac has a brilliant future
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

TattooedMac is offline
Quote:
Originally Posted by dbnoise View Post
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

Quote:
Originally Posted by Dysfunction View Post
Ok, so.. I redid that whole thing piping things to files (which eliminated the transmission details)...


Code:
mikeMbp:~ mike$ cat wundweather.tst |sed -n '21p' |sed -e 's/<span class="nowrap"><b>//g' |sed -e 's/<\/b.*//g' 
  14
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">
mikeMbp:~ mike$
so.. this should work...

Code:
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'
Code:
mikeMbp:~ mike$ cat hobartweather.tst |sed -n '448p' |sed -e 's/<td class="center bold">//g' |sed -e 's/&.*//g' 
			14.5
mikeMbp:~ mike$
edit.. how did I find the line number?
Code:
mikeMbp:~ mike$ cat -n hobartweather.tst |grep 14.5
   448				<td class="center bold">14.5&deg;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+++

Cheers

CogFrog Studio's ~ Photography, Apps and Web Development
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!!!!!
QUOTE Thanks