now there is Kaelri's Reader skin and it is an awesome piece of work which you should try. the bad part is that it uses Lua, so if you want to use a non-Latin feed you are out of luck as Lua does not support Unicode.
fortunately there is another way to build an universal feed reader in Rainmeter, and it does not use Lua. for this we have to use the webparser plugin to parse webparser measures. basically we do not only have parent and child measures, but also grandchildren and their offsprings as well.
first of all we have to get the whole feed, this will be our parent measure. we use this regular expression for that task: RegExp="(?siU)^(.*)$"
Code: Select all
[MeasureBase]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=#UniNewsFeedURL#
RegExp="(?siU)^(.*)$"
Debug=1
StringIndex=1
DecodeCharacterReference=0
CodePage=#UniNewsCodePage#
then we'll tear what this measure returns apart, step by step. first we'll get the content of each item of this feed:
Code: Select all
[MeasureItem1RSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureBase]
RegExp="(?siU).*<item>(.*)</item>"
StringIndex=1
DecodeCharacterReference=0
[MeasureItem2RSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureBase]
RegExp="(?siU).*<item>(.*)</item>.*<item>(.*)</item>"
StringIndex=1
DecodeCharacterReference=0
...
so we need to add measures for Atom feeds as well:
Code: Select all
[MeasureItem1Atom]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureBase]
RegExp="(?siU).*<entry>(.*)</entry>"
StringIndex=1
DecodeCharacterReference=0
[MeasureItem2Atom]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureBase]
RegExp="(?siU).*<entry>(.*)</entry>.*<entry>(.*)</entry>"
StringIndex=1
DecodeCharacterReference=0
...
Code: Select all
[MeasureDescription1RSSPre]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureItem1RSS]
RegExp="(?siU).*<description>(.*)</description>"
StringIndex=1
DecodeCharacterReference=1
[MeasureDescription1RSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureDescription1RSSPre]
StringIndex=1
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#UniNewsSubstitute#
[MeasureDescription2RSSPre]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureItem2RSS]
RegExp="(?siU).*<description>(.*)</description>"
StringIndex=2
DecodeCharacterReference=1
[MeasureDescription2RSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureDescription2RSSPre]
StringIndex=1
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#UniNewsSubstitute#
...
Code: Select all
[MeasureSummary1AtomPre]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureItem1Atom]
RegExp="(?siU).*<summary.*>(.*)</summary>"
StringIndex=1
DecodeCharacterReference=1
[MeasureSummary1Atom]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureSummary1AtomPre]
StringIndex=1
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#UniNewsSubstitute#
...
Code: Select all
[MeasureContent1AtomPre]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureItem1Atom]
RegExp="(?siU).*<content.*>(.*)</content>"
StringIndex=1
DecodeCharacterReference=1
[MeasureContent1Atom]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureContent1AtomPre]
StringIndex=1
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#UniNewsSubstitute#
...
we'll create another measure. just a calc measure that returns 1, and then we'll use substitute to replace that little number:
Code: Select all
[MeasureDescription1]
Measure=Calc
Formula=1
DynamicVariables=1
Substitute="1":"[MeasureDescription1RSS]","":"[MeasureSummary1Atom]","":"[MeasureContent1Atom]","€€€€":'"'
...
did you notice "€€€€":'"' at the end of the substitution? quotes are likely to break substitions. this is why i am using this: UniNewsSubstitute='"':"€€€€" to encode them before and decode them back when everything is finished.
the attached example skin supports RSS, RDF, Atom and OPML feeds. it uses Poiru's Illustro design, so it can be used as a substitute until the dev team finds a better solution.
this method of parsing measures can also be adapted to feeds that are not strictly keeping their layout (some items have an image in <image> tags, others don't for example.) which would usually break the "traditional" method of feed reading in Rainmeter.
==================================================================
edit: support for RDF feeds added
edit 2: made the whole thing resource friendlier
edit 3: fix for some feeds that include links in <![CDATA[ tags