I'm looking for help to get the Cryptometer skin to work again.
The main issue is not about the regexp or getting data, the data is correctly downloaded from website, and parsed with the regexp.
I just can't figure out why the values won't show up on the skin.
Here is the code (found on github and adapted a bit) :
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Metadata]
Name=Cryptometer
Author=Petitsurfeur (https://github.com/petitsurfeur)
Information=Skin that tracks a given set of cryptocurrencies.
License=Creative Commons BY-NC-SA 4.0
Version=0.8 2020-04-01
[Variables]
@Include1=#@#variables.ini
@Include2=#@#styles.ini
@Include3=#@#background.ini
API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXX
#Adjust the total height of the widget (10 lines x 30px per line)
BackgroundHeight=300
LeftPadding=10
TopPadding=10
RowHeight=24
AutoBorder=1
# Adjusts the distance columns from the left of the widget
ColumnLabelLeftPadding=(#LeftPadding#+25)
ColumnValueLeftPadding=(#LeftPadding#+70)
Column1hrLeftPadding=(#LeftPadding#+150)
Column24hrLeftPadding=(#LeftPadding#+220)
Column7dLeftPadding=(#LeftPadding#+290)
# Footer - Last Updated
BackgroundFooterY=(#BackgroundHeight#-20)
BackgroundFooterX=(#Column7dLeftPadding#-90)
[StyleGreenText]
FontColor=0,153,51,255
[StyleRedText]
FontColor=210,72,54,255
[StyleUpdatedAt]
;StringAlign=RightCenter
FontSize=9
;Padding=0,0,0,5
X=(#BackgroundFooterX#)
Y=(#BackgroundFooterY#)
;W=190
;H=20
# Column Headers__________________________________________________________________
[MeterColumnValue]
Meter=String
MeterStyle=StyleSmallText | StyleWhiteText | StyleLeftAlign
X=#ColumnValueLeftPadding#
Y=#TopPadding#
Text=EUR
[MeterColumn1hr]
Meter=String
MeterStyle=StyleSmallText | StyleWhiteText | StyleLeftAlign
X=#Column1hrLeftPadding#
Y=#TopPadding#
Text=1H
[MeterColumn24hr]
Meter=String
MeterStyle=StyleSmallText | StyleWhiteText | StyleLeftAlign
X=#Column24hrLeftPadding#
Y=#TopPadding#
Text=24H
[MeterColumn7d]
Meter=String
MeterStyle=StyleSmallText | StyleWhiteText | StyleLeftAlign
X=#Column7dLeftPadding#
Y=#TopPadding#
Text=7J
[MeasureLastUpdated]
Measure=WebParser
URL=[MeasureBTCData]
StringIndex=7
[MeasureLastUpdatedFormatted]
Measure=String
String=0
[MeterLastUpdated]
Meter=String
MeasureName=MeasureLastUpdated
MeterStyle=StyleSmallText | StyleUpdatedAt
X=(#BackgroundFooterX#)
Y=(#BackgroundFooterY#)
##### Bitcoin (BTC)__________________________________________________________________
[MeasureBTCData]
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
URL=https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC&convert=EUR
Measure=WebParser
;URL=file://XXX\WebParserDump.txt
Header=X-CMC_PRO_API_KEY:#API_KEY#
RegExp=(?siU)"name":"(.*)".*"symbol":"(.*)",.*"price".*(\d*\.\d{0,2}?).*"percent_change_1h".*([-+]?\d*\.\d{0,2}?).*"percent_change_24h".*([-+]?\d*\.\d{0,2}?).*"percent_change_7d".*([-+]?\d*\.\d{0,2}?).*"last_updated":"(.*)\..*Z
UpdateRate=900 # every 15 minutes
Debug=2
# Extract each column's value by the index
[MeasureBTCName]
Measure=WebParser
URL=[MeasureBTCData]
StringIndex=1
[MeasureBTCSymbol]
Measure=WebParser
URL=[MeasureBTCData]
StringIndex=2
[MeasureBTCEURValue]
Measure=WebParser
URL=[MeasureBTCData]
StringIndex=3
[MeasureBTCEURPrice]
Measure=Calc
Formula=[MeasureBTCEURValue]
DynamicVariables=1
[MeasureBTC1hr]
Measure=WebParser
URL=[MeasureBTCData]
StringIndex=4
IfCondition=MeasureBTC1hr < 0
IfTrueAction=[!SetOption MeterBTCColumn1hr MeterStyle "StyleSmallText | StyleLeftAlign | StyleRedText"]
IfFalseAction=[!SetOption MeterBTCColumn1hr MeterStyle "StyleSmallText | StyleLeftAlign | StyleGreenText"]
[MeasureBTC1hrCalc]
Measure=Calc
Formula=[MeasureBTC1hr]
DynamicVariables=1
[MeasureBTC24hr]
Measure=WebParser
URL=[MeasureBTCData]
StringIndex=5
IfCondition=MeasureBTC24hr < 0
IfTrueAction=[!SetOption MeterBTCColumn24hr MeterStyle "StyleSmallText | StyleLeftAlign | StyleRedText"]
IfFalseAction=[!SetOption MeterBTCColumn24hr MeterStyle "StyleSmallText | StyleLeftAlign | StyleGreenText"]
[MeasureBTC24hrCalc]
Measure=Calc
Formula=[MeasureBTC24hr]
DynamicVariables=1
[MeasureBTC7d]
Measure=WebParser
URL=[MeasureBTCData]
StringIndex=6
IfCondition=MeasureBTC7d < 0
IfTrueAction=[!SetOption MeterBTCColumn7d MeterStyle "StyleSmallText | StyleLeftAlign | StyleRedText"]
IfFalseAction=[!SetOption MeterBTCColumn7d MeterStyle "StyleSmallText | StyleLeftAlign | StyleGreenText"]
[MeasureBTC7dCalc]
Measure=Calc
Formula=[MeasureBTC7d]
DynamicVariables=1
# Render the columns with their appropriate values
[MeterBTCIcon]
Meter=Image
MeasureName=MeasureBTCSymbol
MeasureName2=MeasureBTCName
ImageName=@Resources/icons/%1.png
X=#LeftPadding#
Y=(#TopPadding#+(#RowHeight#*1))
W=23
H=23
PreserveAspectRatio=1
LeftMouseUpAction=["https://coinmarketcap.com/currencies/[&MeasureBTCName]"]
[MeterBTCColumnLabel]
Meter=String
MeterStyle=StyleSmallText | StyleLeftAlign
X=#ColumnLabelLeftPadding#
Y=(#TopPadding#+(#RowHeight#*1))
MeasureName=MeasureBTCSymbol
Text=%1
[MeterBTCColumnValue]
Meter=String
MeasureName=MeasureBTCEURPrice
MeterStyle=StyleSmallText | StyleLeftAlign
X=#ColumnValueLeftPadding#
Y=(#TopPadding#+(#RowHeight#*1))
NumOfDecimals=2
Text=%1 €
[MeterBTCColumn1hr]
Meter=String
MeasureName=MeasureBTC1hrCalc
MeterStyle=StyleSmallText | StyleLeftAlign
X=#Column1hrLeftPadding#
Y=(#TopPadding#+(#RowHeight#*1))
NumOfDecimals=2
Text=%1%
[MeterBTCColumn24hr]
Meter=String
MeasureName=MeasureBTC24hrCalc
MeterStyle=StyleSmallText | StyleLeftAlign
X=#Column24hrLeftPadding#
Y=(#TopPadding#+(#RowHeight#*1))
NumOfDecimals=2
Text=%1%
[MeterBTCColumn7d]
Meter=String
MeasureName=MeasureBTC7dCalc
MeterStyle=StyleSmallText | StyleLeftAlign
X=#Column7dLeftPadding#
Y=(#TopPadding#+(#RowHeight#*1))
NumOfDecimals=2
Text=%1%
This is the result I have :
And this is what I should have :
Any help much appreciated.
Thanks