How to specify the amount of items to read of a feed?

Hi,

I’d like to be able to specify how many items of a feed should be processed by my ttrss instance. The feed contains posts ranked by upvotes, of which I’m only interested in the top ten. I’m not able to specify the amount in the url of the feed itself.

So my question is if such option exists and if not, if there is a way to still do it with the currently available options. For example, I tried to use a generated url of ttrss, and use the limit parameter to only display ten items. Unfortunately, the does not work as expected, as I’m receiving posts that are not actually in the top ten. This is probably due to the date supplied in the feed.

for example you can make a plugin to preprocess the XML before it is parsed by tt-rss.

Alright, wouldn’t working with the parsed feed make things easier? So far I have a hook to HOOK_FEED_PARSED, which will just slice the items in the feed. How can I make sure to only trigger the plugin for certain feeds? Thanks for your help!

Couldn’t you use filters to mark as read or delete the feed items you don’t want to see? Or am I missing something.

I’m not exactly sure if I get what you’re proposing.
The thing is, the feed is sorted by upvotes based on the time span of a month. That means, posts in this feed with a lower amount of upvotes will change more frequently while posts with higher amount won’t. My goal is to only read the top ten or something, without having to care about all the others.
So, I’m not a php programmer at all, but I’ll try to figure this out. However, help is welcome as I don’t know how to apply the plugin for my feeds selectively.

What is a sample title? If there is some form of consistent text in the title or body’s content you can create a filter to either delete the article or mark it as read. In your case, deleting might be best.

e: Content filters in the wiki.

I’ve done a similar thing for Hacker News: this plugin keeps only the first (top) 10 entries from the feed.

You could use it as a starting point.