Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

integration-docs: Remove macros that are used only in Matrix doc.

Niloth P8e6d8dc84591
diff --git a/templates/zerver/integrations/include/configure-matrix-bridge.md b/templates/zerver/integrations/include/configure-matrix-bridge.md
deleted file mode 100644
index 917c99101fe..00000000000
--- a/templates/zerver/integrations/include/configure-matrix-bridge.md
+++ /dev/null
@@ -1,64 +0,0 @@
-### Configure the bridge
-
-1. {!create-a-generic-bot.md!}
- Download the bot's `zuliprc` configuration file to your computer.
-
-1. [Subscribe the bot](/help/add-or-remove-users-from-a-channel) to the Zulip
- stream that will contain the mirror.
-
-1. Inside the virtualenv you created above, run
-
- ```
- python zulip/integrations/bridge_with_matrix/matrix_bridge.py \
- --write-sample-config matrix_bridge.conf --from-zuliprc <path/to/zuliprc>
- ```
-
- where `<path/to/zuliprc>` is the path to the `zuliprc` file you downloaded.
-
-1. Create a user on [matrix.org](https://matrix.org/) or another matrix
- server, preferably with a descriptive name like `zulip-bot`.
-
-1. Edit `matrix_bridge.conf` to look like this:
-
- ```
- [zulip]
- api_key = aPiKeY
- site = https://chat.zulip.org
- stream = "stream name"
- topic = "{{ integration_display_name }} mirror"
- [matrix]
- host = https://matrix.org
- username = <your matrix username>
- password = <your matrix password>
- room_id = #room:matrix.org
- ```
-
- The first three values should already be there; the rest you'll have to fill in.
- Make sure **stream** is set to the stream the bot is
- subscribed to.
-
- {% if 'IRC' in integration_display_name %}
-
- NOTE: For matrix.org, the `room_id` generally takes the form
- `#<irc_network>_#<channel>:matrix.org`. You can see the format for
- several popular IRC networks
- [here](https://github.com/matrix-org/matrix-appservice-irc/wiki/Bridged-IRC-networks), under
- the "Room alias format" column.
-
- For example, the `room_id` for the `#zulip-test` channel on freenode is
- `#freenode_#zulip-test:matrix.org`.
-
- {% endif %}
-
-1. Run the following command to start the matrix bridge:
-
- ```
- python zulip/integrations/bridge_with_matrix/matrix_bridge.py -c matrix_bridge.conf
- ```
-
-!!! tip ""
-
- You can customize the message formatting by
- editing the variables `MATRIX_MESSAGE_TEMPLATE` and `ZULIP_MESSAGE_TEMPLATE`
- in `zulip/integrations/bridge_with_matrix/matrix_bridge.py`.
diff --git a/templates/zerver/integrations/include/install-matrix.md b/templates/zerver/integrations/include/install-matrix.md
deleted file mode 100644
index b02772c9a0e..00000000000
--- a/templates/zerver/integrations/include/install-matrix.md
+++ /dev/null
@@ -1,21 +0,0 @@
-### Install the bridge software
-
-1. Clone the Zulip API repository, and install its dependencies.
-
- ```
- 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.
-
-1. Install the Matrix bridge software in your virtualenv, by running:
-
- ```
- pip install -r zulip/integrations/bridge_with_matrix/requirements.txt
- ```
diff --git a/templates/zerver/integrations/matrix.md b/templates/zerver/integrations/matrix.md
index b82b56e118b..e3b6358c3fe 100644
--- a/templates/zerver/integrations/matrix.md
+++ b/templates/zerver/integrations/matrix.md
@@ -2,9 +2,92 @@ Exchange messages between [matrix.org](https://matrix.org) and Zulip! If
you're looking to mirror an IRC channel in particular, we recommend our
[direct IRC integration](/integrations/doc/irc).
-{!install-matrix.md!}
+### Install the bridge software
-{!configure-matrix-bridge.md!}
+1. Clone the Zulip API repository, and install its dependencies.
+
+ ```
+ 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.
+
+1. Install the Matrix bridge software in your virtualenv, by running:
+
+ ```
+ pip install -r zulip/integrations/bridge_with_matrix/requirements.txt
+ ```
+
+### Configure the bridge
+
+1. {!create-a-generic-bot.md!}
+ Download the bot's `zuliprc` configuration file to your computer.
+
+1. [Subscribe the bot](/help/add-or-remove-users-from-a-channel) to the Zulip
+ stream that will contain the mirror.
+
+1. Inside the virtualenv you created above, run
+
+ ```
+ python zulip/integrations/bridge_with_matrix/matrix_bridge.py \
+ --write-sample-config matrix_bridge.conf --from-zuliprc <path/to/zuliprc>
+ ```
+
+ where `<path/to/zuliprc>` is the path to the `zuliprc` file you downloaded.
+
+1. Create a user on [matrix.org](https://matrix.org/) or another matrix
+ server, preferably with a descriptive name like `zulip-bot`.
+
+1. Edit `matrix_bridge.conf` to look like this:
+
+ ```
+ [zulip]
+ api_key = aPiKeY
+ site = https://chat.zulip.org
+ stream = "stream name"
+ topic = "{{ integration_display_name }} mirror"
+ [matrix]
+ host = https://matrix.org
+ username = <your matrix username>
+ password = <your matrix password>
+ room_id = #room:matrix.org
+ ```
+
+ The first three values should already be there; the rest you'll have to fill in.
+ Make sure **stream** is set to the stream the bot is
+ subscribed to.
+
+ {% if 'IRC' in integration_display_name %}
+
+ NOTE: For matrix.org, the `room_id` generally takes the form
+ `#<irc_network>_#<channel>:matrix.org`. You can see the format for
+ several popular IRC networks
+ [here](https://github.com/matrix-org/matrix-appservice-irc/wiki/Bridged-IRC-networks), under
+ the "Room alias format" column.
+
+ For example, the `room_id` for the `#zulip-test` channel on freenode is
+ `#freenode_#zulip-test:matrix.org`.
+
+ {% endif %}
+
+1. Run the following command to start the matrix bridge:
+
+ ```
+ python zulip/integrations/bridge_with_matrix/matrix_bridge.py -c matrix_bridge.conf
+ ```
+
+!!! tip ""
+
+ You can customize the message formatting by
+ editing the variables `MATRIX_MESSAGE_TEMPLATE` and `ZULIP_MESSAGE_TEMPLATE`
+ in `zulip/integrations/bridge_with_matrix/matrix_bridge.py`.
**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)