2018-06-21 03:42:37 +02:00
|
|
|
Mirror an IRC channel in Zulip!
|
|
|
|
|
2019-02-13 23:10:50 +01:00
|
|
|
### Install the bridge software
|
2018-05-26 23:47:38 +02:00
|
|
|
|
2019-02-13 23:10:50 +01:00
|
|
|
1. Clone the Zulip API repository, and install its dependencies.
|
2018-05-29 20:20:08 +02:00
|
|
|
|
2019-02-13 23:10:50 +01:00
|
|
|
```
|
|
|
|
git clone https://github.com/zulip/python-zulip-api.git
|
|
|
|
cd python-zulip-api
|
|
|
|
python3 ./tools/provision
|
|
|
|
```
|
|
|
|
|
|
|
|
This will create a new Python virtualenv. You'll run the bridge service
|
|
|
|
inside this virtualenv.
|
|
|
|
|
|
|
|
1. Activate the virtualenv by running the `source` command printed
|
|
|
|
at the end of the output of the previous step.
|
|
|
|
|
2020-07-10 10:46:35 +02:00
|
|
|
1. Go to the directory containing the bridge script if you haven't already done so
|
|
|
|
|
2019-02-13 23:10:50 +01:00
|
|
|
```
|
2023-02-28 16:24:17 +01:00
|
|
|
cd zulip/integrations/bridge_with_irc
|
2019-02-13 23:10:50 +01:00
|
|
|
```
|
|
|
|
|
2023-02-28 16:24:17 +01:00
|
|
|
1. Install the bridge dependencies in your virtualenv, by running:
|
|
|
|
|
|
|
|
```
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
2019-02-13 23:10:50 +01:00
|
|
|
### Configure the bridge
|
|
|
|
|
2022-09-09 02:23:45 +02:00
|
|
|
1. {!create-a-generic-bot.md!}
|
|
|
|
Download the bot's `zuliprc` configuration file to your computer.
|
2019-02-13 23:10:50 +01:00
|
|
|
|
2024-05-01 19:14:48 +02:00
|
|
|
1. [Subscribe the bot](/help/add-or-remove-users-from-a-channel) to the Zulip
|
2019-02-13 23:10:50 +01:00
|
|
|
stream that will contain the mirror.
|
|
|
|
|
2023-02-28 16:24:17 +01:00
|
|
|
1. Inside the virtualenv you created above, run:
|
|
|
|
|
|
|
|
```
|
|
|
|
python irc-mirror.py --irc-server=IRC_SERVER --channel=<CHANNEL> --nick-prefix=<NICK> \
|
|
|
|
--stream=<STREAM> [--topic=<TOPIC>] \
|
|
|
|
--site=<zulip.site> --user=<bot-email> \
|
|
|
|
--api-key=<api-key>
|
|
|
|
```
|
2019-02-13 23:10:50 +01:00
|
|
|
|
|
|
|
`--topic` is a Zulip topic, is optionally specified, defaults to "IRC".
|
|
|
|
|
|
|
|
Example command:
|
2023-02-28 16:24:17 +01:00
|
|
|
|
2019-02-13 23:10:50 +01:00
|
|
|
```
|
|
|
|
./irc-mirror.py --irc-server=irc.freenode.net --channel='#python-mypy' --nick-prefix=irc_mirror \
|
|
|
|
--stream='test here' --topic='#mypy' \
|
|
|
|
--site="https://chat.zulip.org" --user=bot@email.com \
|
|
|
|
--api-key=DeaDbEEf
|
|
|
|
```
|
2018-05-26 23:47:38 +02:00
|
|
|
|
2018-06-21 03:42:37 +02:00
|
|
|
**Congratulations! You're done!**
|
|
|
|
|
|
|
|
Your Zulip messages may look like:
|
2018-05-26 23:47:38 +02:00
|
|
|
|
2020-08-05 11:50:17 +02:00
|
|
|
![IRC message on Zulip](/static/images/integrations/irc/001.png)
|
2018-05-26 23:47:38 +02:00
|
|
|
|
2018-06-21 03:42:37 +02:00
|
|
|
Your IRC messages may look like:
|
2018-05-26 23:47:38 +02:00
|
|
|
|
2020-08-05 11:50:17 +02:00
|
|
|
![Zulip message on IRC](/static/images/integrations/irc/002.png)
|