Skip to content

Commit 6c4f756

Browse files
committed
integration-docs: Update the doc of the IRC bridge integration.
1 parent 3a2c96e commit 6c4f756

File tree

1 file changed

+52
-42
lines changed
  • zulip/integrations/bridge_with_irc

1 file changed

+52
-42
lines changed
Lines changed: 52 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,77 @@
1+
# Zulip IRC Integration
2+
13
Mirror an IRC channel in Zulip!
24

3-
### Install the bridge software
5+
{start_tabs}
46

5-
1. Clone the Zulip API repository, and install its dependencies.
7+
1. {!download-python-bindings.md!}
68

7-
```
8-
git clone https://github.com/zulip/python-zulip-api.git
9-
cd python-zulip-api
10-
python3 ./tools/provision
11-
```
9+
1. {!install-requirements.md!}
10+
11+
1. Register a nick that ends with the suffix "_zulip" on your IRC server.
12+
13+
1. {!create-a-generic-bot.md!}
1214

13-
This will create a new Python virtualenv. You'll run the bridge service
14-
inside this virtualenv.
15+
Download the `zuliprc` configuration file of your bot by clicking the
16+
download (<i class="fa fa-download"></i>) icon under the bot's name, and
17+
save to `~/.zuliprc`.
1518

16-
1. Activate the virtualenv by running the `source` command printed
17-
at the end of the output of the previous step.
19+
1. [Subscribe the bot][subscribe-channels] to the Zulip channel that will
20+
contain the mirror.
1821

19-
1. Go to the directory containing the bridge script if you haven't already done so
22+
1. Mirror the IRC channel to the Zulip channel by running the
23+
`irc-mirror.py` script with the
24+
[required command-line arguments](#required-arguments). Use the
25+
[optional arguments](#optional-arguments) to configure the mirroring
26+
behavior.
27+
28+
1. Here's an example command that mirrors the `#python-mypy` channel on the
29+
`irc.freenode.net` server to the `mypy` topic on the `irc-discussions`
30+
channel on Zulip:
2031

2132
```
22-
cd zulip/integrations/bridge_with_irc
33+
python {{ integration_path }}/irc-mirror.py \
34+
--irc-server=irc.freenode.net --channel='#python-mypy' --nick-prefix=irc_mirror \
35+
--stream='irc-discussions' --topic='mypy'
2336
```
2437
25-
1. Install the bridge dependencies in your virtualenv, by running:
38+
{end_tabs}
39+
40+
You're done!
41+
42+
Your Zulip messages may look like:
43+
44+
![IRC message on Zulip](/static/images/integrations/irc/001.png)
2645
27-
```
28-
pip install -r requirements.txt
29-
```
46+
Your IRC messages may look like:
3047
31-
### Configure the bridge
48+
![Zulip message on IRC](/static/images/integrations/irc/002.png)
3249
33-
1. {!create-a-generic-bot.md!}
34-
Download the bot's `zuliprc` configuration file to your computer.
50+
[subscribe-channels]: /help/manage-user-channel-subscriptions#subscribe-a-user-to-a-channel
3551
36-
1. [Subscribe the bot](/help/subscribe-users-to-a-channel) to the Zulip
37-
stream that will contain the mirror.
52+
### Configuration options
3853
39-
1. Inside the virtualenv you created above, run:
54+
The integration script accepts the following command-line arguments:
4055
41-
```
42-
python irc-mirror.py --irc-server=IRC_SERVER --channel=<CHANNEL> --nick-prefix=<NICK> \
43-
--stream=<STREAM> [--topic=<TOPIC>] \
44-
--site=<zulip.site> --user=<bot-email> \
45-
--api-key=<api-key>
46-
```
56+
#### Required arguments
4757
48-
`--topic` is a Zulip topic, is optionally specified, defaults to "IRC".
58+
- `--irc-server`: The IRC server to mirror.
4959
50-
Example command:
60+
- `--nick-prefix`: Your registered IRC nick must always end with "_zulip".
61+
Use the prefix of your IRC nick without the "_zulip" suffix.
5162
52-
```
53-
./irc-mirror.py --irc-server=irc.freenode.net --channel='#python-mypy' --nick-prefix=irc_mirror \
54-
--stream='test here' --topic='#mypy' \
55-
--site="https://chat.zulip.org" --user=[email protected] \
56-
--api-key=DeaDbEEf
57-
```
63+
- `--channel`: The IRC channel to mirror.
5864
59-
**Congratulations! You're done!**
65+
- `--stream`: The name of the Zulip channel you want to receive
66+
notifications in. By default, messages are sent to the `general` channel.
6067
61-
Your Zulip messages may look like:
68+
#### Optional arguments
6269
63-
![IRC message on Zulip](/static/images/integrations/irc/001.png)
70+
- `--topic`: The name of the Zulip topic you want to receive notifications
71+
in. By default, messages are sent to the "IRC" topic.
6472
65-
Your IRC messages may look like:
73+
- `--port`: The port to connect to the IRC server on. Defaults to 6667.
6674
67-
![Zulip message on IRC](/static/images/integrations/irc/002.png)
75+
- `--nickserv-pw`: Password corresponding to the IRC nick.
76+
77+
- `--sasl-password`: Password for SASL authentication.

0 commit comments

Comments
 (0)