It is currently March 24th, 2019, 8:40 pm

FeedReader w/ sorting

Post your work-in-progress and completed skins to share and discuss.
User avatar
Kaelri
Developer
Posts: 1738
Joined: July 25th, 2009, 4:47 am
Location: Rochester, NY

Re: FeedReader w/ sorting

Kaelri » October 3rd, 2012, 3:53 pm

rainusero wrote:2.
What about feeds with less than 10 items - when you switch from feed where there is 10 items to another feed where is less than 10 items,
there is some problem with refresh. I see e.g. 5 items from current set of feeds and another 5 items from recently readed feeds when I switch to another one.
There should be visible only 5 current items instead of 10.

Some examples below (I changed MinItems=10 to MinItems=1 in [MeasureReader] section).
The MinItems option exists to address this exact issue. Why did you change it?
rainusero
Posts: 21
Joined: May 9th, 2012, 10:11 am

Re: FeedReader w/ sorting

rainusero » October 3rd, 2012, 4:21 pm

The MinItems option exists to address this exact issue. Why did you change it?
Change it back to 10 and see what happens. Feeds simply stop working at all (it is unable to display them).

To see what I'm talking about use sample feeds below (each of them has less than 10 items).
http://feeds.feedburner.com/LinuxAdminZone
http://www.linuxforums.org/forum/external.php?type=RSS2&forumids=17
http://www.unix.com/external.php?forumids=129
http://phoronix.com/forums/external.php?type=RSS2&forumids=14

That's why I changed MinItems to 1.
User avatar
Mordasius
Posts: 1059
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: FeedReader w/ sorting

Mordasius » October 4th, 2012, 1:08 am

rainusero wrote:1.Switching to a particular feed each time that feed was updated works fine, but too fast, IMHO. Is this feature customizable ? Can it be customizable (switching speed/refresh -> that should be a little bit slowly like in previous version) ?
You could daisy-chain the MeasureFeeds e.g. [MeasureFeed2] starts disabled and is enabled in the FinishAction of [MeasureFeed], [MeasureFeed3] starts disabled and is enabled in the FinishAction of [MeasureFeed2], etc. This slows things down a little but only works when you refresh the skin.
rainusero wrote:2. What about feeds with less than 10 items - when you switch from feed where there is 10 items to another feed where is less than 10 items.
The error was caused by the way the the 'bullet-mark' was being added to new items which negated the blanking of empty items. I've taken the bullet-marking out of the script and put it in meters in the latest version of the feedreader, but you do need to leave MinItems=10.
rainusero wrote:3. Check below feeds:
It was not WebParserSubstitute, but rather the DecodeCharacterReference that was causing problems with http://gagor.pl/feed/. The feed can be read with DecodeCharacterReference=0 but you'll get '–' in place of en dash (-) and ''' in place of an apostrophe so you'll need to add "–":"-","'":"'" to the WebParserSubstitute to display the items properly.

No problem with http://www.linuxforu.com/feed/
rainusero wrote:4. When there is none URL given (like this
URL1=
UpdateRate1=1800) I always see message: Loading... Waiting for data from WebParser.
I expect there is a way to check for those cases where the user has left a blank URL, however, I would guess that this is rather rare and that s/he would check the URL after seeing the Loading... Waiting for data from WebParser message for a minute or two.
rainusero
Posts: 21
Joined: May 9th, 2012, 10:11 am

Re: FeedReader w/ sorting

rainusero » October 4th, 2012, 12:56 pm

