|
1 |
| -Get service alerts, news, and new blog posts right in Zulip with our |
2 |
| -RSS integration! |
| 1 | +# Zulip RSS Integration |
| 2 | + |
| 3 | +Get updates from RSS feeds in Zulip! |
3 | 4 |
|
4 | 5 | !!! tip ""
|
5 | 6 |
|
6 |
| - Note that [the Zapier integration][1] is usually a simpler way to |
| 7 | + [The Zapier integration][1] is usually a simpler way to |
7 | 8 | integrate RSS with Zulip.
|
8 | 9 |
|
9 | 10 | [1]: ./zapier
|
10 | 11 |
|
11 |
| -1. {!create-channel.md!} |
| 12 | +{start_tabs} |
12 | 13 |
|
13 | 14 | 1. {!create-an-incoming-webhook.md!}
|
14 | 15 |
|
| 16 | + Download the `zuliprc` configuration file of your bot by clicking the |
| 17 | + download (<i class="fa fa-download"></i>) icon under the bot's name, and |
| 18 | + save to `~/.zuliprc`. |
| 19 | + |
15 | 20 | 1. {!download-python-bindings.md!}
|
16 | 21 |
|
17 |
| -1. The RSS integration will be installed to a location like |
18 |
| - `/usr/local/share/zulip/integrations/rss/rss-bot`. |
| 22 | +1. {!install-requirements.md!} |
| 23 | + |
| 24 | +1. Create a file containing RSS feed URLs, with one URL per line, at |
| 25 | + `~/.cache/zulip-rss/rss-feeds`. To use a different location, pass the |
| 26 | + `--feed-file` [option](#configuration-options) to the integration |
| 27 | + script. |
| 28 | + |
| 29 | +1. Run the bot to send summaries of RSS entries from your favorite feeds, |
| 30 | + with the command: |
| 31 | + |
| 32 | + `{{ integration_path }}/rss-bot` |
| 33 | + |
| 34 | +1. Optionally, pass command-line arguments to re-configure the integration. |
| 35 | + See [the configuration options](#configuration-options) below. |
| 36 | + |
| 37 | + ``` |
| 38 | + {{ integration_path }}/rss-bot \ |
| 39 | + --feed-file="home/user/zulip-rss/rss-feeds" \ |
| 40 | + --data-dir="home/user/zulip-rss" \ |
| 41 | + --stream="news" \ |
| 42 | + --topic="rss" \ |
| 43 | + --unwrap --math |
| 44 | + ``` |
| 45 | +
|
| 46 | +1. Configure a crontab entry to keep the integration running. |
| 47 | +
|
| 48 | + This sample crontab entry processes feeds stored in the default |
| 49 | + location and posts to the "rss" topic in the **#news** channel every 5 |
| 50 | + minutes: |
19 | 51 |
|
20 |
| -1. Follow the instructions in the `rss-bot` script for configuring the |
21 |
| - bot, adding your subscriptions, and setting up a cron job to run |
22 |
| - the bot. |
| 52 | + `*/5 * * * * {{ integration_path }}/rss-bot --stream="news" --topic="rss"` |
| 53 | +
|
| 54 | +{end_tabs} |
23 | 55 |
|
24 | 56 | {!congrats.md!}
|
25 | 57 |
|
26 | 58 | 
|
| 59 | +
|
| 60 | +### Configuration options |
| 61 | +
|
| 62 | +The integration script accepts the following command-line arguments. |
| 63 | +
|
| 64 | +- `--feed-file`: The path to the file containing the RSS feed URLs. The |
| 65 | + default location is `~/.cache/zulip-rss/rss-feeds`. |
| 66 | +
|
| 67 | +- `--data-dir`: The directory where feed metadata is stored. The default |
| 68 | + location is `~/.cache/zulip-rss`. |
| 69 | +
|
| 70 | +- `--stream`: The name of the Zulip channel you want to receive |
| 71 | + notifications in. By default, messages are sent to the **#rss** channel. |
| 72 | +
|
| 73 | +- `--topic`: The name of the topic to which the RSS entries will be posted. |
| 74 | + By default, for each RSS feed URL specified, the feed's title is used for |
| 75 | + the topic name. |
| 76 | +
|
| 77 | +- `--unwrap`: This option converts word-wrapped paragraphs in the message |
| 78 | + content into single lines. |
| 79 | +
|
| 80 | +- `--math`: This option converts `$` in the message content to `$$`, for |
| 81 | + KaTeX processing. |
0 commit comments