Skip to content

Commit 48a8456

Browse files
committed
integration-docs: Update the RSS integration doc.
1 parent 3a2c96e commit 48a8456

File tree

1 file changed

+66
-9
lines changed

1 file changed

+66
-9
lines changed

zulip/integrations/rss/doc.md

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,83 @@
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!
34

45
!!! tip ""
56

6-
Note that [the Zapier integration][1] is usually a simpler way to
7+
[The Zapier integration][1] is usually a simpler way to
78
integrate RSS with Zulip.
89

910
[1]: ./zapier
1011

11-
1. {!create-channel.md!}
12+
{start_tabs}
1213

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

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+
1520
1. {!download-python-bindings.md!}
1621

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:
1953
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}
2357
2458
{!congrats.md!}
2559
2660
![RSS bot message](/static/images/integrations/rss/001.png)
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

Comments
 (0)