1.
You could daisy-chain the MeasureFeeds e.g. [MeasureFeed2] starts disabled and is enabled in the FinishAction of [MeasureFeed], [MeasureFeed3] starts disabled and is enabled in the FinishAction of [MeasureFeed2], etc. This slows things down a little but only works when you refresh the skin.
Could you write some sample code for this "daisy-chain reaction" (2, 3 MeasureFeeds would be good enough - having such an example I'll be able to do the rest) ?

2.
Short speaking... Taking the bullet-marking out of the script and putting it in meters was probably a good idea (MinItems=10 "issue" is solved now) but...
Behavior of "bullet-mark" should be the same as it was on yesterdays version (colors, spacing, etc.), shouldn't be ? It was clean and nice. Could you correct this ?
User avatar
Mordasius
Posts: 1059
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: FeedReader w/ sorting

Mordasius » October 4th, 2012, 1:34 pm

We are getting into the realm of skin customisation rather bug-fixing now so I suggest you work your way through Rainmeter 101 to get familiar with the way skins work and how to customise them to meet your needs and expectations.
rainusero wrote:1.Could you write some sample code for this "daisy-chain reaction" (2, 3 MeasureFeeds would be good enough - having such an example I'll be able to do the rest) ?
Ok., this sort of thing wasn't covered by Rainmeter 101 so here you go:

Code: Select all

;=== [  measures ]
[MeasureFeed]
Measure=Plugin
Plugin=WebParser
URL=#URL1#
RegExp=(?siU)(.*)$
Substitute=#WebParserSubstitute#
FinishAction=[!CommandMeasure "MeasureReader" "Show(1)"] [!EnableMeasure MeasureFeed2]
UpdateRate=#UpdateRate1#

[MeasureFeed2]
Measure=Plugin
Plugin=WebParser
Url=#URL2#
RegExp=(?siU)(.*)$
Substitute=#WebParserSubstitute#
FinishAction=[!CommandMeasure "MeasureReader" "Show(2)"]  [!EnableMeasure MeasureFeed3]
UpdateRate=#UpdateRate2#
Disabled=1

[MeasureFeed3]
Measure=Plugin
Plugin=WebParser
Url=#URL3#
RegExp=(?siU)(.*)$
Substitute=#WebParserSubstitute#
FinishAction=[!CommandMeasure "MeasureReader" "Show(3)"]  [!EnableMeasure MeasureFeed4]
UpdateRate=#UpdateRate3#
Disabled=1
 etc..

As I said before, this will only slow things down a little each time you refresh the skin. You could use counters to slow things down even more, but I can't see why you'd really want to do that.
rainusero wrote: 2. Short speaking... Taking the bullet-marking out of the script and putting it in meters was probably a good idea (MinItems=10 "issue" is solved now) but...
Behavior of "bullet-mark" should be the same as it was on yesterdays version (colors, spacing, etc.), shouldn't be ? It was clean and nice. Could you correct this ?
If you want to change the layout and colours to suit your tastes, take a look at the stlye [sNew] where you can change the colour and position of the bullet mark and [sFeedText] where you can play around with the colour and position of the item text.

Have fun :)
rainusero
Posts: 21
Joined: May 9th, 2012, 10:11 am

Re: FeedReader w/ sorting

rainusero » October 4th, 2012, 2:02 pm

[sNew]
There can be only one color at a time. How can I modify that to two colors like it was before ?
User avatar
Mordasius
Posts: 1059
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: FeedReader w/ sorting

Mordasius » October 4th, 2012, 2:18 pm

You could do that by adding [sColorSet1] or [sColorSet2] to the [Item?New] meters.

e.g.

MeterStyle=sNew | sNew#Item?New# | sColorSet1 - to odd numbers

and

MeterStyle=sNew | sNew#Item?New# | sColorSet2 - to even numbers
rainusero
Posts: 21
Joined: May 9th, 2012, 10:11 am

Re: FeedReader w/ sorting

rainusero » October 4th, 2012, 3:29 pm

We're almost at our destination point :)

Once we have a new message, there is a bullet-mark showing up and everything is ok.

When feed item is no longer considered as a new one, bullet-mark disappears.

Then the text of the feed item should go back to the left to "equalize" the line and don't leave an empty space on the left side, shouldn't it (like it was on yesterday's version) ?

What is the possibility to achieve such an effect ?
User avatar
Mordasius
Posts: 1059
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: FeedReader w/ sorting

Mordasius » October 4th, 2012, 3:35 pm

rainusero wrote:We're almost at our destination point :)

Once we have a new message, there is a bullet-mark showing up and everything is ok.

When feed item is no longer considered as a new one, bullet-mark disappears.

Then the text of the feed item should go back to the left to "equalize" the line and don't leave an empty space on the left side, shouldn't it (like it was on yesterday's version) ?

What is the possibility to achieve such an effect ?
How the Rainmeter skin appears on your screen is entirely up to you! We've told you about RainMeter 101. Now play around with the X= and Y= values to see what happens..
rainusero
Posts: 21
Joined: May 9th, 2012, 10:11 am

Re: FeedReader w/ sorting

rainusero » October 4th, 2012, 3:52 pm

In order to get the functionality I mentioned above, edition of LUA script isn't required, right ?

I'm not convinced that playing around with the X= and Y= random values and seeing what happens is good idea.

Your help and support would be much appreciated :)