v2
v2 copied to clipboard
Parse <category> from Feeds (RSS, Aton and JSON)
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)
@fguillot Anything needed before this feature can be accepted? I am re-basing to keep this pull-request updated.
I would love to see this feature in Miniflux :)
I am rebasing with hope that @fguillot gets to it soon. Don't want to implement next stages until this goes in first.
Discovered an old feature request that this pull request would be a part of #951
This feature is now called Tags
, completed all changes requested by @fguillot
- 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
orcategories
. I couldn't find a sampleJSON
file. (or RSS and Atom). Where do I add the test case to verify the new query string parameter? - Let it be case sensitive. Tags should be explicitly mentioned.
- 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?
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
Added the test cases for RSS, Atom and JSON parsers. Update tags when an article's tags gets updated
How and were can I filter by the feed category?
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
#951