-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
[FR]: Automatic control on maximal amount of feed articles #1270
Comments
Implementing... |
That's cool! |
So. It is now implemented. It can be tweaked app-wide in settings, or in feed settings. It can be also tweaked in a batched manner when multiple feeds are selected. Automatic cleanups now run AFTER feed is fetched. So, if you for example set that you only want to keep 15 articles, then all excessive OLDER articles are removed or moved to recycle bin, depending on settings. Excessive articles are ALSO purged from recycle bin (this behavior might be tweaked based on user feedback). For example if you have set (keep 15 articles, dont remove unread or starred), and there is 100 unread articles in your feed, none of articles will be deleted (because they are unread). If you then mark them read and re-fetch feed, all articles meeting criteria except for 15 newest articles are deleted. There might be some "potentialy" weird behaviors when you set for example to keep only 10 article while your live RSS feed contains 80 articles etc. Naturally, the feature is meant to be used with higher numbers of articles than is available in your live feed file, like 300 articles etc. Relevant dev. build is now building, PLEASE test when done. This feature is relatively complex and might have some undesired side effects which we need to iron out before release. |
Thanks! I will do the testing, it will take some time... |
I will close it, so that I know its "Done" but please, post your findings here. |
Found some bug: if we set the option for the specific feed, and after that disable it again, it does not revert to global setting. For example: we have global setting "Keep only 10 articles", than for some feed set it to "Keep only 20 articles". After it works some time we disable "Customize article limits" so it should revert to global settings (10 articles limit). But it keeps using 20 articles limit, not cut it to 10. |
will test |
I am not 100% sure but maybe also after you decrease the limit for specific feed (like was 30, now you set it to 20) it also keeps the old setting (30 articles limit). |
607439e Found the problem and fixed, pls re-test. |
Thanks, seems works OK now. |
Yes, there are some related bugs I found (like notification dialog informs about new articles, which were actually already deleted by the cleaning mechanism. So, I will have to think about this deeper. |
If I go to a folder with subfolders, choose "Edit child feeds (recursive)" and try to set options in the "Limiting amount of article in feeds" (you missed an "s" there by the way), I get this cryptic error: "Cannot save changes: Parameter count mismatch". There are also two mysterious checkboxes with no text whose function I don't understand. |
@slalaurette Make sure to have latest devbuild downloaded and also note that INDIVIDUAL devbuilds are NOT interchangeable as database structure differs. So test with clean user data folder please. Let me know if that helped. As for those mysterisou checkboxes, they only appear when you multi-edit more feeds and their purpose is that they turn applying of changes on or off. In other words, if you want to change some attribute, simply check that box, then change the attribute. |
OK! Will test with a clean folder. Those checkboxes need some description, I think. ツ Once more, thanks for your awesome work! |
Those checkboxes have tooltips. :) Anyway, pls-test and report back, i will need to iron out many things |
In an installation with just the default feeds, it seems to work fine. Will keep testing! |
Sure, test everything you suspect being related. I tested extensively but it might be that my test-cases are too shallow and someone else may find something. |
BTW when trying to come up with a way to generate a clean profile, I found that I can only uninstall "RSS Guard" from my computer, but not the development version. I had to install the dev build in a new folder so now I have three versions of the program, the main release and two dev builds. I don't know how to install the dev builds without affecting the main program. An option for a standalone install would help greatly for testing. |
Well, I did not test installers for years now. It is very simple, simply unpack devbuild "zip" into separate folder. Thats all. |
Ah, got it! I was mindlessly downloading the .exe version. Thanks! |
I updated to latest devbuild and activated 500 articles global limit for my feeds. So far it works nice. Just a side note. Even if articles are removed from DB due to this feature, then database .db file size does not decrease automatically. This is because even when some DB data are removed SQLite does not "shrink" file automatically. To shrink file use DB cleanup feature and set it up like this, then clean. |
It seems the app ignores messages marked "important" when counting before cleaning if they are not the oldest in the feed (yes, sounds vague). |
Forgot to mention (it can be important): I have a filter for this feed to ignore new messages with the same URL: function filterMessage() { And this feed actually often have articles which published date/time is changed as time passes but the article itself (including URL) is the same. |
There is unexpected behavior with CSS2RSS feeds when limiting them to for example 2 articles: RSS Guard cycles through articles in a pool that encompasses articles beyond the set limit to keep at every fetch. Steps to reproduce:
What happens in 5) is the unexpected behavior part. When re-fetching after the first time, the articles should not change in the CSS2RSS bandcamp feed and remain "Cloudward" & "Amaryllis". (The 2 latest items of a CSS2RSS will always be fetched as timestamps of articles from these feeds are always based on when the feed is fetched.) This unexpected behavior happens for every feed made with CSS2RSS (in my experience). |
Will test. |
Will test. |
OK, tested. Will try to explain. In feature settings, there is setting called "Keep X newest articles". Exactly that is meant. So if you set it to 20, then you will be sure that 20 newest articles will be there. Plus if you select "do not remove read/unread" then what is meant is that "There will be 20 newest article AND each article which is not read or is starred will also be there. Feature works like this:
Now apply the logic to your situation: Now, feed is fetched (and cleaning logic runs):
Below are 3 pictures -> initial state with 20 articles -> settings turned on -> after re-fetching (cleaning) |
Just to append info: Yes, in fact the "do not delete starred/unread" setting only affects articles which are "older" than limited count. So if you have set 20 articles to keep, it is possible that some read articles will be kept and only those older than "20" limit will be deleted (if you have that setting to delete read enabled). |
Why I did this approach was my mindset that: "Well, I want to see X number of my newest articles no matter what state they are, just keep those, but make sure to delete older stuff to avoid having huge DB file." |
No. Let me explain in detail what happens:
This behavior is result of several things:
|
Thanks for the explanation, it is quite clear. |
@Ac314 I believe we (or just you) are overthinking it. This is exactly the feature which would have to have like 10 sub-features to suit everyone's use-cases. And also, the approach I chose is exactly chosen because it is "softer". It does keep specified amount of articles (no matter what) and deletes only the excess. Your worry about deleting some articles "too early" will be very likely solved by setting higher number of kept articles and that is kind of expected way of using the feature. If your feed accumulates thousands of articles, it is perhaps wise to set your number of kept ones to like 100 or 200. Also, if DB size is not a problem, just check "recycle instead of purging" checkbox and your articles will be moved to recycle bin. You can then purge recycle bin via "database cleanup" dialog from time to time. That way you have all your "recycle" articles still in recycle bin. |
I have no objections. Current logic is carrying out its task. |
Thanks for taking the time to test & explain this. Indeed it's a specific use-case: limiting the article amount of CSS2RSS-based feeds without any date elements for the new Date selector to grab from when fetching the feed after feed creation/database clearing & optimization. |
Brief description of the feature request
[This is kind of revamp of my old FR added years ago]
The option "Keep only N recent articles in feeds" (global and per feed) will allow the user to control what amount of old articles he wants to keep. If it is enabled the database will not bloat because of old unneeded articles (they will be deleted automatically).
Important part here is to have some "modifiers" for this options to allow user to decide what to keep and what to delete:
For example, if I set amount of articles to keep, but did not have time to read last articles I can enable "Ignore unread messages when count/delete" and unread messages will no be deleted. So I can be sure they will not disappear before I read them.
The same with "Ignore important messages when count/delete" - if I want to keep some old messages and to be sure they will not disappear I will mark them "important" and enable this option. In this case they will be kept in the database and not deleted.
The automatic cleaning itself can be done by various means, for example:
The text was updated successfully, but these errors were encountered: