docs: Add reference to zulip-bot-output script.

This commit is contained in:
Robert Hönig 2017-09-01 17:27:50 +02:00 committed by Tim Abbott
parent 6bfbbaa0ce
commit bc4627e61a
1 changed files with 23 additions and 0 deletions

View File

@ -68,6 +68,9 @@ server. It assumes you want to use one of the existing `zulip_bots/bots`
bots in your Zulip organization. If you want to write a new one, you
just need to write the `<my-bot>.py` script and put it into `zulip_bots/bots/<my-bot>` directory.
*Looking for an easy way to test a bot's output? Check out [this](
#testing-a-bot-s-output) section.*
You need:
* An account in an organization on a Zulip server
@ -143,6 +146,26 @@ You need:
the `helloworld` bot, you should expect the bot to respond with
"beep boop".
### Testing a bot's output
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.
* 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)
* Example: `zulip-bot-output converter --message "12 meter yard"`
Response: `12.0 meter = 13.12336 yard`
* Run `zulip-bot-output <path/to/bot.py> --message "<your-message>"` to specify the bot's path yourself.
* Example: `zulip-bot-output zulip_bots/zulip_bots/bots/converter/converter.py --message "12 meter yard"`
Response: `12.0 meter = 13.12336 yard`
## Zulip Botserver
The Zulip Botserver is for people who want to