Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1575

Help: Rainmeter Skins • Re: WebParser XMLHttpRequest for weather forecast

$
0
0
Now the question: How do I need to construct a WebParser call to pull exactly this datatable?

Help is much appreciated... I'm not a specialist in php unfortunately...
Me neither, but don't even have to be.
First if you want to get the whole database as one, it's a little bit simpler. But I think getting all those elements (what there are between the brackets) one by one is a much better solution.
To get them this way, first you need a parent WebParser measure, to acquire the online data. Something like this:

Code:

[MeasureRainmeter]Measure=WebParserUpdateRate=600Url=https://14-tage-wettervorhersage.de/wetter/paris/stuendlich/623/RegExp=(?siU)function drawWolken.*\(\[.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],
Each of the elements in the RegExp option (the .*\[(.*)], elements) return one such data. I'm not sure if the number of those data can vary. If it can, there are additional solutions to ensure the code doesn't fail, but this is another story, for later.
If you have the above parent WebParser measure, you need one for each such element. I post here only three, but if you need more, you obviously can and have to add more such measures:

Code:

[MeasureDataBase1]Measure=WebParserUrl=[MeasureRainmeter]StringIndex=1[MeasureDataBase2]Measure=WebParserUrl=[MeasureRainmeter]StringIndex=2[MeasureDataBase3]Measure=WebParserUrl=[MeasureRainmeter]StringIndex=3
Finally you need a meter, to get visible what has been acquired. For instance use this meter:

Code:

[MeterData]Meter=STRINGMeasureName=MeasureDataBase1MeasureName2=MeasureDataBase2MeasureName3=MeasureDataBase3X=0Y=0Padding=15,5,15,5FontColor=220,220,220FontEffectColor=0,0,0StringEffect=ShadowSolidColor=0,0,0,150FontSize=8FontFace=Segoe UIStringStyle=BOLDStringAlign=LEFTAntiAlias=1Text=1. %1#CRLF#2. %2#CRLF#3. %3DynamicVariables=1
To get this properly working, you need one more thing: a DynamicWindowSize=1 option onto the [Rainmeter] section. Add it, to be sure the skin is properly resized when the online data has been got.
Just to make sure you can use it properly, here is the whole code. Give it a try please and let me know if it does what you expect:

Code:

[Rainmeter]DynamicwindowSize=1[MeasureRainmeter]Measure=WebParserUpdateRate=600Url=https://14-tage-wettervorhersage.de/wetter/paris/stuendlich/623/RegExp=(?siU)function drawWolken.*\(\[.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],.*\[(.*)],[MeasureDataBase1]Measure=WebParserUrl=[MeasureRainmeter]StringIndex=1[MeasureDataBase2]Measure=WebParserUrl=[MeasureRainmeter]StringIndex=2[MeasureDataBase3]Measure=WebParserUrl=[MeasureRainmeter]StringIndex=3[MeterData]Meter=STRINGMeasureName=MeasureDataBase1MeasureName2=MeasureDataBase2MeasureName3=MeasureDataBase3X=0Y=0Padding=15,5,15,5FontColor=220,220,220FontEffectColor=0,0,0StringEffect=ShadowSolidColor=0,0,0,150FontSize=8FontFace=Segoe UIStringStyle=BOLDStringAlign=LEFTAntiAlias=1Text=1. %1#CRLF#2. %2#CRLF#3. %3DynamicVariables=1

Statistics: Posted by balala — Yesterday, 9:52 pm



Viewing all articles
Browse latest Browse all 1575

Trending Articles