Skip to content

Commit ca9c11a

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

File tree

1 file changed

+64
-9
lines changed

1 file changed

+64
-9
lines changed

zulip/integrations/rss/doc.md

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,81 @@
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!
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 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:
1951
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}
2355
2456
{!congrats.md!}
2557
2658
![RSS bot message](/static/images/integrations/rss/001.png)
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

Comments
 (0)