It is currently April 27th, 2024, 4:48 pm
Get help with creating, editing & fixing problems with skins
VRArt1
Posts: 10 Joined: August 13th, 2017, 6:32 am
Post
by VRArt1 » August 14th, 2017, 11:27 am
I'm working on a skin for retrieving some patreon values and because of the way the website is formatted it has resulted in a lot of empty spaces. How do I change this so that it won't include the blanks in the strings? Or from the regexp; which ever way gets rid of them.
Site:
https://graphtreon.com/creator/chapotraphouse
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=1
SolidColor=0,0,0,0
[Metadata]
Name=Patreon Count
Author=
Information=
Version=1.0.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0
;Accounts
[Graph Account]
Measure=Plugin
Plugin=WebParser
URL=https://graphtreon.com/creator/chapotraphouse
UpdateRate=600
RegExp=(?siU)<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>(.*)</h5>.*<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>(.*)</h5>
FinishAction=[!EnableMeasureGroup Measures][!UpdateMeasureGroup Measures]
;Strings
[Patreon Number]
Measure=Plugin
Plugin=WebParser
URL=[Graph Account]
StringIndex=1
Disabled=1
Group=Measures
[Patreon Pay]
Measure=Plugin
Plugin=WebParser
URL=[Graph Account]
StringIndex=2
Disabled=1
Group=Measures
;Chart
[MeterTitle]
Meter=String
MeasureName=
X=0
Y=10R
FontSize=14
FontColor=255,255,255,255
FontFace=Century Gothic
StringStyle=Normal
Text="Patrons Per Month"
AntiAlias=1
[MeterPatreon]
Meter=String
MeasureName=Patreon Number
MeasureName2=Patreon Pay
X=0
Y=10R
FontSize=14
FontColor=255,255,255,255
FontFace=Century Gothic
StringStyle=Normal
Text="%1 %2"
AntiAlias=1
Last edited by VRArt1 on August 15th, 2017, 9:36 am, edited 1 time in total.
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » August 14th, 2017, 12:15 pm
VRArt1
Posts: 10 Joined: August 13th, 2017, 6:32 am
Post
by VRArt1 » August 14th, 2017, 12:17 pm
I've been looking through but I can't find out how to remove the blank spaces. That's why I came back here.
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » August 14th, 2017, 12:34 pm
Code: Select all
(?siU)<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>\X+(\d+.*)\s+</h5>.*<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>\X+(\d+.*)\s+</h5>
VRArt1
Posts: 10 Joined: August 13th, 2017, 6:32 am
Post
by VRArt1 » August 14th, 2017, 12:44 pm
FreeRaider wrote: Code: Select all
(?siU)<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>\X+(\d+.*)\s+</h5>.*<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>\X+(\d+.*)\s+</h5>
Just tried putting that in and it doesn't seem to be working.
I got an error message of:
RegExp error at offset 109: support for \P, \p, and \X has not been compiled
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » August 14th, 2017, 1:04 pm
VRArt1 wrote: Just tried putting that in and it doesn't seem to be working.
I got an error message of:
RegExp error at offset 109: support for \P, \p, and \X has not been compiled
Uhm, I will report that.
Another solution:
Code: Select all
RegExp=(?siU)<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>.*(\d+\,\d+)\s+</h5>.*<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>.*(\d+\,\d+)\s+</h5>
VRArt1
Posts: 10 Joined: August 13th, 2017, 6:32 am
Post
by VRArt1 » August 14th, 2017, 11:14 pm
FreeRaider wrote: RegExp error at offset 109: support for \P, \p, and \X has not been compiled
Uhm, I will report that.
Another solution:
Code: Select all
RegExp=(?siU)<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>.*(\d+\,\d+)\s+</h5>.*<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>.*(\d+\,\d+)\s+</h5>
Getting a RegExp -1 error for that. Does it work for you?
eclectic-tech
Rainmeter Sage
Posts: 5407 Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Post
by eclectic-tech » August 15th, 2017, 3:07 am
VRArt1 wrote: Getting a RegExp -1 error for that. Does it work for you?
I used FreeRaider's RegExp in your originally posted code and it returns the values of patrons and pay per month.
patrons.png
You may have a hung webparser... shutdown Rainmeter and restart. If that doesn't correct the error, reboot and it will work.
You do not have the required permissions to view the files attached to this post.
VRArt1
Posts: 10 Joined: August 13th, 2017, 6:32 am
Post
by VRArt1 » August 15th, 2017, 3:22 am
eclectic-tech wrote: I used FreeRaider's RegExp in your originally posted code and it returns the values of patrons and pay per month.patrons.pngYou may have a hung webparser... shutdown Rainmeter and restart. If that doesn't correct the error, reboot and it will work.
I just tried it and it worked for me as well, I guess the problem is that the actual goal account is
https://graphtreon.com/creator/VRArt1 . I just figured it'd work universally but for some reason that's not being the case... What's different between these two that is causing one to work and no the other?
VRArt1
Posts: 10 Joined: August 13th, 2017, 6:32 am
Post
by VRArt1 » August 15th, 2017, 3:57 am
Here's what the code currently looks like and it's getting the regexp -1 error.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=1
SolidColor=0,0,0,0
[Metadata]
Name=Patreon Count
Author=V--R
Information=
Version=1.0.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0
;Accounts
[Graph Account]
Measure=Plugin
Plugin=WebParser
URL=https://graphtreon.com/creator/vrart1
UpdateRate=600
RegExp=(?siU)<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>.*(\d+\,\d+)\s+</h5>.*<div class="col-md-3 col-sm-3 headerstats">.*<div class="box box-solid">.*<div class="box-body">.*<h5>.*(\d+\,\d+)\s+</h5>
FinishAction=[!EnableMeasureGroup Measures][!UpdateMeasureGroup Measures]
;Strings
[Patreon Number]
Measure=Plugin
Plugin=WebParser
URL=[Graph Account]
StringIndex=1
Disabled=1
Group=Measures
[Patreon Pay]
Measure=Plugin
Plugin=WebParser
URL=[Graph Account]
StringIndex=2
Disabled=1
Group=Measures
;Chart
[MeterTitle]
Meter=String
MeasureName=
X=0
Y=10R
FontSize=14
FontColor=255,255,255,255
FontFace=Century Gothic
StringStyle=Normal
Text="Patrons Per Month"
AntiAlias=1
[MeterPatreon]
Meter=String
MeasureName=Patreon Number
MeasureName2=Patreon Pay
X=0
Y=10R
FontSize=14
FontColor=255,255,255,255
FontFace=Century Gothic
StringStyle=Normal
Text="%1 $%2"
AntiAlias=1