nextcloud / news-updater

:newspaper: Fast, parallel feed updater for the News app; written in Python
GNU General Public License v3.0
107 stars 23 forks source link

news:updater:all-feeds will be deprecated with news 15.0.0 #21

Open Grotax opened 3 years ago

Grotax commented 3 years ago

https://github.com/nextcloud/news/blob/master/lib/Command/Updater/AllFeeds.php#L41

The new command, that is replacing the old one is news:feed:list, behavior is a bit different as the view is per user and not a total overview.

Related PR https://github.com/nextcloud/news/pull/750

john-2000 commented 3 years ago

Hi apologies but what does this mean for my configuration ? do I need to change anything

Grotax commented 3 years ago

It means that the code requires changes, I started it but found it a bit difficult to implement and lost my motivation.

The command that is used right now will be deprecated.

So the functionality has to be build in a different way, there is a nextcloud command to get all users then you would need to iterate over all users and get thier feeds and create a return value as it was before

john-2000 commented 3 years ago

Hmm, not sure I can help. My feed updates completely failed with the news updater but I have been able to update them with

sudo -u www-data php -f occ news:updater:update-feed "john" 43

one by one, is there a better setup I can choose - apologies I have always used the news updater and thank you for all your sterling effort on this project

Grotax commented 3 years ago

That's probably an issue of news itself at the moment, I think it might be fixed in the next release.

Grotax commented 3 years ago

Else you can fall back to using the system Cron in future.

brot commented 3 years ago

Yes, the python news-updater needs an update, because the news app changed the API https://github.com/nextcloud/news/commit/d00d1ab2a28f428223e52b17052c072c64784016

They switched the parameter order in the "news:updater:update-feed" command. Now it's user-id + feed-id instead of feed-id+user-id

Grotax commented 3 years ago

Oh I didn't see that, this would be an easy fix the other one is more complicated

brot commented 3 years ago

Is the news-updater still maintained? The last release was 2018.

The reason I ask is if I should just patch my version or if I it's possible to provide pull-requests to improve the code base. But therefore the project should be maintained, because someone needs to approve pull-requests and release new version to pypi

DriverXX commented 3 years ago

I fixed this issue in my custom version of the news-updater. It can be found here: https://github.com/DriverXX/nextcloud-news-updater/

At the moment you need to set apilevel = v15 to make the news-updater work with the newer version of the News app.

If I understood correctly, previously, the API of the news app were versioned and the news-updater, supported API v1-2 or v2.

Thus, I wanted to ask @Grotax if this newer version of the API is the v3, or if they no longer version the API and we assume that the version of the API matches the version of the news APP.

BernhardPosselt commented 3 years ago

Just provide a PR, then I'll publish a new version.

Grotax commented 3 years ago

@DriverXX We haven't decided on that but for me it makes sense to base the api level on the major version of news

bcutter commented 3 years ago

OK guys today - 8 days after updating NC to v20 including several apps, including NC News - I realized there are no feed updates. Which way is the best one to fix this?

I totally rely on the news-updater and now NC news is literally newsless aaahm useless :-( :-( :-(

When running on CLI I only get plenty (for every single feed) of those:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/nextcloud_news_updater/api/updater.py", line 34, in run
    self.update_feed(feed)
  File "/usr/local/lib/python3.7/dist-packages/nextcloud_news_updater/api/cli.py", line 80, in update_feed
    self.cli.run(command)
  File "/usr/local/lib/python3.7/dist-packages/nextcloud_news_updater/api/cli.py", line 12, in run
    return check_output(commands)
  File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['php', '-f', '/var/www/nextcloud/occ', 'news:updater:update-feed', '344', 'Username']' returned non-zero exit status 1.
bcutter commented 3 years ago

Here´s the GitHub hero who solved it. Works great.

https://github.com/nextcloud/news-updater/issues/22#issuecomment-734843857

It really is a problem this project is not actively maintained anymore - or maybe no one uses it, otherwise there would be more users wondering why their feeds are not updated. Anyway, good for the moment.