diff --git a/@Resources/variables.ini b/@Resources/variables.ini index e12fa4f..82b2595 100644 --- a/@Resources/variables.ini +++ b/@Resources/variables.ini @@ -67,9 +67,10 @@ WeatherLocation=Salzburg, Austria ; It is recommended that you add the country name at the end with an comma. ; Default: Salzburg, Austria -TemperatureUnit=C +TemperatureUnit=m ; Unit in which the temperatures gets shown. -; Default: C +; m is for CELSIUS (blame weather.com for this), f is for FERENFEITH +; Default: m CPUIndex=1 GPUIndex=10 diff --git a/Weather/weather.ini b/Weather/weather.ini index 7d69626..d381d4c 100644 --- a/Weather/weather.ini +++ b/Weather/weather.ini @@ -27,36 +27,48 @@ Information=An minimalistic, still stylish dashboard-like skin with modular comp @include=#@#variables.ini @include2=#@#include\MeterStyles.inc -; Measure to get the weather data and properly parse it -[MeasureWeather] +;FindWeatherLocation +[FindWeatherLocation] Measure=Plugin Plugin=WebParser -URL=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="#WeatherLocation#") and u="#TemperatureUnit#" -RegExp=(?siU).*.*.*.*.* -UpdateRate=100 -FinishAction=[!Update] [!Update] +URL=http://wxdata.weather.com/wxdata/search/search?where=#WeatherLocation# +RegExp=(?siU)id="(.*)" +StringIndex=1 +FinishAction=[!EnableMeasure MeasureWeather][!UpdateMeasure MeasureWeather] +UpdateRate=-1 + +; Measure to get the weather data and properly parse it +[MeasureWeather] +Measure=WebParser +URL=http://wxdata.weather.com/wxdata/weather/local/[&FindWeatherLocation]?cc=*&unit=#TemperatureUnit# +RegExp=(?siU).*dnam>(.*)<.*tmp>(.*)<.*t>(.*)<.*icon>(.*)< +UpdateRate=600 +FinishAction=[!Update][!Update][!Update][!Update] +DynamicVariables=1 +Disabled=1 + [MeasureCurrentCity] Measure=Plugin Plugin=WebParser URL=[MeasureWeather] -StringIndex=2 +StringIndex=1 [MeasureCurrentCode] Measure=Plugin Plugin=WebParser URL=[MeasureWeather] -StringIndex=7 +StringIndex=4 Substitute="":"na" [MeasureCurrentTemp] Measure=Plugin Plugin=WebParser URL=[MeasureWeather] -StringIndex=8 +StringIndex=2 Substitute="":"N/A" [MeasureCurrentDesc] Measure=Plugin Plugin=WebParser URL=[MeasureWeather] -StringIndex=9 +StringIndex=3 Substitute="Scattered":"" [MeterWeatherIcon]