Skip to content

integration-docs: Update the RSS integration doc. #872

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 66 additions & 9 deletions zulip/integrations/rss/doc.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,83 @@
Get service alerts, news, and new blog posts right in Zulip with our
RSS integration!
# Zulip RSS Integration

Get service alerts, news, and new blog posts right in Zulip!

!!! tip ""

Note that [the Zapier integration][1] is usually a simpler way to
[The Zapier integration][1] is usually a simpler way to
integrate RSS with Zulip.

[1]: ./zapier

1. {!create-channel.md!}
{start_tabs}

1. {!create-an-incoming-webhook.md!}

Download the `zuliprc` configuration file of your bot by clicking the
download (<i class="fa fa-download"></i>) icon under the bot's name, and
save to `~/.zuliprc`.

1. {!download-python-bindings.md!}

1. The RSS integration will be installed to a location like
`/usr/local/share/zulip/integrations/rss/rss-bot`.
1. {!install-requirements.md!}

1. Create an RSS feed file containing 1 feed URL per line at
`~/.cache/zulip-rss/rss-feeds`. To use a different location, pass the
`--feed-file` [option](#configuration-options) to the integration
script.

1. You can run the bot to send summaries of RSS entries from your favorite
feeds, with the command:

`{{ integration_path }}/rss-bot`

1. Optionally, pass command-line arguments to re-configure the integration.

```
{{ integration_path }}/rss-bot \
--feed-file="home/user/zulip-rss/rss-feeds" \
--data-dir="home/user/zulip-rss" \
--stream="news" \
--topic="rss" \
--unwrap --math
```

See [the configuration options](#configuration-options) for the list of
options.

1. Configure a crontab entry to keep the integration running.

This sample crontab entry processes feeds stored in the default
location and posts to the "rss" topic in the "news" stream every 5
minutes:

1. Follow the instructions in the `rss-bot` script for configuring the
bot, adding your subscriptions, and setting up a cron job to run
the bot.
`*/5 * * * * {{ integration_path }}/rss-bot --stream="news" --topic="rss"`

{end_tabs}

{!congrats.md!}

![RSS bot message](/static/images/integrations/rss/001.png)

### Configuration options

The integration script accepts the following command-line arguments.

- `--feed-file`: The path to the file containing the RSS feed URLs. The
default location is `~/.cache/zulip-rss/rss-feeds`.

- `--data-dir`: The directory where feed metadata is stored. The default
location is `~/.cache/zulip-rss`.

- `--stream`: The name of the Zulip channel you want to receive
notifications in. By default, messages are sent to the `rss` channel.

- `--topic`: The name of the topic to which the RSS entries will be posted.
By default, each feed source in the feed file will post to its own topic
named after the feed title.

- `--unwrap`: This option converts word-wrapped paragraphs in the RSS
entries' bodies into single lines.

- `--math`: This option converts `$` in the RSS entries' bodies to `$$`, for
KaTeX processing.
Loading