[RELEASE] Weather.com Plus Plugin - skinnable via the new Weather Plugin API in XBMC!

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Thumbs Up  [RELEASE] Weather.com Plus Plugin - skinnable via the new Weather Plugin API in XBMC!
Post: #1
[b][i]Update: 12/30/2009 (bold text is new/changed)[/i][/b]
Quote:
[weather.com plus]

-changed: version -> 1.2.3
-added: sunrise/sunset to hourly forecast
-added: Property(Hourly.#.LongDate), Property(Hourly.#.ShortDate), Property(Hourly.#.Sunrise), Property(Hourly.#.Sunset), Property(Daily.#.LongDate), Property(Daily.#.ShortDate)
-removed: Property(Hourly.#.Date), Property(Daily.#.Date)
[b][i]Update: 12/27/2009 (bold text is new/changed)[/i][/b]
Update: 12/21/2009 (bold text is new/changed)
Quote:[SIZE=1][weather.com plus]

-changed: version -> 1.2
-changed: English language strings
-changed: speedups and eliminating the need to repeat tasks
-added: customized maps list (WIP) *see (resources/samples/sample-user-defined-maps.udm)
-added: MapList.(1-3).MapIcon.(1-3) for static content lists (allows for thumbnails and panel containers, optional Map Icon Pack available. install from settings)
-added: more properties see first post
-added: new settings for alert notification, custom maps file (WIP), install map icon pack
-added: addons manager to handle the install
[/SIZE]
---------------------------------------------------------------

*Skinners please note the changes in bold. some properties have changed(it was necessary)

still a WIP, property names should not change (2nd post updated with a couple pictures

here is a link to an include file foe the static map list content there are there includes:
("MapsList1.Content", "MapsList3.Content", "MapsList3.Content")
http://xbmc-addons.googlecode.com/svn/pa...cludes.xml

there are also map list icon packs users can download from the plugin settings. heres a direct link
small:
http://xbmc-addons.googlecode.com/svn/pa...-small.zip
large:
http://xbmc-addons.googlecode.com/svn/pa...-large.zip
---------------------------------------------------------------

With the new weather plugin feature of XBMC you can have your weather window display more info.

Skinners can determine if a plugin is selected by using the infolabel "Weather.Plugin". eg <visible>!IsEmpty(Weather.Plugin)</visible>, thanks spiff

Here is a plugin that adds the above info. Until script settings is added you are stuck with babelfish translating if available and the three map categories. available in the addons svn.

Here is a link to the files for PMIII (not finished, but you can get ideas, won't look exactly as the below pictures): http://xbmc-addons.googlecode.com/svn/pa...eather.zip

I tried to localize as much as possible. let me know if anything is missing (temperature and wind speed in forecasts is not converted). Skinners let me know if it would better to localize from skin or XBMC wher i localize from script. if skinners are going to localize headings (where possible) i will remove Heading properties.

It currently translates some text with strings.xml files (script/skin/XBMC). The forecast, outlook and wind uses babelfish.yahoo.com. babelfish only works for certain languages.
"Chinese (Simple)": "en_zh",
"Chinese (Traditional)": "en_zt",
"Dutch": "en_nl",
"French": "en_fr",
"German": "en_de",
"German (Austria)": "en_de",
"Greek": "en_el",
"Italian": "en_it",
"Japanese": "en_ja",
"Korean": "en_ko",
"Portuguese": "en_pt",
"Portuguese (Brazil)": "en_pt",
"Russian": "en_ru",
"Spanish": "en_es",
"Spanish (Mexico)": "en_es",

Any weather plugin can set any property. There are no restrictions, but for skinners it would be better to have some standards. Since this is the first I will set some Tongue.

I may have missed some.

Plugin Name:
------------
Code:
"PluginName": name of the plugin(not the same as the infolabel "Weather.Plugin")

Special skin settings used by plugin: (added: 12/12/2009)
-------------------------------------------
Code:
[b]"TWC.DefaultMap": used by plugin to download user selected default map(skins must support a way to set this for this to work)[/b]
[b]"TWC.DefaultMapBool": used for radio button toggle[/b]

Video:
-------
Code:
"Video": url of weather video. empty if not avaialble


Alerts:
-------
Code:
"Alerts": The main text (empty if none)
[b]"Alerts.RSS": format brief alert message, use with a fade label. must have a colors/defaults.xml with this name (rss_headline) (added: 12/12/2009)[/b]
"Alerts.Color": color you may use. must have a colors/defaults.xml with these names(red, orange, yellow, green, default)
"Alerts.Count": number of alerts if more than one alert, otherwise empty
"Alerts.Label": script localized string (Alert, Alerts)


36 Hour forecast (%d == 1 thru 3):
---------------------------------------
Code:
"36Hour.%d.OutlookIcon":
"36Hour.%d.FanartCode":
"36Hour.%d.Outlook": brief outlook (babelfish translated)
"36Hour.%d.TemperatureColor": "{low|high}" so you can colorize temperature
"36Hour.%d.TemperatureHeading": XBMC localized string (High|Low)
"36Hour.%d.Temperature": temp no temp unit
"36Hour.%d.Precipitation":
"36Hour.%d.Forecast": weather forecast (babelfish translated)
"36Hour.%d.DaylightTitle": script localized string (Sunrise|Sunset)
"36Hour.%d.DaylightTime": Sunrise/sunset time
[b]"36Hour.%d.DaylightType": set to ("sunrise", "sunset") (added: 12/12/2009)[/b]
"36Hour.%d.Heading": Script localized period("Today", "Tonight", "Tomorrow", "Tomorrow Night"

Hourly forecast (%d == 1 thru 27):
--------------------------------------
Code:
"Hourly.%d.Time": items time
[b][b]"Hourly.%d.LongDate": items date (added: 12/30/2009)[/b][/b]
[b]"Hourly.%d.ShortDate": items date (added: 12/30/2009)[/b]
"Hourly.%d.OutlookIcon":
"Hourly.%d.FanartCode":
"Hourly.%d.Temperature": no temp unit
"Hourly.%d.Outlook": brief outlook (babelfish translated)
"Hourly.%d.FeelsLike": no temp unit
"Hourly.%d.Precipitation":
"Hourly.%d.Humidity":
"Hourly.%d.WindDirection":
"Hourly.%d.ShortWindDirection": (eg NNE)
"Hourly.%d.WindSpeed":
[b]"Hourly.%d.Sunrise": (added: 12/30/2009)[/b]
[b]"Hourly.%d.Sunset":  (added: 12/30/2009)[/b]

these could be localized in the xml
"Hourly.Heading1": "Time" script localized
"Hourly.Heading2": "Condition" script localized
"Hourly.Heading3": "Temp" xbmc localized
"Hourly.Heading4": "Feels" script localized
"Hourly.Heading5": "Precip" script localized
"Hourly.Heading6": "Humid" xbmc localized
"Hourly.Heading7": "Wind" xbmc localized

Weekend forecast (%d == 1 thru 3):
---------------------------------------
Code:
"Weekend.%d.OutlookIcon":
"Weekend.%d.FanartCode":
"Weekend.%d.Outlook": brief outlook (babelfish translated)
"Weekend.%d.HighTemperature":
"Weekend.%d.LowTemperature":
"Weekend.%d.Precipitation":
"Weekend.%d.Wind": direction and speed
"Weekend.%d.UV":
"Weekend.%d.Humidity":
"Weekend.%d.Sunrise": time
"Weekend.%d.Sunset": time
"Weekend.%d.Forecast": weather forecast (babelfish translated)
"Weekend.%d.Observed": "Observed:" (may remove)
"Weekend.%d.ObservedPrecipitation":
"Weekend.%d.ObservedAvgHighTemperature":
"Weekend.%d.ObservedAvgLowTemperature":
"Weekend.%d.ObservedRecordHighTemperature":
"Weekend.%d.ObservedRecordLowTemperature":
"Weekend.%d.DepartureHigh": departure from avg high temp
"Weekend.%d.DepartureHighColor": ("low[color=#000]" or "high[COLOR=#0000]" or "default") so you can color your departure[/color]
[/COLOR]"Weekend.%d.DepartureLow": departure from avg high temp
"Weekend.%d.DepartureLowColor": same as high
"Weekend.%d.Date": date of forecast


10 Day forecast (%d == 1 thru 10):
--------------------------------------
Code:
"Daily.%d.LongDay": Long day of week xbmc localized
"Daily.%d.ShortDay": day of week abreviated script localized

[b]"Daily.%d.LongDate": items date (added: 12/30/2009)[/b]
[b]"Daily.%d.ShortDate": items date (added: 12/30/2009)[/b]
"Daily.%d.OutlookIcon":
"Daily.%d.FanartCode":
"Daily.%d.Outlook":brief outlook (babelfish translated)
"Daily.%d.HighTemperature":
"Daily.%d.LowTemperature":
"Daily.%d.Precipitation":
"Daily.%d.WindDirection":
"Daily.%d.ShortWindDirection": (eg NNE)
"Daily.%d.WindSpeed":
these could be localized in the xml
"Daily.Heading1": "Date" script localized
"Daily.Heading2": "Condition" script localized
"Daily.Heading3": "High" xbmc localized
"Daily.Heading4": "Low" xbmc localized
"Daily.Heading5": "Precip" script localized
"Daily.Heading6": "Wind" xbmc localized


Maps and Radars (%c == 1 thru 3, %d == 1 thru 30):
-----------------------------------------
Code:
[b]"Weather.CurrentMapUrl": (added: 12/12/2009)[/b]
[b]"Weather.CurrentMap": (added: 12/12/2009)[/b]

[b]"MapList.%d.MapLabel.%d": Label of radar (changed: 12/12/2009)[/b]
[b]"MapList.%d.MapLabel2.%d": holds url for plugin (added: 12/12/2009)[/b]
[b]"MapList.%d.MapIcon.%d": used with optional map pack (added: 12/12/2009)[/b]
[b]"MapList.%c.MapOnclick.%d": <onclick> for when selected (changed: 12/12/2009)[/b]
"MapList.%c.LongTitle": map category long name script localized
"MapList.%c.ShortTitle": map category abreviated name script localized

[b]"MapStatus": set to ("loading", "error" or "loading")[/b]
[b]"MapPath": set to (actual downlaoded legend image or "")[/b]
[b]"LegendPath": set to ("weather.com plus/error", actual downlaoded map images or "weather.com  (added: 12/12/2009)[/b]

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2009-12-30 17:15 by Nuka1195.)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #2
[Image: 10day.th.jpg] [Image: 36hourtranslated.th.jpg] [Image: 36hour.th.jpg] [Image: alerts.th.jpg]

[Image: screenshot000y.jpg]

[Image: screenshot006io.jpg]
.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2009-12-21 16:32 by Nuka1195.)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #3
[Image: hourly.th.jpg] [Image: mapsc.th.jpg] [Image: weekendm.th.jpg] [Image: weekend2w.th.jpg]

.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2009-06-01 00:11 by Nuka1195.)
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #4
Nuka1195, looks very good. This might sound like a stupid question, SVN Repo Installer extracted it in XBMC\plugins\weather, but how do I access it? Choosing Weather in the main menu goes to the original Weather Forecast (XBMC 9.04.1 Windows)
find quote
queeup Offline
Posting Freak
Posts: 763
Joined: Feb 2009
Reputation: 16
Post: #5
This is wonderful thx. My i ask why are you using babelfish? Goggle Translate has more language support.
find quote
queeup Offline
Posting Freak
Posts: 763
Joined: Feb 2009
Reputation: 16
Post: #6
Eheheh Dan ı think you must start from plugins menu Smile

Edit: dohh stupid answer?
(This post was last modified: 2009-06-01 14:36 by queeup.)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #7
you need to edit you skin to support this plugin. the first post has a link to files you can drop in to pmiii folder and it should look work. it won't look the same as the pictures, because i use different fonts and may have nissed some gfx.

if people report google translate is better i can switch it.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #8
Thanks Nuka1195,

I dropped the files from the archive in C:\Program Files\XBMC 9.04.1\skin\Project Mayhem III (Windows) and it worked, looks like this for me:

http://img195.imageshack.us/img195/8741/...plugin.jpg

As you said, that's the default background and some issue with getting the details forecats for Dublin, Ireland (ERROR: invalid rss url set referenced in skin), may be some issue with the website, not necessarily a problem in your code...
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #9
not related. did you go into weather settings and select "weather.com plus"

also this feature was only recently added, may not be in 9.04.1

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #10
Nuka, I just extract the files on top of the existing ones in the installation folder (maybe should've copied them in my user's skin folder?!) and it replaced the standard weather feature, didn't have to do anything in the weather settings... Nvm, I will try again with a newer SVN release, not going to take over the thread :-) Thanks again.
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #11
[Image: settings.th.jpg]

Also skinners note. all these properties are available thru out the skin. Window(Weather).Property(Alerts) for instance

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2009-06-01 17:00 by Nuka1195.)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #12
Quote:
[weather.com plugin]

-changed: version -> 1.0.1
-changed: all color properties to return only a color name.
-changed: Weekend.%d.DepartureHighColorBegin -> Weekend.%d.DepartureHighColor
-changed: Weekend.%d.DepartureLowColorBegin -> Weekend.%d.DepartureLowColor
-removed: Weekend.%d.DepartureHighColorEnd and Weekend.%d.DepartureLowColorEnd

* see: http://forum.xbmc.org/showthread.php?tid=52034

updated plugin

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Baphomet Offline
Junior Member
Posts: 38
Joined: Feb 2009
Reputation: 0
Post: #13
Looks awesome.
(This post was last modified: 2009-06-04 16:54 by Baphomet.)
find quote
Baphomet Offline
Junior Member
Posts: 38
Joined: Feb 2009
Reputation: 0
Post: #14
Okay, so let me get this straight -- the Weather + plugin is a newer version of the TWC Supplemental 1.2 script? Same functionality of the TWC Script, just with a cleaner look and more functionality?
find quote
lewis.donofrio Offline
Senior Member
Posts: 136
Joined: Feb 2009
Reputation: -10
Post: #15
So how would we go about on a pure xbox running xbmc get the 'weather' link in the main page using stock skin be able to use this plugin?
find quote
Post Reply