This can also be useful for those who are just getting started with creating an RSS/Atom feed skin in Rainmeter.
First, it will pay to keep handy the manual pages for WebParser:
http://docs.rainmeter.net/manual-beta/plugins/webparser
http://docs.rainmeter.net/tips/webparser-tutorial
Now for the addon and what it does:
Unzip that file to any location you like and run it.
Simply paste in the URL for any RSS or Atom feed, and click the "Connect" button.
The program will download the HTML / XML for the feed, parse it to determine if it is RSS or Atom, and will create a text file with the "parent" measure and Regular Expression you need to read the site. It will also tell you in the comments of the text file how many "items" there are available in the feed.
This uses a look-ahead assertion approach, with a [Variables] of GetItem that you just add to the RegExp option of the parent WebParser measure.
Then there is an example set of "child" WebParser measures, showing how to get the Feed Title and Feed Link, as well as the Date, Link and Title for the first #GetItem# returned.
You can use this text file to help with creating your skin. Let's look at an example:
Code: Select all
[Rainmeter]
Update=1000
[Variables]
GetItem=(?(?=.*<item>).*<item>.*<title>(.*)</title>.*<link>(.*)</link>.*<pubdate>(.*)</pubdate>.*</item>)
TitleSub="^\s+":"","<!\[CDATA\[":"","\]\]>":"","!\[CDATA\[":"","\]\]":""
[MeasureSite]
Measure=Plugin
Plugin=WebParser
URL=http://feeds.gawker.com/lifehacker/full
RegExp=(?siU)<title>(.*)</title>.*<link>(.*)</link>#GetItem##GetItem##GetItem##GetItem##GetItem#
UpdateRate=600
[MeasureSiteTitle]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
DecodeCharacterReference=1
StringIndex=1
[MeasureSiteLink]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=2
[MeasureItem1Date]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=5
[MeasureItem1Link]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=4
[MeasureItem1Title]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#TitleSub#
StringIndex=3
[MeasureItem2Date]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=8
[MeasureItem2Link]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=7
[MeasureItem2Title]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#TitleSub#
StringIndex=6
[MeasureItem3Date]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=11
[MeasureItem3Link]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=10
[MeasureItem3Title]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#TitleSub#
StringIndex=9
[MeasureItem4Date]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=14
[MeasureItem4Link]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=13
[MeasureItem4Title]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#TitleSub#
StringIndex=12
[MeasureItem5Date]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=17
[MeasureItem5Link]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=16
[MeasureItem5Title]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
DecodeCharacterReference=1
RegExpSubstitute=1
Substitute=#TitleSub#
StringIndex=15
[ItemStyle]
W=290
H=17
X=5
Y=5R
FontSize=11
FontColor=255,255,255,255
ClipString=1
AntiAlias=1
DynamicVariables=1
[EvenStyle]
SolidColor=80,80,80,255
[OddStyle]
SolidColor=0,0,0,255
[MeterBack]
Meter=Image
MeterStyle=OddStyle
W=300
H=138
[MeterSiteTitle]
Meter=String
MeterStyle=ItemStyle | OddStyle
MeasureName=MeasureSiteTitle
Y=5
FontColor=209,255,211,255
LeftMouseUpAction=["[MeasureSiteLink]"]
[MeterItem1Title]
Meter=String
MeterStyle=ItemStyle | EvenStyle
MeasureName=MeasureItem1Title
LeftMouseUpAction=["[MeasureItem1Link]"]
[MeterItem2Title]
Meter=String
MeterStyle=ItemStyle | OddStyle
MeasureName=MeasureItem2Title
LeftMouseUpAction=["[MeasureItem2Link]"]
[MeterItem3Title]
Meter=String
MeterStyle=ItemStyle | EvenStyle
MeasureName=MeasureItem3Title
LeftMouseUpAction=["[MeasureItem3Link]"]
[MeterItem4Title]
Meter=String
MeterStyle=ItemStyle | OddStyle
MeasureName=MeasureItem4Title
LeftMouseUpAction=["[MeasureItem4Link]"]
[MeterItem5Title]
Meter=String
MeterStyle=ItemStyle | EvenStyle
MeasureName=MeasureItem5Title
LeftMouseUpAction=["[MeasureItem5Link]"]
I added four additional #GetItem# variables to the RegExp option, so it will retrieve a total of 5 "items".
Then I added the additional "child" WebParser measures for the additional four items, making sure I used the correct StringIndex option on each.
Then I just created some MeterStyle sections to simplify formatting my meters, and added a background meter, a meter for the site title, and meters for each of the five "Items"
The cosmetics are not really important to this. What I am trying to do is give you some help with creating that all-important RegExp option for any given RSS or Atom feed, without you having to manually parse the site.
=======================
I have by NO means tested this on every possible RSS and Atom site out there, however I have tested it on several dozen popular ones. If you run into an RSS/Atom feed that the addon can't handle, please post the URL to the feed here so I can take a look at it.