From 73fe710717bea7d2f10a4ddc4abfa156403c5e9b Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 8 Mar 2019 16:16:37 +0200 Subject: [PATCH 1/5] Changed from Yahoo's API to Weather.com's API --- Weather/weather.ini | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Weather/weather.ini b/Weather/weather.ini index 7d69626..7eac6c7 100644 --- a/Weather/weather.ini +++ b/Weather/weather.ini @@ -31,32 +31,32 @@ Information=An minimalistic, still stylish dashboard-like skin with modular comp [MeasureWeather] 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).*.*.*.*.* +URL=http://wxdata.weather.com/wxdata/weather/local/#WeatherLocation#?cc=*&unit=#TemperatureUnit# +RegExp=(?siU).*dnam>(.*)<.*tmp>(.*)<.*t>(.*)<.*icon>(.*)< UpdateRate=100 FinishAction=[!Update] [!Update] [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] From 5db18dfd2b375ee5fc020bc054d4a8144d2fe247 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 8 Mar 2019 16:17:28 +0200 Subject: [PATCH 2/5] Edited to add a bit more info --- @Resources/variables.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/@Resources/variables.ini b/@Resources/variables.ini index e12fa4f..090511f 100644 --- a/@Resources/variables.ini +++ b/@Resources/variables.ini @@ -65,11 +65,13 @@ Drive10=L:/ WeatherLocation=Salzburg, Austria ; Location used for weather information. ; It is recommended that you add the country name at the end with an comma. +; If that dosen't work, you can use LocationCode, which you can find by +; going to http://wxdata.weather.com/wxdata/search/search?where=YourCityName ; Default: Salzburg, Austria TemperatureUnit=C ; Unit in which the temperatures gets shown. -; Default: C +; m is for celsius (blame weather.com for this), f is for FERENFEITH CPUIndex=1 GPUIndex=10 From ffa311eebd833855e0c7d4f54362017282c83e16 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 8 Mar 2019 16:28:37 +0200 Subject: [PATCH 3/5] Update variables.ini --- @Resources/variables.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/@Resources/variables.ini b/@Resources/variables.ini index 090511f..9b9aa70 100644 --- a/@Resources/variables.ini +++ b/@Resources/variables.ini @@ -67,11 +67,13 @@ WeatherLocation=Salzburg, Austria ; It is recommended that you add the country name at the end with an comma. ; If that dosen't work, you can use LocationCode, which you can find by ; going to http://wxdata.weather.com/wxdata/search/search?where=YourCityName +; (you actually replace YourCityName with your actual city in the url above). ; Default: Salzburg, Austria TemperatureUnit=C ; Unit in which the temperatures gets shown. ; m is for celsius (blame weather.com for this), f is for FERENFEITH +; Default: C CPUIndex=1 GPUIndex=10 From 54e6f9c46c167c52c551210f91a3438dd108954f Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 21 Mar 2019 22:22:17 +0200 Subject: [PATCH 4/5] Update weather.ini --- Weather/weather.ini | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Weather/weather.ini b/Weather/weather.ini index 7eac6c7..d381d4c 100644 --- a/Weather/weather.ini +++ b/Weather/weather.ini @@ -27,14 +27,26 @@ 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=http://wxdata.weather.com/wxdata/weather/local/#WeatherLocation#?cc=*&unit=#TemperatureUnit# +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=100 -FinishAction=[!Update] [!Update] +UpdateRate=600 +FinishAction=[!Update][!Update][!Update][!Update] +DynamicVariables=1 +Disabled=1 + [MeasureCurrentCity] Measure=Plugin Plugin=WebParser From 0671c4f60516c1bbf31cc0b42fc22cf4de039948 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 21 Mar 2019 22:23:09 +0200 Subject: [PATCH 5/5] Update variables.ini --- @Resources/variables.ini | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/@Resources/variables.ini b/@Resources/variables.ini index 9b9aa70..82b2595 100644 --- a/@Resources/variables.ini +++ b/@Resources/variables.ini @@ -65,15 +65,12 @@ Drive10=L:/ WeatherLocation=Salzburg, Austria ; Location used for weather information. ; It is recommended that you add the country name at the end with an comma. -; If that dosen't work, you can use LocationCode, which you can find by -; going to http://wxdata.weather.com/wxdata/search/search?where=YourCityName -; (you actually replace YourCityName with your actual city in the url above). ; Default: Salzburg, Austria -TemperatureUnit=C +TemperatureUnit=m ; Unit in which the temperatures gets shown. -; m is for celsius (blame weather.com for this), f is for FERENFEITH -; Default: C +; m is for CELSIUS (blame weather.com for this), f is for FERENFEITH +; Default: m CPUIndex=1 GPUIndex=10