|
1 |
| -Get service alerts, news, and new blog posts right in Zulip with our |
2 |
| -RSS integration! |
| 1 | +# Zulip RSS Integration |
| 2 | + |
| 3 | +Get service alerts, news, and new blog posts right 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 an RSS feed file containing 1 feed 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. You can run the bot to send summaries of RSS entries from your favorite |
| 30 | + feeds, with the command: |
| 31 | + |
| 32 | + `{{ integration_path }}/rss-bot` |
| 33 | + |
| 34 | +1. Optionally, pass command-line arguments to re-configure the integration. |
| 35 | + |
| 36 | + ``` |
| 37 | + {{ integration_path }}/rss-bot \ |
| 38 | + --feed-file="home/user/zulip-rss/rss-feeds" \ |
| 39 | + --data-dir="home/user/zulip-rss" \ |
| 40 | + --stream="news" \ |
| 41 | + --topic="rss" \ |
| 42 | + --unwrap --math |
| 43 | + ``` |
| 44 | +
|
| 45 | + See [the configuration options](#configuration-options) for the list of |
| 46 | + options. |
| 47 | +
|
| 48 | +1. Configure a crontab entry to keep the integration running. |
| 49 | +
|
| 50 | + This sample crontab entry processes feeds stored in the default |
| 51 | + location and posts to the "rss" topic in the "news" stream every 5 |
| 52 | + minutes: |
19 | 53 |
|
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. |
| 54 | + `*/5 * * * * {{ integration_path }}/rss-bot --stream="news" --topic="rss"` |
| 55 | +
|
| 56 | +{end_tabs} |
23 | 57 |
|
24 | 58 | {!congrats.md!}
|
25 | 59 |
|
26 | 60 | 
|
| 61 | +
|
| 62 | +### Configuration options |
| 63 | +
|
| 64 | +The integration script accepts the following command-line arguments. |
| 65 | +
|
| 66 | +- `--feed-file`: The path to the file containing the RSS feed URLs. The |
| 67 | + default location is `~/.cache/zulip-rss/rss-feeds`. |
| 68 | +
|
| 69 | +- `--data-dir`: The directory where feed metadata is stored. The default |
| 70 | + location is `~/.cache/zulip-rss`. |
| 71 | +
|
| 72 | +- `--stream`: The name of the Zulip channel you want to receive |
| 73 | + notifications in. By default, messages are sent to the `rss` channel. |
| 74 | +
|
| 75 | +- `--topic`: The name of the topic to which the RSS entries will be posted. |
| 76 | + By default, each feed source in the feed file will post to its own topic |
| 77 | + named after the feed title. |
| 78 | +
|
| 79 | +- `--unwrap`: This option converts word-wrapped paragraphs in the RSS |
| 80 | + entries' bodies into single lines. |
| 81 | +
|
| 82 | +- `--math`: This option converts `$` in the RSS entries' bodies to `$$`, for |
| 83 | + KaTeX processing. |
0 commit comments