Skip to content
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

Support for the google reader protocol #71

Open
andreyorst opened this issue Nov 17, 2024 · 4 comments
Open

Support for the google reader protocol #71

andreyorst opened this issue Nov 17, 2024 · 4 comments
Labels

Comments

@andreyorst
Copy link

I'd like to propose an additional protocol.

I use FreshRSS, and while it works via Fever in elfeed-protocol, inability to sync the read state is bugging me quite a bit, because I usually read from my phone, so when I finally open my feeds in elfeed, I have a ton of old unread articles, that were actually read.

FreshRSS has a page about GoogleReader API:

https://freshrss.github.io/FreshRSS/en/developers/06_GoogleReader_API.html

As far as I can tell, GReader works better than Fever.

@fasheng
Copy link
Owner

fasheng commented Nov 18, 2024

You need a two-way synchronization protocol like ownCloud News although few people use it.

For Google Reader API, it's really special. It doesn't even have public documentation, everyone has different compatibility with it. After some verification work, looks that the two-way sync feature that you care about is not provided by Google Reader API, instead the clients did some workaround for it.

So this issue will be mark as "feature" and will continue to see if there is a need to implement it. However at least I will provide some builtin workaround code to sync unread stat like other clients did in the future.

Here is a simple code for fever:

(defun elfeed-protocol-fever-sync-unread-stat (host-url)
  "Set all entries in search view to read and fetch latest unread entries.
HOST-URL is the host name of Fever server with user field authentication info,
for example \"https://[email protected]\"."
  (mark-whole-buffer)
  (cl-loop for entry in (elfeed-search-selected)
           do (elfeed-untag-1 entry 'unread))
  (elfeed-protocol-fever--do-update host-url 'update-unread))

Reference:
https://ash7.io/blog/hello-read-you-welcome-to-google-reader-api-en-us/
miniflux/v2#2129
https://github.com/FreshRSS/FreshRSS/blob/edge/p/api/greader.php
https://github.com/miniflux/v2/blob/main/internal/googlereader/handler.go

@andreyorst
Copy link
Author

A few more notes on Google Reader API: https://feedhq.readthedocs.io/en/latest/api/index.html

@andreyorst
Copy link
Author

(defun elfeed-protocol-fever-sync-unread-stat (host-url)
  "Set all entries in search view to read and fetch latest unread entries.
HOST-URL is the host name of Fever server with user field authentication info,
for example \"https://[email protected]\"."
  (interactive
   (list (completing-read
          "feed: "
          (mapcar (lambda (fd)
                    (string-trim-left (car fd) "[^+]*\\+"))
                  elfeed-protocol-feeds))))
  (save-mark-and-excursion
    (mark-whole-buffer)
    (cl-loop for entry in (elfeed-search-selected)
             do (elfeed-untag-1 entry 'unread))
    (elfeed-protocol-fever--do-update host-url 'update-unread)))

Made an interactive prompt for choosing a specific feed from protocol-feeds

@andreyorst
Copy link
Author

You need a two-way synchronization protocol like ownCloud News although few people use it.

After some verification work, looks that the two-way sync feature that you care about is not provided by Google Reader API, instead the clients did some workaround for it.

Yeah, the client of my choice has this feature, so I assumed it was part of GReader protocol.

For Google Reader API, it's really special. It doesn't even have public documentation, everyone has different compatibility with it

I thought the API was thorley reverse-engineered, and well documented though unofficially. AFAICS it's one of the most widespread protocols, provided by a lot of services and used in a lot of clients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants