Extend the scraper interpreter to include weather or use python plugin API for skins?
#1
Lightbulb 
I like to suggest that the scraper interpreter/engine in XBMC be extended to support the weather forecast function for XBMC if possible. To scrape weather.com using a scraper XML file instead of an hardcoded function.

That way people could also write alternative scrapers for the weather function just like for movies and TV-Shows. I know for example that many people have requested that we use weather.MSN.com or accuweather.com as the source instead of weather.com (accuweather support has been requested many times before as it supports more locations outside the US, even most smaller towns in Europe), but this way the user would select for themselves which source to use for their weather forecasts.

This way the weather scrapers can also be maintained by end-users themselves (as no need to be a C++ programmer to use regex), and they can easily be updated on an existing build in case a website changes.

Would be nice to be able to utilize alternative weather forecast sites through scrapers this way, example:
weather.com
accuweather.com
weather.msn.com
HAMweather.com
Weather Underground (wunderground.com)
Intellicast (intellicast.com)
MyForecast (MyForecast.com, power by CustomWeather)
timeanddate.com (time and date.com, power by CustomWeather)

I believe HAMweather in particular have recently become popular among HTPC software applications Nod

What do you think?

PS! I also think it would be a great if someone would like to extend the weather function in XBMC to have the option to go into forecast details for a specific day to get an hourly listing, and options for longer forecast for say 10-days ahead. Also things like motion/animation maps, doppler radar, and satellite images which both weather.com and accuweather support.
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.
Reply
#2
Quote:(as no need to be a C++ programmer to use regex)
Doesn't hurt Smile

I like this idea.

AccuWeather Maps and Radar's are animated gif's and at the time XBMC did not play them. I had to save each frame separately, maybe the scraper could handle that and use a multiimage control.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
Nice thought Smile

Damn i wish i ate a C++ for Dummies manual instead of all those fish n chips!
Reply
#4
Question 
Nuka1195 Wrote:AccuWeather Maps and Radar's are animated gif's and at the time XBMC did not play them
but XBMC SVN can handle animated GIFs (and GIF89a GIF images) today right?
Reply
#5
viewing the gif from my pictures displays one frame.

The gif still does not display using WindowXML or adding it to Home.xml.

Image

Here's an unedited gif.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
What about XBMC skinning-engine (which I assume the weather function uses), does that not support animated GIF images? and looping of such images?
Reply
#7
animated gifs do work and work in python, but these must not be gif89a. Imageready had no information.

Edit: I just opened it up in scite it's an 87a format.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#8
Question 
Any volunteer? Huh ...some comments on the suggestion then from any developer?

Pretty please with suger on top Big Grin
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.
Reply
#9
I was wondering whether it's a good idea to move the URL for the Weather-channel, which is currently hardcoded in the binary, into one of the xml config files? If they ever change the URL again, like they did a while back, you don't require a new binary (same thing applied for the ntp server in the past) but only a conf/xml-update....
-= Team Kodi developer fueled by heavy metal =-
Reply
#10
might be a good idea
Reply
#11
1+. makes sense to me.
Reply
#12
If they alter the URL, there's nothing stopping them altering the XML layout either.

Moving just one seems counterproductive.

There was talk earlier about using the scraper system for weather - this IMO is a better use of time (for after atlantis ofcourse). There's likely a trac report already.

Cheers,
Jonathan
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
Reply
#13
Yes I like my new idea better, that is to create a a new type of python plugin API for just weather plugins (instead of reusing the scraper API for this):
http://forum.xbmc.org/showthread.php?tid=28376

Feature request trac ticked for this concept can be found here => http://trac.xbmc.org/ticket/4973
Quote:Create a new python plugin API for weather and make the GUI support several weather sites via those plugins

This is a slightly modified request of this:
http://forum.xbmc.org/showthread.php?tid=28376

It would be better to use python scripts instead of extending the scraper parser as suggested in that forum thread, but not python scripts that does the GUI but more like how plugins work in XBMC by only fetching the data then presenting it to XBMC and let XBMC's own GUI display it nativly.

So what I like to suggest is that a new (python) plugin API was added in XBMC, an API for plugins that will work as the back-end scrapers to download weather forecast metadata instead of having it hardcoded in source code like XBMC has today.

So XBMC also needs to be able to get that metadata via the API though the plugins and then display it nativly in the GUI (using libGUI).

This way people could also write alternative plugins for the weather function similar to how the scrapers work for Movies and TV-Shows. I know for example that many people have requested that we use weather.MSN.com or accuweather.com as the source instead of weather.com (accuweather support has been requested many times before as it supports more locations outside the US, even most smaller towns in Europe), but this way the user would select for themselves which source to use for their weather forecasts.

This way the weather scrapers can also be maintained by end-users themselves (as no need to be a C++ programmer to use regex), and they can easily be updated on an existing build in case a website changes.

What do you think?

PS! I also think it would be a great if someone would like to extend the weather function in XBMC to have the option to go into forecast details for a specific day to get an hourly listing, and options for longer forecast for say 10-days ahead. Also things like motion/animation maps, Doppler radar, and satellite images which both weather.com and accuweather support, (AccuWeather Maps and Radar's are animated GIF images, in gif87a or gif89a image formats).
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.
Reply
#14
Bumping this idea => http://trac.xbmc.org/ticket/4973
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.
Reply
#15
http://trac.xbmc.org/ticket/5815

here is a start, it just launches a script. all the work would be in the script and the myweather.xml.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
Extend the scraper interpreter to include weather or use python plugin API for skins?1