[RELEASE] The Weather Channel (TWC) - Supplemental Script

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Thumbs Up  [RELEASE] The Weather Channel (TWC) - Supplemental Script
Post: #1
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: twc0.jpg]
[Image: twc1.jpg]
[Image: twc2.jpg]
[Image: twc3.jpg]
[Image: twc4.jpg]
[Image: twc5.jpg]
Image hosting

Image Gallery - Click Here

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2008-11-14 05:29 by Nuka1195.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 175
Post: #2
Looks cool Smile

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
shizzle Offline
Senior Member
Posts: 196
Joined: Apr 2007
Reputation: 0
Location: sweden
Post: #3
pure awsomeness =)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #4
Revision 276 fixes the weekend forecast and some minor skin tweaks and adds a autorefresh for maps

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
jeffbacon Offline
Junior Member
Posts: 11
Joined: Nov 2008
Reputation: 0
Post: #5
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
(This post was last modified: 2008-11-15 19:33 by jeffbacon.)
find quote
jeffbacon Offline
Junior Member
Posts: 11
Joined: Nov 2008
Reputation: 0
Post: #6
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
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #7
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.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2008-11-15 19:46 by Nuka1195.)
find quote
jeffbacon Offline
Junior Member
Posts: 11
Joined: Nov 2008
Reputation: 0
Post: #8
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)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #9
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.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #10
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.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Spc4 Offline
Junior Member
Posts: 45
Joined: May 2008
Reputation: 0
Post: #11
Is there a download?
(This post was last modified: 2008-11-16 02:10 by Spc4.)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #12
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

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #13
OSX now works.

here is the svn installer.

http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
jeffbacon Offline
Junior Member
Posts: 11
Joined: Nov 2008
Reputation: 0
Post: #14
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).
find quote
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,333
Joined: Jan 2008
Reputation: 2
Location: US
Post: #15
This script is awesome, especially with PM3.HD integration

Thanks Nuka!

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
find quote
Post Reply