Rainmeter: How to concatenate strings

1.4k views Asked by At

I am getting data from a broken RSS feed that gives me wrong link. I wanted to fix this link so I made this code:

<link.*>(.*)&.*tid(.*)</link>

and the link could be like:

www.somedomain.com/?value=50&burrrdurrrr;tid=120

But the real working link is in this form:

www.somedomain.com/?value=50&tid=120

The thing that I'm asking is if my measure thing looks like this:

[FeedURL]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Feed]
StringIndex=2 ;now I only get www.somedomain.com/?value=50
Substitute=#SubstituteFeed#

How am I supposed to concatenate the strings together to complete the url?

1

There are 1 answers

0
IMSoP On

I'm guessing rather than &burrrdurrrr;, the link has &amp;, which is how you have to write & in an HTML or XML file.

If that's the case, you just need to set the DecodeCharacterReference option, as described in this handy-looking tutorial. Another option mentioned there is Substitute, which would be able to strip it out even if it really was &burrrdurrrr;.

None of this is a particularly sensible way of dealing with HTML or XML - a much better approach would be a plugin which actually parsed the document structure and let you reference nodes using XPath or CSS rules - but you work with what you've got, I guess. (I've never heard of this "Rainmeter" before, despite its claim to be "the best known and most popular desktop customization program for Windows"; maybe because nobody else calls their program that, instead almost universally using the word "widget"?)