mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
docs: Move zulip_bots installation steps to new section.
This commit is contained in:
@@ -61,6 +61,30 @@ zulip_bots
|
||||
Each subdirectory in `bots` contains a bot. When developing bots, try to use the structure outlined
|
||||
above as an orientation.
|
||||
|
||||
## Installing the `zulip_bots` package
|
||||
|
||||
The `zulip_bots` package comes with all you need to run a bot.
|
||||
|
||||
### Installing a stable version
|
||||
|
||||
Run `pip install zulip_bots`.
|
||||
|
||||
### Installing a development version
|
||||
|
||||
1. `git clone https://github.com/zulip/python-zulip-api.git` - clone the [python-zulip-api](
|
||||
https://github.com/zulip/python-zulip-api) repository.
|
||||
|
||||
2. `cd python-zulip-api` - navigate into your cloned repository.
|
||||
|
||||
3. `./tools/provision` - install all requirements in a Python virtualenv.
|
||||
|
||||
4. Run the `source <activation/path>` command printed in the previous step to activate the virtualenv.
|
||||
|
||||
5. *Finished*. You should now see the name of your venv preceding your prompt, e.g. `(ZULIP-~1)`.
|
||||
|
||||
*Hint: `./tools/provision` installs `zulip`, `zulip_bots`, and `zulip_botserver` in developer
|
||||
mode. This enables you to make changes to the code after the packages are installed.*
|
||||
|
||||
## How to run a bot
|
||||
|
||||
This guide will show you how to run a bot on a running Zulip
|
||||
@@ -83,18 +107,7 @@ You need:
|
||||
**Note: Please be considerate when testing experimental bots on
|
||||
public servers such as chat.zulip.org.**
|
||||
|
||||
1. Install all requirements. You can **either**
|
||||
|
||||
* run `pip install zulip_bots` for a stable version, **or**
|
||||
* install the latest version from our repository:
|
||||
* `git clone https://github.com/zulip/python-zulip-api.git` - clone the [python-zulip-api](
|
||||
https://github.com/zulip/python-zulip-api) repository.
|
||||
* `cd python-zulip-api` - navigate into your cloned repository.
|
||||
* `./tools/provision` - install all requirements in a Python virtualenv.
|
||||
* run the `source <activation/path>` command printed in the previous step to activate the virtualenv.
|
||||
* *Finished*. You should now see the name of your venv preceding your prompt, e.g. `(ZULIP-~1)`.</br>
|
||||
*Hint: `./tools/provision` installs `zulip`, `zulip_bots`, and `zulip_botserver` in developer
|
||||
mode. This enables you to make changes to the code after the packages are installed.*
|
||||
1. [Install all requirements](#installing-the-zulip-bots-package).
|
||||
|
||||
2. Register a new bot user on the Zulip server's web interface.
|
||||
|
||||
@@ -151,7 +164,7 @@ You need:
|
||||
If you just want to see how a bot reacts to a message, but don't want to set it up on a server,
|
||||
we have a little tool to help you out: `zulip-bot-output`
|
||||
|
||||
* Follow the first step in [How to run a bot](#how-to-run-a-bot) to install all requirements.
|
||||
* [Install all requirements](#installing-the-zulip-bots-package).
|
||||
|
||||
* Run `zulip-bot-output <bot-name> --message "<your-message>"` to test one of the bots in
|
||||
[`zulip_bots/bots`](https://github.com/zulip/python-zulip-api/tree/master/zulip_bots/zulip_bots/bots)
|
||||
|
||||
Reference in New Issue
Block a user