integrations: Update Matrix and IRC docs.

This commit is contained in:
Rishi Gupta
2018-06-20 18:42:37 -07:00
parent d066c11b47
commit bccf2ca67b
4 changed files with 43 additions and 44 deletions

View File

@@ -2,42 +2,40 @@
1. {!create-stream.md!} 1. {!create-stream.md!}
1. On your {{ settings_html|safe }}, create a **Generic** bot for 1. [Create a bot](/help/add-a-bot-or-integration), using **Generic bot** for
{{ integration_display_name }}. Subscribe this bot to the stream the bot type. Subscribe this bot to the stream you just created.
created in step 1.
1. Open `zulip/integrations/matrix/matrix_bridge_config.py` with your 1. Open `zulip/integrations/matrix/matrix_bridge_config.py` in your cloned
favorite editor, and change the following lines in the `zulip` repository, and update the following section:
section:
``` ```
"zulip": { ('zulip', OrderedDict((
"email": "matrix-bot@chat.zulip.org", ('email', 'glitch-bot@chat.zulip.org'),
"api_key": "your_key", ('api_key', 'aPiKeY'),
"site": "https://chat.zulip.org", ('site', 'https://chat.zulip.org'),
"stream": "Stream which acts as the bridge", ('stream', 'test here'),
"topic": "Topic of the stream" ('topic', 'matrix'),
} ))),
``` ```
**email**, **api_key**, and **site** should come from your Replace the **email**, **api_key**, and **site** values with those from
{{ integration_display_name }} bot's `zuliprc` file. Set **stream** your bot's `zuliprc` file, and set **stream** to the name of the stream
to the name of the stream created in step 1, and set **topic** to created in step 1. Set **topic** to a topic of your choice, like
a topic of your choice. `IRC mirror`.
1. Create a user on [matrix.org](https://matrix.org/), preferably 1. Create a user on [matrix.org](https://matrix.org/), preferably
with a descriptive name such as `zulip-bot`. with a descriptive name such as `zulip-bot`.
1. Open `matrix_bridge_config.py`, and provide your Matrix credentials 1. Open `zulip/integrations/matrix/matrix_bridge_config.py` again, and update
in the `matrix` section: the following section with your Matrix credentials:
``` ```
"matrix": { ('matrix', OrderedDict((
"host": "https://matrix.org", ('host', 'https://matrix.org'),
"username": "username of matrix.org user", ('username', 'username'),
"password": "password of matrix.org user", ('password', 'password'),
"room_id": "#room:matrix.org" ('room_id', '#zulip:matrix.org'),
} ))),
``` ```
{% if 'IRC' in integration_display_name %} {% if 'IRC' in integration_display_name %}
@@ -50,12 +48,11 @@
{% endif %} {% endif %}
1. Run `python matrix_bridge.py` to start mirroring content. 1. Run `python matrix_bridge.py` from inside the Python virtual environment
to start mirroring content.
!!! tip "" !!! tip ""
If you want to customize the message formatting, you can do so by If you want to customize the message formatting, you can do so by
editing the variables `MATRIX_MESSAGE_TEMPLATE` and `ZULIP_MESSAGE_TEMPLATE` editing the variables `MATRIX_MESSAGE_TEMPLATE` and `ZULIP_MESSAGE_TEMPLATE`
in `zulip/integrations/matrix/matrix_bridge.py`. in `zulip/integrations/matrix/matrix_bridge.py`.
**Congratulations! You have created the bridge successfully!**

View File

@@ -1,6 +1,6 @@
### Install the bridge software ### Install the bridge software
1. Clone the Zulip API repository, and install its dependencies: 1. Clone the Zulip API repository, and install its dependencies.
``` ```
git clone https://github.com/zulip/python-zulip-api.git git clone https://github.com/zulip/python-zulip-api.git
@@ -8,15 +8,14 @@
python3 ./tools/provision python3 ./tools/provision
``` ```
1. Activate the virtualenv by running the `source` command printed This will create a new Python virtualenv. You'll run the bridge service
at the end of the `provision` output. inside this virtualenv.
1. To install the Matrix bridge software in your virtualenv, run: 1. Activate the virtualenv by running the `source` command printed
at the end of the output of the previous step.
1. Install the Matrix bridge software in your virtualenv, by running:
``` ```
pip install -r zulip/integrations/matrix/requirements.txt pip install -r zulip/integrations/matrix/requirements.txt
``` ```
This will create a new Python virtual environment, with all the
dependences for this bridge installed. You'll want to run the bridge
service inside this virtualenv.

View File

@@ -1,19 +1,22 @@
A bridge for exchanging messages between IRC and Zulip, powered by Mirror an IRC channel in Zulip!
[the Zulip Matrix integration](/integrations/doc/matrix).
This integration is powered by the [Zulip Matrix integration](/integrations/doc/matrix).
{!install-matrix.md!} {!install-matrix.md!}
{!configure-matrix-bridge.md!} {!configure-matrix-bridge.md!}
Your Zulip notifications may look like: **Congratulations! You're done!**
Your Zulip messages may look like:
![](/static/images/integrations/irc/001.png) ![](/static/images/integrations/irc/001.png)
Your IRC notifications may look like: Your IRC messages may look like:
![](/static/images/integrations/irc/002.png) ![](/static/images/integrations/irc/002.png)
**Note**: There are certain **Note**: There are a handful of
[IRC channels](https://github.com/matrix-org/matrix-appservice-irc/wiki/Channels-from-which-the-IRC-bridge-is-banned) [IRC channels](https://github.com/matrix-org/matrix-appservice-irc/wiki/Channels-from-which-the-IRC-bridge-is-banned)
where the Matrix.org IRC bridge has been banned for technical reasons. that have temporarily banned the Matrix.org IRC bridge.
You can't mirror those IRC channels using this integration. You can't currently mirror those channels using this integration.

View File

@@ -1,4 +1,4 @@
A bridge for exchanging messages between [matrix.org](https://matrix.org) and Zulip! Exchange messages between [matrix.org](https://matrix.org) and Zulip!
{!install-matrix.md!} {!install-matrix.md!}