It is currently September 28th, 2024, 11:00 pm

Lumiero Weather Issues

Get help with creating, editing & fixing problems with skins
schroef
Posts: 10
Joined: April 16th, 2023, 1:12 am

Re: Lumiero Weather Issues

Post by schroef »

I'm using VSC, Visual Studio Code, with file type set to ini. So should be good i guess. I compared it to older backup files and other than the regEx changes, i see dont much different. I was more thinking perhaps the font somehow got corrupt. But that also seems topen fine without errors. Something is adding the characters, because the preset settings dont show them

For instance, "feels like"

Code: Select all

[MeterFeelsLike]
Meter=String
MeasureName=MeasureFeelLikeCelsius
StringAlign=Left
FontColor=#Color1#,100
FontFace=Comfortaa
FontSize=(3.5*#Scale#)
X=(5*#Scale#)
Y=(0*#Scale#)R
Text=#Feels like# %1°#TempSymbol#
AntiAlias=1
When i add a space to the degrees character or use a different one, it also updates with the weird characters. I tried adding a different version of a font, still shows. Ill try to open de *.ini file in simple text-editor and save it again.

EDIT
Nope, doesnt matter. as soon as i hit refresh, i see -18 and the characters, this means its still there and getting the online data. Than when it loads the data, nothing changed. Still shows the weird characters

It probably is something with the regEx. If i preview a old version of the file, it does show correct. Ill try to view them next to each other and compare them. My guess its the regex, but thats is obvious
You do not have the required permissions to view the files attached to this post.
schroef
Posts: 10
Joined: April 16th, 2023, 1:12 am

Re: Lumiero Weather Issues

Post by schroef »

Okay, i noticed the encoding was different from the other one. Mine version was 'UTF-8', the other file was 'UTF-16LE' First time i tried using "Reopen with Encoding", everything was set to Chinese characters, so i undo and than voila it showed the correct encoding. I did a refresh and now it shows fine again
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 8257
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Lumiero Weather Issues

Post by Yincognito »

schroef wrote: June 18th, 2024, 4:09 pm Okay, i noticed the encoding was different from the other one. Mine version was 'UTF-8', the other file was 'UTF-16LE' First time i tried using "Reopen with Encoding", everything was set to Chinese characters, so i undo and than voila it showed the correct encoding. I did a refresh and now it shows fine again
Nice! It was probably a consequence of creating a new text file for your version, since Notepad defaults to UTF-8 for new text files. Not sure about VSC though, but it should have some encoding conversion options if one day you encounter similar issues with another skin or something. Setting the encoding defaults for creating new .ini files in VSC (if possible) might help to automatically create such files with the right encoding from the start.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
schroef
Posts: 10
Joined: April 16th, 2023, 1:12 am

Re: Lumiero Weather Issues

Post by schroef »

I was looking at the regex part and im wondering how this exactly works. To my understanding, this part

Code: Select all

RegExp=<h1 class="Fz\(3rem\)\-\-miw1250 Fz\(2.65rem\)\-\-miw1024 Fz\(1.62rem\) Fw\(n\) Lh\(1\) Trsdu\(.3s\) Wob\(ba\)">([^<]+).*<span class="Va\(t\) D\(b\) fahrenheit celsius_D\(n\)">([^<]+).*<img class=wafer\-img data-wf-src=.*60x60\/([^\@]+).*
Looks for 3 strings are search for using some wildcards method. The thing is that the icon i see is from 12pm, it shows not the correct icon for the current time. It shows the icon from the yellow arrow, i prefer the one from green.

I did check the html page for the classes and compared that with the current regexstring it needs to find. When i try to add the string from the green arrow, i get a regex error -1
Im not sure how the regex know what part is from the string, because it seems either . or the .8 is somekind of divider. Perhaps there is my mistake. I tried replacing the current one to part of the image tag from the green arrow

current regex part

Code: Select all

.*<img class=wafer\-img data-wf-src=.*60x60\/([^\@]+).*
from green arrow

Code: Select all

.*<img class=Mend\(5px\) wafer\-img data-wf-src=.*60x60\/([^\@]+).*
Thing is, those escape characters are i think only if the we take the complete part from the class. Which seems to use class"....." than everything between the quotes, special characters get the escape. But that still returns an regex error.

This is the complete img tag

Code: Select all

<img class="Mend(5px) wafer-img-native wafer-img-loaded" data-wf-src="https://s.yimg.com/os/weather/1.0.1/shadow_icon/60x60/partly_cloudy_day@2x.png" src="https://s.yimg.com/os/weather/1.0.1/shadow_icon/60x60/partly_cloudy_day@2x.png" width="32" height="32" alt="Partly Cloudy" loading="lazy">

This is the complete image tag from where it now gets the icon. At least i think its this one

Code: Select all

<img class="wafer-img-native wafer-img-loaded" data-wf-src="https://s.yimg.com/os/weather/1.0.1/shadow_icon/60x60/mostly_cloudy_day_night@2x.png" src="https://s.yimg.com/os/weather/1.0.1/shadow_icon/60x60/mostly_cloudy_day_night@2x.png" width="28" height="28" alt="Mostly Cloudy" loading="lazy">
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lumiero Weather Issues

Post by balala »

schroef wrote: June 18th, 2024, 4:09 pm Okay, i noticed the encoding was different from the other one. Mine version was 'UTF-8', the other file was 'UTF-16LE' First time i tried using "Reopen with Encoding", everything was set to Chinese characters, so i undo and than voila it showed the correct encoding. I did a refresh and now it shows fine again
I was absolutely positive it's an encoding issue. Here are some details.
schroef wrote: June 16th, 2024, 2:41 am Though now i see weird characters for the degrees icon
Another thing good to be known. Instead of using the degree symbol (°) in codes, I always prefer to use it as [\x00B0]. This are the so-called Unicode characters and can be used in String meters. With this approach your Text option of the previously posted [MeterFeelsLike] meter would look this way: Text=#Feels like# %1[\x00B0]#TempSymbol#, instead of the original Text=#Feels like# %1°#TempSymbol#.
schroef
Posts: 10
Joined: April 16th, 2023, 1:12 am

Re: Lumiero Weather Issues

Post by schroef »

@balala

thanks, thanks for the back-info about the encoding.

Im not going to hustle about the unicode characters if this works as is. I dont want to hunt down these codes. If it works, it works
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lumiero Weather Issues

Post by balala »

schroef wrote: June 18th, 2024, 6:39 pm Im not going to hustle about the unicode characters if this works as is. I dont want to hunt down these codes. If it works, it works
Obviously it's your choice. Good you found the source of the problem.
User avatar
Yincognito
Rainmeter Sage
Posts: 8257
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Lumiero Weather Issues

Post by Yincognito »

schroef wrote: June 18th, 2024, 5:31 pmThe thing is that the icon i see is from 12pm, it shows not the correct icon for the current time. It shows the icon from the yellow arrow, i prefer the one from green.
There are 2 problems in this case (and 1 potential one):
1) you're using a RegExp which indeed grabs the forecast icon (yellow arrow) instead of the current one (green arrow), so use the one from the original code, which should work (it does for me, while yours gives me the -18 degrees thingy):

Code: Select all

RegExp=(?siU)Wob\(ba\)">(.*)<.*Trsdu\(\.3s\)">(.*)<.*60x60\/(.*)@2x.png.*Fz\(1\.12rem\)">(.*)<.*".*celsius_D\(n\)">(.*)&deg;<.*celsius_D\(n\)">(.*)&deg;<.*celsius_D\(n\)">(.*)<.*RealFeel.*celsius_D\(n\)">(.*)&deg;<.*<dt>Humidity</dt><dd>(.*)</dd></div>.*
2) if an icon from the [SkinsFolder]\Lumiero\@Resources\WeatherIcons folder doesn't match the one at Yahoo, download the latter via right click and open image in a new tab in the browser, and rename it the same but without the ending "@2x" or similar part
3) the Substitute from [MeasureIcon] changes some icon values, you should check if the replacements are what you want

