The script already supports multiple instances in the same skin. You just need to use the "VariablePrefix" setting to distinguish each set of variables. See this post from earlier in this thread.ravisurdhar wrote:Hey, this looks cool...nice work! Any way it could be adapted to display entries from multiple RSS/XML/ical/whatever feeds in the same window, instead of cycling between each feed source?
It is currently September 20th, 2024, 1:08 pm
Reader
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: [Proof of Concept] Universal Feed Reader
-
- Posts: 18
- Joined: August 6th, 2011, 9:36 pm
- Location: Sweden -> gothenburg
Re: [Proof of Concept] Universal Feed Reader
I really should start browsing the forums more... rather than the manual.
you sure just saved me from trying to write a atom feed reader.. and the RSS feed reader itself took several days... heck how can you be this amazing?
thumbs up mate!
You are a savior of the rainmeter community, At least for me you are!
you sure just saved me from trying to write a atom feed reader.. and the RSS feed reader itself took several days... heck how can you be this amazing?
thumbs up mate!
You are a savior of the rainmeter community, At least for me you are!
Old rainmeter user..... 4+ years ago I was active... :-p
-
- Posts: 8
- Joined: January 23rd, 2011, 1:13 am
Re: [Proof of Concept] Universal Feed Reader
Any way to get the feeds to rotate every 30 seconds?
And how would I go about adding a dividing line or a gap between the title and the feeds?
Thanks very much, this was exactly what I was hoping to get from Rainmeter
And how would I go about adding a dividing line or a gap between the title and the feeds?
Thanks very much, this was exactly what I was hoping to get from Rainmeter
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: [Proof of Concept] Universal Feed Reader
Sure. The script includes "switch to next" and "switch to previous" functions, so you can do this with a simply Calc measure:scash wrote:Any way to get the feeds to rotate every 30 seconds?
Code: Select all
[Switcher]
Measure=CALC
Formula=Counter % 30 = 0
IfEqualValue=1
IfEqualAction=!CommandMeasure "MeasureLuaScript" "SwitchToNext()"
In the example skin, find the section [FeedItem1] (which is the first feed item) and add the following line:scash wrote:And how would I go about adding a dividing line or a gap between the title and the feeds?
Code: Select all
Y=10R
Code: Select all
[FeedTitle]
Meter=STRING
MeterStyle=StyleText
X=10
H=25
FontSize=15
StringStyle=BOLD
Text=#FeedTitle#
LeftMouseUpAction=#FeedLink#
ToolTipText=#FeedLink#
[FeedTitleBorder]
Meter=IMAGE
SolidColor=255,255,255,192
X=r
Y=10R
W=300
H=1
[FeedItem1]
Meter=STRING
MeterStyle=StyleText
Text=#ItemTitle1#
LeftMouseUpAction=#ItemLink1#
ToolTipText=#ItemLink1#
Y=10R
-
- Posts: 8
- Joined: January 23rd, 2011, 1:13 am
Re: [Proof of Concept] Universal Feed Reader
Thanks for the quick reply!
Switcher only works for the first group though. I tried adding and changing a second variant to
where the only modified part is I changed the last line to include "List2." and I tried placing the whole thing in different spots. What am I missing?
Its been a while since I did any coding, and I'm not familiar with this, although it does make some sense. Definitely going to play around with it in the coming weeks
SCRATCH THAT! Figured it out. Haha. I had to change the name of the header, [Switcher] to [Switcher2]. Not sure if the placement helped, but I have it placed at the very end, just above metadata, while first switcher is just below the first list group. Thank you for this!!
Switcher only works for the first group though. I tried adding and changing a second variant to
Code: Select all
[Switcher]
Measure=CALC
Formula=Counter % 30 = 0
IfEqualValue=1
IfEqualAction=!CommandMeasure "List2.MeasureLuaScript" "SwitchToNext()"
Its been a while since I did any coding, and I'm not familiar with this, although it does make some sense. Definitely going to play around with it in the coming weeks
SCRATCH THAT! Figured it out. Haha. I had to change the name of the header, [Switcher] to [Switcher2]. Not sure if the placement helped, but I have it placed at the very end, just above metadata, while first switcher is just below the first list group. Thank you for this!!
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: [Proof of Concept] Universal Feed Reader
Hi again,
I modified your skin to display feed information this way:
Everything works as it should. The only "hick-up" appears when you first refresh the skin; The 2 first Lists ("list1" & "List2") appear correctly, but in the last 2 the error message "no valid feed found" appears. If I press the grabbers, to change to feed6 & feed8 respectively, then the feeds' contents display correctly. Then, I can change back to the feed5 & feed7 normally. I think it may be some sort of "work overload" for the lua script (trying to read to many feeds?). But I wouldn't know, so I thought I'd share it here.
I have enabled automatic scrolling between the feeds, so that after x seconds the 2 respective feed appears. So this isn't a big problem. I would like to know though, if I could do something about it. As always, thank you in advance.
I modified your skin to display feed information this way:
Code: Select all
NumberOfFeeds=2
FeedMeasureName1=MeasureFeed
FeedMeasureName2=MeasureFeed2
CurrentFeed=1
List2.NumberOfFeeds=2
List2.FeedMeasureName1=MeasureFeed3
List2.FeedMeasureName2=MeasureFeed4
List2.CurrentFeed=1
List3.NumberOfFeeds=2
List3.FeedMeasureName1=MeasureFeed5
List3.FeedMeasureName2=MeasureFeed6
List3.CurrentFeed=1
List4.NumberOfFeeds=2
List4.FeedMeasureName1=MeasureFeed7
List4.FeedMeasureName2=MeasureFeed8
List4.CurrentFeed=1
I have enabled automatic scrolling between the feeds, so that after x seconds the 2 respective feed appears. So this isn't a big problem. I would like to know though, if I could do something about it. As always, thank you in advance.
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: [Proof of Concept] Universal Feed Reader
You'll notice that in the original skin, the first WebParser measure for each list has a FinishAction which updates the script, as such:
Without these actions, the script measures won't update until 10 minutes after the skin is loaded (UpdateDivier=600). I suspect you just need to add a similar action on your [MeasureFeed5] and [MeasureFeed7] to update the scripts for List3 and List4, respectively. :)
Code: Select all
FinishAction=!CommandMeasure "MeasureLuaScript" "Update()"
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: [Proof of Concept] Universal Feed Reader
Yes, that did it. When duplicating measures, I didn't notice that difference in MeasureFeeds. Now, every feed "starter" (1,3,5,7) has it's FinishAction and updates automatically. You can see my 4feed version on my signature, I hope you like it.
P.S: I found a feed that doesn't have <title> tag . Is there any easy way to inject a custom one? Here it is. (I hope you don't mind me asking so many questions ).
P.S: I found a feed that doesn't have <title> tag . Is there any easy way to inject a custom one? Here it is. (I hope you don't mind me asking so many questions ).
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: [Proof of Concept] Universal Feed Reader
Not a bit. Here's a few lines that would replace a blank <title> value for this specific case, as well as the general case. Insert it in your Update() function sometime before the SKIN:Bangs are sent:KreAch3R wrote:I found a feed that doesn't have <title> tag . Is there any easy way to inject a custom one? Here it is. (I hope you don't mind me asking so many questions ).
Code: Select all
if sFeedTitle == '' then
if string.match (sRaw, '<link>http://www.techgear.gr</link>') then
sFeedTitle = 'TechGear'
else
sFeedTitle = 'Untitled'
end
end
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: [Proof of Concept] Universal Feed Reader
Brilliant! Thank you.