martinrotter / rssguard

Feed reader (and podcast player) which supports RSS/ATOM/JSON and many web-based feed services.
GNU General Public License v3.0
1.44k stars 120 forks source link

[FR]: Update feeds via command #1327

Open Spixmaster opened 3 months ago

Spixmaster commented 3 months ago

Brief description of the feature request

I would like to update my feeds with a command as I want to automate the updating with a script on a regular basis.

The reasoning behind this is that some feeds only show the last ten entries like WordPress and I do not want to miss feeds which unfortunately already happened to me. It is not possible to get these articles later once they are gone.

martinrotter commented 3 months ago

What you mean "with command" like console command? You must be much more specific, my friend.

Spixmaster commented 3 months ago

@martinrotter Yes, I mean a console command like rssguard fetch, an option would be fine too. It is your choice.

A command would be the most efficient way to do so. Right now, the whole GUI needs to be started and automation is not possible.

martinrotter commented 3 months ago

Well, RSS Guard is GUI application and CLI automation is not really there.

BUT, that said. Once RSS Guard is configured, then with a bit of work it could be done that it starts and runs in headless mode. I will investigate the possibility.

Spixmaster commented 3 months ago

A headless mode would not solve the issue from how I understand it. The GUI would still be running but not displayed. In that case the resource consumption would still be the same.

Invorking the GUI even in a headless mode would never finish hence automation would still not be possible.

Could not the function the fetches the new feeds that is invoked with the shortcut CTRL + SHIFT + u be called when that new command like rssguard fetch would be executed?

Maybe you can tell me the proper locations and I could give it a try myself. The best library for command line interfaces is https://github.com/CLIUtils/CLI11 in my opinion.

martinrotter commented 3 months ago

No, I plan/want to make headless mode fully working. No windows, no dialogs, no popups.

I had this in my head for some time, would work like this:

  1. You launch your RSS Guard normally with GUI and setup all your feeds and their updating intervals etc., then you quit RSS Guard.
  2. You launch now RSS Guard with "headless" process parameter switch and RSS Guard will run in non-GUI mode (it will not display main window, it will not show any popups etc.)

THis is not problem about parsing CLI arguments etc. that functionality is already in RSS Guard and working

Spixmaster commented 3 months ago

Would the pure CLI have the functionality to just fetch the new feeds?

Is it this function, https://github.com/martinrotter/rssguard/blob/310c3068bda2702f6d485835f2d28df4cb4550e4/src/librssguard/core/feeddownloader.cpp#L69? Would it be sufficient to call it with a command?

martinrotter commented 3 months ago

That depends, Either it will be the same executable file but will behave "headless" when proper switch is invoked and it will behave exactly the same as GUI version (so download feeds regularly per settings, etc.) but will not show any GUI at all.

OR

I can write brand new "CLI ONLY" executable file for this purpose only.

martinrotter commented 3 months ago

I would likely be "cleaner" to have separate "rssguard_cli.exe" for CLI-only application. It will use "librssguard.dll" library which contains all needed stuff and will call only needed functions.

Spixmaster commented 3 months ago

I do not know whether that would contain the feature to updated the feeds, does it?

Spixmaster commented 3 months ago

Do not you think that something like rssguard fetch or rssguard-cli fetch which updates all feeds would be useful?

martinrotter commented 3 months ago

I do not know whether that would contain the feature to updated the feeds, does it?

Of course it will contain the feature. If you have discord, please join rssguard discord channel and we can chat this.

https://discord.com/invite/7xbVMPPNqH

Spixmaster commented 3 months ago

That is great. Thanks!