glanceapp / glance

A self-hosted dashboard that puts all your feeds in one place
GNU Affero General Public License v3.0
8.48k stars 295 forks source link

FreshRSS widget #126

Open trinidz opened 5 months ago

trinidz commented 5 months ago

Created a FreshRSS widget. If a glanceapp user is running their own FreshRSS instance, this widget will connect to FreshRSS via its api and get all of their rss feeds.

Example:

          - type: freshrss
            freshrss-url: http://freshrss.host.or.ip:port
            freshrss-user: username
            freshrss-api-pass: my-freshrss-api-password
svilenmarkov commented 4 months ago

Hey, thanks for contributing!

I haven't used FreshRSS so I'm not familiar with its features, however rather than fetching the list of feeds from FreshRSS and having Glance fetch their contents, wouldn't it make more sense if you were to fetch the items that FreshRSS has already retrieved? I'm guessing you'd be able to leverage some of its features that way such as not showing items that have already been read, ones that have been filtered, etc.

trinidz commented 4 months ago

The FreshRSS api I'm using is somewhat limited. I have to fetch all the unread item info, then fetch the feed info separately and merge the feed info (title/url) with the correct corresponding items. Also the FreshRSS api can only pull 50 unread items at a time, so if there are more I have to make the necessary multiple requests. I have it roughly working so I should have something soon.

trinidz commented 4 months ago

Update: I have code ready to commit for fetching unread items using the FreshRSS api. However, while writing this new code, I noticed the api does not provide a picture/image url with an item (unless I'm missing something). All of the other item info is there like categories, timestamp, content, links etc. So when using the api to fetch rss items, the images are always blank when Glance is configured for displaying images along with the rss items.

Let me know if you'd like this newer code anyway, or stay with the current. Or maybe use the api to fetch feeds that have unread items and then let Glance still fetch the items?