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

FreshRSS widget #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

FreshRSS widget #126

wants to merge 1 commit into from

Conversation

trinidz
Copy link

@trinidz trinidz commented Jun 4, 2024

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

CollapseAfter int `yaml:"collapse-after"`
FreshRSSUrl string `yaml:"freshrss-url"`
FreshRSSUser string `yaml:"freshrss-user"`
FreshRSSApiPass string `yaml:"freshrss-api-pass"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing from string to OptionalEnvString should allow it to use environment variables

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a similar request has been made in the past. If the maintainer wants to do it here as well I will change it.

@svilenmarkov
Copy link
Member

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
Copy link
Author

trinidz commented Jun 26, 2024

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
Copy link
Author

trinidz commented Jun 29, 2024

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?

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

Successfully merging this pull request may close these issues.

3 participants