v2 icon indicating copy to clipboard operation
v2 copied to clipboard

Parse <category> from Feeds (RSS, Aton and JSON)

Open privatmamtora opened this issue 1 year ago • 3 comments

Do you follow the guidelines?

  • [x] I have tested my changes
  • [x] I read this document: https://miniflux.app/faq.html#pull-request

Recreated Pull Request due to Git issues with rebasing

Implemented everything required for parsing fields (Issue #1479) Implemented as an array Implemented Category filtering for Entries Parser for RSS, JSON and Atom Feeds updated

See #1480 for previous communication with @fguillot

Reason

I follow several feeds that publish a wide variety of content, and I am not interested in all of it. My Primary goal for this is to enhance the "filter rules" functionality to be able to filter by category. (Stage 2)

I realized I needed this, since in the last month miniflux has fetched 7000+ entries in the past month, and my previous RSS Reader (with category filters) only has 2500 entries for the last month. (Big difference.)

Additionally I am creating my own UI, for which I also had an idea to "View/Sort by Category" (Stage 3)

privatmamtora avatar Jul 18 '22 21:07 privatmamtora

@fguillot Anything needed before this feature can be accepted? I am re-basing to keep this pull-request updated.

privatmamtora avatar Aug 01 '22 05:08 privatmamtora

I would love to see this feature in Miniflux :)

rdelaage avatar Sep 05 '22 17:09 rdelaage

I am rebasing with hope that @fguillot gets to it soon. Don't want to implement next stages until this goes in first.

privatmamtora avatar Sep 08 '22 17:09 privatmamtora

Discovered an old feature request that this pull request would be a part of #951

privatmamtora avatar Sep 26 '22 03:09 privatmamtora

This feature is now called Tags, completed all changes requested by @fguillot

privatmamtora avatar Jan 16 '23 00:01 privatmamtora

  1. Not sure where to start with Test cases, but if we are trying to test for tags/categories, where do I upgrade the sample that is being tested, with tags or categories. I couldn't find a sample JSON file. (or RSS and Atom). Where do I add the test case to verify the new query string parameter?
  2. Let it be case sensitive. Tags should be explicitly mentioned.
  3. Why does a feed refresh matter? If it is a duplicate, wouldn't the post simply be skipped? Why do tags need to be updated?

privatmamtora avatar Feb 20 '23 17:02 privatmamtora

Not sure where to start with Test cases, but if we are trying to test for tags/categories, where do I upgrade the sample that is being tested, with tags or categories. I couldn't find a sample JSON file. (or RSS and Atom). Where do I add the test case to verify the new query string parameter?

You can find the unit tests in the reader/{atom,rdf,rss,json} folders. You should add a test case to make sure categories are correctly parsed according to the RFCs.

  • https://github.com/miniflux/v2/blob/ff8d68c151645de62d48fba62d2f591eab8f7383/reader/atom/atom_10_test.go
  • https://github.com/miniflux/v2/blob/ff8d68c151645de62d48fba62d2f591eab8f7383/reader/rss/parser_test.go
  • https://github.com/miniflux/v2/blob/ff8d68c151645de62d48fba62d2f591eab8f7383/reader/json/parser_test.go
  • https://github.com/miniflux/v2/blob/ff8d68c151645de62d48fba62d2f591eab8f7383/reader/rdf/parser_test.go

Why does a feed refresh matter? If it is a duplicate, wouldn't the post simply be skipped? Why do tags need to be updated?

Sometimes, some websites update the content of an article after it is published.

https://github.com/miniflux/v2/blob/ff8d68c151645de62d48fba62d2f591eab8f7383/storage/entry.go#L274-L276

fguillot avatar Feb 21 '23 03:02 fguillot

Added the test cases for RSS, Atom and JSON parsers. Update tags when an article's tags gets updated

privatmamtora avatar Feb 22 '23 04:02 privatmamtora

How and were can I filter by the feed category?

x0tester0x avatar May 23 '23 20:05 x0tester0x

Hello, I'm very new to the RSS world and not at all a developer. I would like to use a 'keep rule' to filter specific content of tags of this rss feed: https://www.consilium.europa.eu/en/register/rss/thmenv.xml/. I'm a bit confused whether this is now possible or whether it is still only possible to filter content of the tag of a rss feed. If this is possible, how should it be written in the keep rule? Thanks in advance for your help! Silaxe

silaxe avatar Jun 08 '23 15:06 silaxe

#951

x0tester0x avatar Dec 21 '23 09:12 x0tester0x