6

Weather.com - From new site

Posted in Weather by roadglide03 1966 days ago

This geeklet gets the new style of yahoo images and temp for current weather you need to change your city and state information in the geeklets.

Ignore the red line in the image thats just an echo feature not part of the geeklet. Also the city is also just an echo statement in the shell.

NEW - Just added a "feel like" and "Past 24hr Precipitation" geeklet and Chance of Rain!

Must change location for yours


Comments

User Avatar
ecma104 1966 days ago
what about the script?
User Avatar
roadglide03 1965 days ago
When I stated script it was referencing the geeklet its all self contained.
User Avatar
bluespider 1961 days ago
Very nice, but don't think it's yahoo weather but rather weather.com
User Avatar
roadglide03 1960 days ago
Yep it is but I started via Yahoo so hence the reference. I will change
User Avatar
lodewijk69 1960 days ago
How to change to Celsius and my location (Netherlands)?
User Avatar
roadglide03 1960 days ago
Just go to weather.com and find your city in the URL you will see something like:

http://www.weather.com/weather/today/Hellertown+PA+USPA0701:1:US

In the Geeklet just change the location from "Hellertown+PA+USPA0701:1:US" to for example: "http://www.weather.com/weather/today/NLXX0002:1"
User Avatar
lodewijk69 1960 days ago
Ok...THX for the reaction...I have it working, but still no Celsius?

This is how I filled in the "get temp" and "wimage" geeklet.

state=Pennsylvania

stateabbr=PA

city=Hellertown

curl --silent "http://www.weather.com/weather/today/NLXX0525:1"|awk '/Right Now/{getline; getline; getline; print}'|awk '{print $14 $15 " " $16}'|sed s/';'/""/|sed s/','/" "/|sed s/'">'//|sed -e 's/&deg/°/'|sed s/F//

Is there something else what I do need to change?
User Avatar
roadglide03 1960 days ago
You can get rid of this portion:

state=Pennsylvania

stateabbr=PA

city=Hellertown

You dont need it. I do not know how to change to celsius I know if you go to weather.com you can toggle it and then see "temperature-celsius" line but its not there unless you manually toggle. I am sure theres a way to do it but just dont know. If you do figure it out post it and you will need to change:

sed s/F// to sed s/C// When you figure it out.

You could do a calculation to change then pipe that to "bc" but you will need to change the formatting since it pulls the temp and degrees as well as weather status.
User Avatar
imfloflo 1957 days ago
Is it possible to use

this code for yahoo weather

curl --silent "http://weather.yahooapis.com/forecastrss?w=589325" | grep -E 'l.yimg.com/a/i/us/we/52/.*gif' | head -1 | cut -f 2 -d '"' | xargs curl -o /tmp/weather.gif

but to use icon from this folder

http://l.yimg.com/a/i/us/nws/weather/gr/31d.png
User Avatar
roadglide03 1957 days ago
These icons are specific to the area at that moment in time so if you can figure out when it uses it then yes but that is something you will have to figure out I like the icons I have at the moment.
User Avatar
imfloflo 1956 days ago
@roadglide03 this script already retrieve the good icon

curl --silent "http://weather.yahooapis.com/forecastrss?w=589325" | grep -E 'l.yimg.com/a/i/us/we/52/.*gif' | head -1 | cut -f 2 -d '"' | cut -f 9 -d '/' | cut -f 1 -d '.'

i only need to retrieve the same icon in another folder which have more beautiful icon

http://l.yimg.com/a/i/us/nws/weather/gr/31d.png day

http://l.yimg.com/a/i/us/nws/weather/gr/31n.png night

export a=$(curl --silent "http://weather.yahooapis.com/forecastrss?w=589325" | grep -E 'l.yimg.com/a/i/us/we/52/.*gif' | head -1 | cut -f 2 -d '"' | cut -f 9 -d '/' | cut -f 1 -d'.')



curl -s http://l.yimg.com/a/i/us/nws/weather/gr/${a}d.png -o \tmp\weather.png

seems to work with nice icon :)

Need to have this working with sunrise and sunset now : will look to adapt this http://www.macosxtips.co.uk/geeklets/weather/current-weather-based-on-ip-address-us-only/
User Avatar
ecma104 1925 days ago
can you make one with black icons?
User Avatar
ecma104 1925 days ago
BTW bug where only says "Thunder in the" i feel like the statement is not complete. can you fix?

Log in to comment or register here.