It is currently March 28th, 2024, 6:11 pm

Weather code

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Weather code

Post 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"
Last edited by jsmorley on February 22nd, 2017, 3:20 am, edited 1 time in total.
Reason: Please use [code] tags
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather code

Post 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.
User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Weather code

Post 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
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather code

Post 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
User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Weather code

Post by brinkeguthrie »

ok, so where does that go inside the code?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather code

Post 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
User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Weather code

Post 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
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather code

Post by jsmorley »

Nope.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather code

Post by jsmorley »

Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=2463583 AND u="F"
Galaxy01
Posts: 1
Joined: May 22nd, 2020, 9:35 am

Re: Weather code

Post by Galaxy01 »

I found this online tool useful. Got all the yahoo location codes and allows to export them as .txt file:

Yahoo Woeid
Post Reply