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

rss-bot: Custom topic configuration #785

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Conversation

danteu
Copy link
Contributor

@danteu danteu commented Jun 7, 2023

rss-bot selects the topic of its RSS notification messages based on the topic of the RSS feed. Monitoring a large number of RSS feeds therefore leads to a large number of topics in the stream. Also, the user has no option to customize the topic names.

This patch adds a new --subject argument that replaces the topic for all RSS feed notifications with the provided string. If no custom topic is provided, the bot uses the default behaviour described above.

@timabbott
Copy link
Sponsor Member

Let's change it to --topic; otherwise lgtm.

(subject is a legacy API internals name that we don't want to expose to users as we're trying to get rid of it).

@danteu
Copy link
Contributor Author

danteu commented Jun 9, 2023

Let's change it to --topic; otherwise lgtm.

(subject is a legacy API internals name that we don't want to expose to users as we're trying to get rid of it).

Done. Also shortened the assignment in line 193.

rss-bot selects the topic of its RSS notification messages based on the
topic of the RSS feed. Monitoring a large number of RSS feeds therefore
leads to a large number of topics in the stream. Also, the user has no
option to customize the topic names.

This patch adds a new `--topic` argument that replaces the topic for
all RSS feed notifications with the provided string. If no custom topic
is provided, the bot uses the default behaviour described above.
@timabbott
Copy link
Sponsor Member

I pushed back here after adjusting the --help text to update the defaults. I also wonder whether zulip/integrations/rss/requirements.txt is supposed to have feedparser in it -- I needed to install that module to run this with --help.

@danteu
Copy link
Contributor Author

danteu commented Jun 12, 2023

I also wonder whether zulip/integrations/rss/requirements.txt is supposed to have feedparser in it -- I needed to install that module to run this with --help.

Yes, I had to manually install feedparser as well. Should I add that in a commit or open a seperate PR? Other integrations such as google-calendar also seem to have incomplete requirement files.

@timabbott timabbott merged commit ae142a3 into zulip:main Jun 12, 2023
13 checks passed
@timabbott
Copy link
Sponsor Member

Merged. A separate PR would be great, thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants