-
Notifications
You must be signed in to change notification settings - Fork 733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat filter entries by title or content #372
feat filter entries by title or content #372
Conversation
The build doesn't pass on Travis CI. Some linter errors... The CI doesn't show up on GitHub (I need to fix that). |
@@ -131,6 +130,22 @@ func (h *Handler) RefreshFeed(userID, feedID int64) error { | |||
logger.Debug("[Handler:RefreshFeed] Feed #%d not modified", feedID) | |||
} | |||
|
|||
if originalFeed.TitleFilter != "" { | |||
if storeErr := h.store.FilterByTitle(originalFeed.UserID, originalFeed.ID, originalFeed.TitleFilter); storeErr != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to generate a lot of SQL queries. What about doing the filtering only when the feed is modified just above?
Perhaps, it could be part of the function UpdateEntries()
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea~
I have moved it into the UpdateEntries
function
Thinking about this... the approach used by Newsboat seems more flexible: https://newsboat.org/releases/2.15/docs/newsboat.html#_killfiles |
This is probably not what you had in mind as it's not integrated in Miniflux but after reading about these killfiles @fguillot linked I quickly threw together this sidekick that can parse these files and marks matched feed items as read for my personal usage. Maybe helpful for someone else if this doesn't make it in Miniflux. Worst case it was fun writing it :) My approach is a bit naive as it just checks Miniflux based on an interval and not when it does a new scrape. |
Closing due to PR #826 |
This pr add the feature of filter out entries using POSIX style regex. #226
It is implemented using regex support provided by PostgreSQL. Every time the feed refresh it will SET entries' status match by the filter into
removed