Page 1 of 1

Weather code

Posted: February 22nd, 2017, 2:52 am
by brinkeguthrie
I have Elegance 2 weather installed on my home PC, and the code is below. I want to install it on my work PC for the location of Oakland CA. I don't see where below to put the weather code for Oakland, which I this I think which I got from Weather.com. https://weather.com/weather/today/l/USCA0791:1:US

USCA0791, right?


Where to I place it? TY.

Code: Select all

[Rainmeter]
DynamicWindowSize=1
Author=lilshizzy@gmail.com 
Update=1000
@include=#SKINSPATH#Elegance\Variables\Fonts.inc

[Metadata]
Name=Elegance - Weather (sm3)
Config=
Description=
Instructions=The default weather code is set to Los Angeles, to get your Weather Code visit (weather.yahoo.com) type in your Zip, click the RSS button, your code will be in the address bar. Click on "Edit Skin" below to enter your code.
Version=1000
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=
Preview=

[Variables]
@include=#SKINSPATH#Elegance\Variables\Default.inc
WeatherCode=12797313
WeatherUnit=F
; My weather code for Milan OH
; WeatherCode=12797313

[Styles]
@include=#SKINSPATH#Elegance\Variables\Styles.inc

;--------------------------------

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=#WeatherCode# AND u="#WeatherUnit#"
RegExp="(?siU).*<yweather:units.*distance="(.*)" pressure="(.*)" speed="(.*)" temperature="(.*)".*<ttl>(.*)</ttl>.*<yweather:location.*city="(.*)" country="(.*)" region="(.*)".*<yweather:wind.*chill="(.*)" direction="(.*)" speed="(.*)".*<yweather:atmosphere.*humidity="(.*)" pressure="(.*)" rising="(.*)" visibility="(.*)".*<yweather:astronomy.*sunrise="(.*)" sunset="(.*)".*<geo:lat.*>(.*)</geo:lat><geo:long.*>(.*)</geo:long>.*<yweather:condition.*code="(.*)" date="(.*)" temp="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*"

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=23

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22

;--------------------------------

[Background]
Meter=IMAGE
ImageName=#SKINSPATH#Elegance\Images\weather_sm03.png
;SolidColor=255,0,0,100
X=0
Y=0
W=116
H=143

[Temp]
MeasureName=MeasureWeatherTemp
Meter=STRING
MeterStyle=normalwc
FontSize=73
X=60
Y=6

;[Temp2]
;Meter=STRING
;MeterStyle=normalwc
;FontSize=14
;X=-2r
;Y=93r
;Text="degrees"

Re: Weather code

Posted: February 22nd, 2017, 3:21 am
by jsmorley
Why are you using a weather.com code for a Yahoo URL? I think the instructions in the skin code are reasonably clear.

Re: Weather code

Posted: February 22nd, 2017, 3:38 am
by brinkeguthrie
because i don't see how to get the code from yahoo.

https://www.yahoo.com/news/weather/united-states/california/oakland-2463583

Re: Weather code

Posted: February 22nd, 2017, 3:42 am
by jsmorley
brinkeguthrie wrote:because i don't see how to get the code from yahoo.

https://www.yahoo.com/news/weather/united-states/california/oakland-2463583
2463583

Re: Weather code

Posted: February 22nd, 2017, 3:45 am
by brinkeguthrie
ok, so where does that go inside the code?

Re: Weather code

Posted: February 22nd, 2017, 3:47 am
by jsmorley
brinkeguthrie wrote:ok, so where does that go inside the code?

Code: Select all

[Variables]
@include=#SKINSPATH#Elegance\Variables\Default.inc
WeatherCode=2463583
WeatherUnit=F

Re: Weather code

Posted: February 22nd, 2017, 3:50 am
by brinkeguthrie
like this?

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=#2463583# AND u="#F#"
RegExp="(?siU).*<yweather:units.*distance="(.*)" pressure="(.*)" speed="(.*)" temperature="(.*)".*<ttl>(.*)</ttl>.*<yweather:location.*city="(.*)" country="(.*)" region="(.*)".*<yweather:wind.*chill="(.*)" direction="(.*)" speed="(.*)".*<yweather:atmosphere.*humidity="(.*)" pressure="(.*)" rising="(.*)" visibility="(.*)".*<yweather:astronomy.*sunrise="(.*)" sunset="(.*)".*<geo:lat.*>(.*)</geo:lat><geo:long.*>(.*)</geo:long>.*<yweather:condition.*code="(.*)" date="(.*)" temp="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*"

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=23

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22

;--------------------------------

[Background]
Meter=IMAGE
ImageName=#SKINSPATH#Elegance\Images\weather_sm03.png
;SolidColor=255,0,0,100
X=0
Y=0
W=116
H=143

[Temp]
MeasureName=MeasureWeatherTemp
Meter=STRING
MeterStyle=normalwc
FontSize=73
X=60
Y=6

;[Temp2]
;Meter=STRING
;MeterStyle=normalwc
;FontSize=14
;X=-2r
;Y=93r
;Text="degrees"
Last edited by jsmorley on February 21

Re: Weather code

Posted: February 22nd, 2017, 3:52 am
by jsmorley
Nope.

Re: Weather code

Posted: February 22nd, 2017, 3:54 am
by jsmorley
Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=2463583 AND u="F"

Re: Weather code

Posted: May 22nd, 2020, 9:40 am
by Galaxy01
I found this online tool useful. Got all the yahoo location codes and allows to export them as .txt file:

Yahoo Woeid