It is currently November 18th, 2018, 11:40 pm

Parsing/Downloading Weather Icons...

Help with creating, editing & fixing problems with skins
User avatar
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Parsing/Downloading Weather Icons...

kyriakos876 » September 14th, 2018, 6:24 pm

balala wrote:https://forum.rainmeter.net/viewtopic.php?p=131161#p131161
(Sorry if there is any other, this is a result of a quick search...)
Ah excellent! Thanks!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3025
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Parsing/Downloading Weather Icons...

eclectic-tech » September 15th, 2018, 1:37 am

An alternative to using 48 different icons could be to group "common" conditions; you can reduce them into 11 categories.

Measures the weather icon value and substitute the number with a string value that matches my 11 image/icon names:
Fair, Cloudy, Windy, Hot, Frigid, Thunderstorm, Rain, Hail, Freeze, Snow, Fog

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=1800
Url=https://wxdata.weather.com/wxdata/weather/local/#WeatherCode#?cc=*&unit=#Unit#&dayf=1
RegExp=(?siU)<icon>(.*)</icon>
StringIndex=1
Substitute="10":"freeze","11":"rain","12":"rain","13":"snow","14":"snow","15":"snow","16":"snow","17":"thunderstorm","18":"hail","19":"fog","20":"fog","21":"fog","22":"fog","23":"windy","24":"windy","25":"frigid","26":"cloudy","27":"cloudy","28":"cloudy","29":"cloudy","30":"cloudy","31":"fair","32":"fair","33":"fair","34":"fair","35":"thunderstorm","36":"hot","37":"thunderstorm","38":"thunderstorm","39":"rain","40":"rain","41":"snow","42":"snow","43":"snow","44":"cloudy","45":"rain","46":"snow","47":"thunderstorm","0":"thunderstorm","1":"thunderstorm","2":"thunderstorm","3":"thunderstorm","4":"thunderstorm","5":"freeze","6":"freeze","7":"freeze","8":"freeze","9":"freeze"
You can represent all 48 conditions with 11 images/icons.
You could also have several versions of those 11 images/icons for more variety. :D

That reminds me I should probably post my WeatherWall skin that demos this approach... :17oops
User avatar
jsmorley
Developer
Posts: 18329
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Parsing/Downloading Weather Icons...

jsmorley » September 15th, 2018, 4:38 am

eclectic-tech wrote:An alternative to using 48 different icons could be to group "common" conditions; you can reduce them into 11 categories.

Measures the weather icon value and substitute the number with a string value that matches my 11 image/icon names:
Fair, Cloudy, Windy, Hot, Frigid, Thunderstorm, Rain, Hail, Freeze, Snow, Fog

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=1800
Url=https://wxdata.weather.com/wxdata/weather/local/#WeatherCode#?cc=*&unit=#Unit#&dayf=1
RegExp=(?siU)<icon>(.*)</icon>
StringIndex=1
Substitute="10":"freeze","11":"rain","12":"rain","13":"snow","14":"snow","15":"snow","16":"snow","17":"thunderstorm","18":"hail","19":"fog","20":"fog","21":"fog","22":"fog","23":"windy","24":"windy","25":"frigid","26":"cloudy","27":"cloudy","28":"cloudy","29":"cloudy","30":"cloudy","31":"fair","32":"fair","33":"fair","34":"fair","35":"thunderstorm","36":"hot","37":"thunderstorm","38":"thunderstorm","39":"rain","40":"rain","41":"snow","42":"snow","43":"snow","44":"cloudy","45":"rain","46":"snow","47":"thunderstorm","0":"thunderstorm","1":"thunderstorm","2":"thunderstorm","3":"thunderstorm","4":"thunderstorm","5":"freeze","6":"freeze","7":"freeze","8":"freeze","9":"freeze"
You can represent all 48 conditions with 11 images/icons.
You could also have several versions of those 11 images/icons for more variety. :D

That reminds me I should probably post my WeatherWall skin that demos this approach... :17oops
There are day / night variants for some of them...

I use this set. It's only 1.2Meg for all of them, so I don't worry much about just including them even though there are a few duplicates.
TWCIcons.zip
1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Parsing/Downloading Weather Icons...

kyriakos876 » September 15th, 2018, 8:21 am

eclectic-tech wrote:An alternative to using 48 different icons could be to group "common" conditions; you can reduce them into 11 categories.

Measures the weather icon value and substitute the number with a string value that matches my 11 image/icon names:
Fair, Cloudy, Windy, Hot, Frigid, Thunderstorm, Rain, Hail, Freeze, Snow, Fog

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=1800
Url=https://wxdata.weather.com/wxdata/weather/local/#WeatherCode#?cc=*&unit=#Unit#&dayf=1
RegExp=(?siU)<icon>(.*)</icon>
StringIndex=1
Substitute="10":"freeze","11":"rain","12":"rain","13":"snow","14":"snow","15":"snow","16":"snow","17":"thunderstorm","18":"hail","19":"fog","20":"fog","21":"fog","22":"fog","23":"windy","24":"windy","25":"frigid","26":"cloudy","27":"cloudy","28":"cloudy","29":"cloudy","30":"cloudy","31":"fair","32":"fair","33":"fair","34":"fair","35":"thunderstorm","36":"hot","37":"thunderstorm","38":"thunderstorm","39":"rain","40":"rain","41":"snow","42":"snow","43":"snow","44":"cloudy","45":"rain","46":"snow","47":"thunderstorm","0":"thunderstorm","1":"thunderstorm","2":"thunderstorm","3":"thunderstorm","4":"thunderstorm","5":"freeze","6":"freeze","7":"freeze","8":"freeze","9":"freeze"
You can represent all 48 conditions with 11 images/icons.
You could also have several versions of those 11 images/icons for more variety. :D

That reminds me I should probably post my WeatherWall skin that demos this approach... :17oops
I wake up ready to match each similar icon to the similar number and I see this... Is it my birthday or something?
User avatar
kyriakos876
Posts: 814
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Parsing/Downloading Weather Icons...

kyriakos876 » September 15th, 2018, 8:22 am

jsmorley wrote:There are day / night variants for some of them...

I use this set. It's only 1.2Meg for all of them, so I don't worry much about just including them even though there are a few duplicates.

TWCIcons.zip

1.jpg
Nice Icons and I won't lie... I used your skin/ collection of icons for 2 years or so, but now I'm going for a more minimal/material look and in the proccess I thought of downloading them but yea, that's not an option I think... plus those google's icons are 680 bytes MAX each ( which means 32KB for all 48 icons) cuz I suppose they are drawn with geometrical shapes, no anti-alias / shadows / etc...