In other words, as you can see if you compare the regexes, the part containing the current icon is between the country and the description (2nd and 4th regex captures / StringIndexes) in the RegExp pattern, while you tried to add it to the end of the pattern (i.e. where the forecast icon was) - that and the incomplete RegExp you used is why your otherwise correct replacement didn't work.

By the way, the RegExp you used indeed only captures 3 values, while the original code displays / uses 8 values. Nothing wrong with either, of course, but what you capture and what you use should typically match, so that you avoid potential errors or inconsistencies.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
schroef
Posts: 10
Joined: April 16th, 2023, 1:12 am

Re: Lumiero Weather Issues

Post by schroef »

Thanks, ill try that than. I tried using different sites. But when they dont have dedicated classes to pick the div or data i want. Its impossible for me to find the correct regex code as its mostly jibberish for me

2. Well im not sure again here about the icon. Since it retrieves a big array of data and im not sure how the regex finds the correct one. When i try the regex app from rainmeter i can see i return one big data block which contains almost every weather icon from that page. So im not sure how its able to regtrieve one. I guess that perhaps due to the DynamicVariables doing that. I tried to read up on those attributes on a readme page, but cant seem to find how it actually works or what it actually doing

3. Ill try to look at the original version again as you mentioned. See if i can get that working again. I think i have the original skin saved, so perhaps it will work again.

