Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Weather Fix #46

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions @Resources/variables.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 22 additions & 10 deletions Weather/weather.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work properly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I'd just guide the user to find their weather code themselves. Otherwise you'd have to search for it every time Rainmeter starts.

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).*<yweather:units .* distance=".*" pressure=".*" speed="(.*)" temperature=".*"/>.*<yweather:location .* city="(.*)" country="(.*)" region="(.*)"/>.*<yweather:wind .* chill=".*" direction=".*" speed="(.*)"/>.*<yweather:atmosphere .* humidity="(.*)" pressure=".*" rising=".*" visibility=".*"/>.*<yweather:condition .* code="(.*)" date=".*" temp="(.*)" text="(.*)"/>
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]
Expand Down