For now, this is just an option for Webparser. It will decode unicode code points like \uXXXX and \UXXXXXXXX (although the former is used most often). This doesn't do octal code points.
I am not sure there is a huge need for this outside of Webparser. We already have character variables that work in the same way.
There may some need to have it work with features that can read other files like the quote plugin and lua, but we haven't made any decisions about that yet.
-Brian
It is currently January 24th, 2021, 9:12 pm
Weather Skins Not Working
-
- Developer
- Posts: 2074
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
-
- Developer
- Posts: 21470
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working - This is the only allowed thread about this
Done... The beta with this new option is out.Yincognito wrote: ↑August 1st, 2020, 11:43 pm Yeah, anywhere you put it, as long as it works, personally I do want it. As I said, it's not just weather.com which does have these "code points", but other sites as well. Apart from that, while the API JSON is indeed the most convenient solution, I wouldn't like to be restricted (again) to just one single way of getting the data. Having at least two alternatives (the API JSON and the main site's one) is safer, in my view. Look how useful the API JSON alternative proved to be now.
Or, if you changed you mind, let me know so I can deal with the substitutions myself.![]()
-
- Posts: 2976
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working
Looks good to me. Regarding the Quote plugin, I'm no expert in it, but isn't a part of the plugin functionality (i.e. reading random lines from a file) able to be replicated by using a Calc measure and a WebParser measure parsing a local file anyway? Assuming there are \uXXXX code points in that file, that is.Brian wrote: ↑August 2nd, 2020, 12:11 am For now, this is just an option for Webparser. It will decode unicode code points like \uXXXX and \UXXXXXXXX (although the former is used most often). This doesn't do octal code points.
I am not sure there is a huge need for this outside of Webparser. We already have character variables that work in the same way.
There may some need to have it work with features that can read other files like the quote plugin and lua, but we haven't made any decisions about that yet.
-Brian
-
- Developer
- Posts: 21470
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
Note that this supports "normalization" of Unicode code points as well.Yincognito wrote: ↑August 2nd, 2020, 12:43 am Looks good to me. Regarding the Quote plugin, I'm no expert in it, but isn't a part of the plugin functionality (i.e. reading random lines from a file) able to be replicated by using a Calc measure and a WebParser measure parsing a local file anyway? Assuming there are \uXXXX code points in that file, that is.
https://flaviocopes.com/unicode/#normalization
So the string \uD834\uDF06 would decode to 𝌆
P.S. This also works with Character Variables in Rainmeter.
-
- Posts: 669
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: Weather Skins Not Working
Just wanna pop in and say, I'm really impressed by the level of commitment everyone has for this. I'm not the best at being patient and I probably would have just given up at this point. But no, jsmorley and co. just keep pressing on! Great job guys/gals, you're all amazing.
Maybe I'll actually finally update my Weather Meter soon... hopefully.
Maybe I'll actually finally update my Weather Meter soon... hopefully.

”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
-
- Developer
- Posts: 21470
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
Just to follow up...
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
MyString=\uD834\uDF06
[MeasureReadStringFromFile]
Measure=WebParser
URL=file://#CURRENTPATH##CURRENTFILE#
CodePage=1200
RegExp=(?siU)MyString=(.*)\r\n
StringIndex=1
DecodeCodePoints=1
[MeterDisplay]
Meter=String
MeasureName=MeasureReadStringFromFile
FontSize=25
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Look, I found a %1, which is the same as [\xD834][\xDF06]
You do not have the required permissions to view the files attached to this post.
-
- Posts: 2976
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working - This is the only allowed thread about this
Brilliant - it works flawlessly! I don't think I expected a feature so eagerly before, LOL - must have been the first one downloading the new beta. Just one thing though...if I'm applying this to an "itermediate" WebParser child (which also does some regexp substitutions; my bad, it doesn't actually), it doesn't work, I have to apply it on the "final" WebParser child (aka the grandchild). Don't bother with the variables below, they are just normal strings, the idea is important.
The parent:
Code: Select all
[MS_WebParser_Weather]
Measure=WebParser
Url="#WeatherURL#"
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
RegExp=#Flag##Weather#
UpdateRate=(#DetectionUpdateDivider#*#UpdateInterval#/#SlidingUpdate#)
FinishAction=[!SetVariable MomentIndex -1][!UpdateMeasureGroup "WeatherGroup"][!UpdateMeasureGroup "WeatherDerivativeGroup"][!UpdateMeasureGroup "MomentGroup"][!SetOption MT_Rainmeter_ForecastDayPartTopic StringAlign "Left"][!SetOption MT_Rainmeter_ForecastDayPartTopic X (#ContainerWidth#)][!SetOption MT_Rainmeter_ForecastDayPartTopic Text "#ForecastDayPartTopicText#"][!UpdateMeter *][!EnableMeasure "MS_Rainmeter_Counter"][!EnableMouseActionGroup "MouseOverAction|MouseLeaveAction|MouseScrollUpAction|MouseScrollDownAction|LeftMouseUpAction|MiddleMouseUpAction|RightMouseUpAction" MouseActionsGroup][!Redraw]
OnConnectErrorAction=[!SetVariable MomentIndex -1][!UpdateMeasureGroup "WeatherGroup"][!UpdateMeasureGroup "WeatherDerivativeGroup"][!UpdateMeasureGroup "MomentGroup"][!SetOption MT_Rainmeter_ForecastDayPartTopic StringAlign "Left"][!SetOption MT_Rainmeter_ForecastDayPartTopic X (#ContainerWidth#)][!SetOption MT_Rainmeter_ForecastDayPartTopic Text "#ForecastDayPartTopicText#"][!UpdateMeter *][!EnableMeasure "MS_Rainmeter_Counter"][!EnableMouseActionGroup "MouseOverAction|MouseLeaveAction|MouseScrollUpAction|MouseScrollDownAction|LeftMouseUpAction|MiddleMouseUpAction|RightMouseUpAction" MouseActionsGroup][!Redraw]
OnRegExpErrorAction=[!SetVariable MomentIndex -1][!UpdateMeasureGroup "WeatherGroup"][!UpdateMeasureGroup "WeatherDerivativeGroup"][!UpdateMeasureGroup "MomentGroup"][!SetOption MT_Rainmeter_ForecastDayPartTopic StringAlign "Left"][!SetOption MT_Rainmeter_ForecastDayPartTopic X (#ContainerWidth#)][!SetOption MT_Rainmeter_ForecastDayPartTopic Text "#ForecastDayPartTopicText#"][!UpdateMeter *][!EnableMeasure "MS_Rainmeter_Counter"][!EnableMouseActionGroup "MouseOverAction|MouseLeaveAction|MouseScrollUpAction|MouseScrollDownAction|LeftMouseUpAction|MiddleMouseUpAction|RightMouseUpAction" MouseActionsGroup][!Redraw]
DynamicVariables=1
Code: Select all
[MS_WebParser_Weather_Location]
Group=WeatherGroup
Measure=WebParser
Url=[MS_WebParser_Weather]
StringIndex=1
RegExp=#Flag##Location#
StringIndex2=1
DecodeCodePoints=1
UpdateDivider=-1
Code: Select all
[MS_WebParser_Weather_Location_District]
Group=WeatherGroup
Measure=WebParser
Url=[MS_WebParser_Weather_Location]
StringIndex=1
RegExp=#Flag##District#(#Data#)#Stop#
StringIndex2=1
UpdateDivider=-1
DecodeCodePoints=1
RegExpSubstitute=1
Substitute="#Decoder#","(?:^\s+|\s+$)":"",'(?:^"|"$)':"","(?i)(?:^$|^N\/A$|^null$)":"No District"
Wow, that's great news. Thank You!jsmorley wrote: ↑August 2nd, 2020, 12:55 amNote that this supports "normalization" of Unicode code points as well.
https://flaviocopes.com/unicode/#normalization
So the string \uD834\uDF06 would decode to 𝌆
P.S. This also works with Character Variables in Rainmeter.

-
- Developer
- Posts: 21470
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
I'm not sure. I think Brian would need to weigh in on whether or not a StringIndex2 option in fact creates a "child" measure in the eyes of WebParser. I would also be a bit concerned about how the UpdateDivider=-1 is being handled in this case. Don't forget that WebParser "parent" functionality depends on UpdateRate or [!CommandMeasure MeasureName "Update"].
-
- Posts: 2976
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working
I see...

Yeah, but I do update the group those measures belong to in the FinishAction of the WebParser parent...

Last edited by Yincognito on August 2nd, 2020, 1:21 am, edited 1 time in total.
-
- Developer
- Posts: 21470
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
LOL, There is no way I'm even going to attempt to figure out that mess you have going...Yincognito wrote: ↑August 2nd, 2020, 1:19 am I see...I'm curious what Brian has to say about this. Just a follow up question: you are able to replicate it, aren't you?