Thanks for the help!

About saving the icons, thats not that big of a deal. Im a graphic design. I see lots of missing weather icons, he made substitutes to merge different weathericons as one. I think im going to make all the other missing ones. So i have the complete set. Thats not such difficult work for me


PS
The original skin is different
where is this part actually from? The line you pasted

Code: Select all

RegExp=(?siU)Wob\(ba\)">(.*)<.*Trsdu\(\.3s\)">(.*)<.*60x60\/(.*)@2x.png.*Fz\(1\.12rem\)">(.*)<.*".*celsius_D\(n\)">(.*)&deg;<.*celsius_D\(n\)">(.*)&deg;<.*celsius_D\(n\)">(.*)<.*RealFeel.*celsius_D\(n\)">(.*)&deg;<.*<dt>Humidity</dt><dd>(.*)</dd></div>.*
EDIT
Weird i check the original skin i have and compared that to the one from DeviantArt. i changes the skin extension to zip so i can peek inside quickly. Than i noticed my version of the skin already had a different regex for the main meter value. TThe one i just downloaded got that same line you posted. Weird things is both have exactly the same filename everything, with *.rmskin at the end

EDIT 2
Sorry i now see there are different Author names inside the weather forecast.ini file the one i had is Connect-R and the one from DeviantArt is ApexXx_SenSei. actually my original one also worked, but it was lacking some data. I think i added that myself couple years back. One thing i noticed is that they named parts wrong. Where they state that it has Night and Day time, but they are retrieving Max and Low temp
User avatar
Yincognito
Rainmeter Sage
Posts: 8257
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Lumiero Weather Issues

Post by Yincognito »

schroef wrote: June 19th, 2024, 4:13 pm Thanks, ill try that than. [...] Where they state that it has Night and Day time, but they are retrieving Max and Low temp
Yeah, as you probably already noticed, I got the line from the DeviantArt link mentioned by balala on the 1st page of this thread:
https://forum.rainmeter.net/viewtopic.php?t=37786#p192555
Well, I'm not the author (neither one of them, if they're not the same person, that is), but typically the minimum for the 24 hour day happens at "night time" (i.e. while it's dark), while the maximum happens during "day time" (i.e. while there's light), due to the sun warming up the earth, so that might explain the naming in the skin. I more or less present things the same way in my skins.

So, did you manage to show the icon you wanted? I can explain the regex if you want, but if the matter is already solved there would be little practical gain in terms of the skin code, and the explanation might not "catch" since there would be no need to use it to adjust the regex. :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth