Kodi Community Forum

Full Version: [RELEASE] The Weather Channel (TWC) - Supplemental Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11
here is a script that displays addition forecasts and maps from weather.com

it's in the addons svn. you can grab it with the SVN repo installer.

PHP Code:
http://xbmc-addons.googlecode.com/svn/trunk/scripts/TWC%20Supplemental 

Image
Image
Image
Image
Image
Image
Image hosting

Image Gallery - Click Here
Looks cool Smile
pure awsomeness =)
Revision 276 fixes the weekend forecast and some minor skin tweaks and adds a autorefresh for maps
Looks great. Just installed it on my xbox (Ottawa, Canada).

- bug: There's no hour-by-hour forecast available on weather.com for Ottawa and when I select that tab it freezes.
(edit: now it works for me, I assumed there was no data and that's why it was freezing but I guess it just froze for some other reason)
- feature request: since I'm in Canada I'd like to be able to view the temp in C and wind in Km per hour vs the F and MPH default
Also, if I'm on the weekend forecast and I press the down key on my remote, the focus moves off the top tab bar but onto nothing and I have to exit the script as I can never get the focus to return to anything on the screen.

... actually, same w 36-hour forecast
i'll check out the 36 hour, but weekend has a button it moves to. toggles details/outlook.

plus a fix for weekend is coming shortly. friday doesn't show when it's saturday. i imagine saturday won't show on sunday.

about the F or C, i only display what weather.com gives. maybe if you give me the formulas, i would consider converting things. not sure though.

edit: ok navigation is broken, will fix.
there's a 'metric' link on the Ottawa, Canada weather network page so there must be some way to source the C data directly but the conversion formula is:

°C = 5/9(°F-32)
ok i missed it, but that would be better. i'll see later.

for now weekend is fixed.

navigation is still broken, don't go down except on the map page. if a skinner reads this could you have a look. i have no idea what it's doing. thanks.
the good news is once you have the metric source it scrapes the same. but there is no difference in the url that i can see.

so if you figure out how to grab the correct page, your set.
Is there a download?
It's in svn the addons svn, but if anybody uses osx, it's broken in svn.

i have a fix, but need to test it.

use the svn repo installer to grab it or svn client, link in first post
Nuka1195 Wrote:the good news is once you have the metric source it scrapes the same. but there is no difference in the url that i can see.

so if you figure out how to grab the correct page, your set.

When you click the English/Metric link it sets cookie values. My cookie is:

UserPreferences: 3%7C%20%7C0%7Creal%7Cfast%7C1%7C1%7C1%7C1%7C-1%7C%20%7C%20%7C%20%7C%20%7C%20%7C1%7CBusinessTravel%7C%20%7C%20%7C%20%7C%20%7C%20%7C%20%7C%20%7C%20%7C%20%7C%7C

The links call a JS function named setUserPreferences:

Metric:
setUserPreferences(5,1);
setUserPreferences(6,1);
setUserPreferences(7,1);
setUserPreferences(8,1);
setUserPreferences(15,1)

English:
setUserPreferences(5,0);
setUserPreferences(6,0);
setUserPreferences(7,0);
setUserPreferences(8,0);
setUserPreferences(15,0)

5 -> English(0) vs Metric (1)

But I can't see where the others are used. There must be an included script that generates the weather summaries that uses them. I assume they represent temp (C=1/F=0), wind (mph=0/kph=1), visibility (miles=0/km=1), and pressure (mb=1/in=0).
This script is awesome, especially with PM3.HD integration

Thanks Nuka!
Pages: 1 2 3 4 5 6 7 8 9 10 11