Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11a7cbb

Browse files
committed
integration-docs: Update the doc of the IRC bridge integration.
1 parent3a2c96e commit11a7cbb

File tree

1 file changed

+55
-43
lines changed
  • zulip/integrations/bridge_with_irc

1 file changed

+55
-43
lines changed
Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,79 @@
1-
Mirror an IRCchannel in Zulip!
1+
#Zulip IRCIntegration
22

3-
###Install the bridge software
3+
Mirror messages between an IRC channel and a Zulip channel in real-time!
44

5-
1. Clone the Zulip API repository, and install its dependencies.
5+
{start_tabs}
66

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

13-
This will create a new Python virtualenv. You'll run the bridge service
14-
inside this virtualenv.
13+
1. {!create-a-generic-bot.md!}
1514

16-
1. Activate the virtualenv by running the `source` command printed
17-
at the end of the output of the previous step.
15+
1. Download the`zuliprc` configuration file of your bot by clicking the
16+
download (<iclass="fa fa-download"></i>) icon under the bot's name, and
17+
save to`~/.zuliprc`.
1818

19-
1. Go to the directory containing the bridge script if you haven't already done so
19+
1.[Subscribe the bot][subscribe-channels] to the Zulip channel where IRC
20+
messages should be mirrored.
21+
22+
1. Begin mirroring messages between the IRC channel and the Zulip channel
23+
by running the`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+
Here's an example command that mirrors messages between the
29+
**#python-mypy** channel on the`irc.freenode.net` server and the "mypy"
30+
topic on the**#irc-discussions** 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+
1. Messages will be mirrored only when the terminal session with the bot
39+
remains open. Consider using `screen` to run the bot in the background.
40+
You can restart the integration at any time by re-running the
41+
`irc-mirror.py` script.
42+
43+
{end_tabs}
44+
45+
You're done! Messages in your Zulip channel may look like:
2646
27-
```
28-
pip install -r requirements.txt
29-
```
47+
![IRC message on Zulip](/static/images/integrations/irc/001.png)
3048
31-
### Configure the bridge
49+
Messages in your IRC channel may look like:
3250
33-
1. {!create-a-generic-bot.md!}
34-
Download the bot's `zuliprc` configuration file to your computer.
51+
![Zulip message on IRC](/static/images/integrations/irc/002.png)
3552
36-
1. [Subscribe the bot](/help/subscribe-users-to-a-channel) to the Zulip
37-
stream that will contain the mirror.
53+
[subscribe-channels]: /help/manage-user-channel-subscriptions#subscribe-a-user-to-a-channel
3854
39-
1. Inside the virtualenv you created above, run:
55+
### Configuration options
4056
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-
```
57+
The integration script accepts the following command-line arguments:
4758
48-
`--topic` is a Zulip topic, is optionally specified, defaults to "IRC".
59+
#### Required arguments
4960
50-
Example command:
61+
- `--irc-server`: The IRC server to mirror.
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=bot@email.com\
56-
--api-key=DeaDbEEf
57-
```
63+
- `--nick-prefix`: Your registered IRC nick without the `_zulip` suffix.
5864
59-
**Congratulations! You're done!**
65+
- `--channel`: The IRC channel to mirror.
6066
61-
Your Zulip messages may look like:
67+
- `--stream`: The name of the Zulip channel you want to mirror. The default
68+
channel name is **#general**.
6269
63-
![IRC message on Zulip](/static/images/integrations/irc/001.png)
70+
#### Optional arguments
6471
65-
Your IRC messages may look like:
72+
- `--topic`: The name of the Zulip topic you want to receive and send
73+
messages in. The default topic name is "IRC".
6674
67-
![Zulip message on IRC](/static/images/integrations/irc/002.png)
75+
- `--port`: The port to connect to the IRC server on. Defaults to 6667.
76+
77+
- `--nickserv-pw`: Password corresponding to the IRC nick.
78+
79+
- `--sasl-password`: Password for SASL authentication.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp