From 0012e7612304bda7dc4038315b88cee2d871d5c5 Mon Sep 17 00:00:00 2001 From: Eeshan Garg Date: Fri, 14 Sep 2018 18:16:20 -0230 Subject: [PATCH] webhooks/trello/doc: Require users to download Trello script. We now have a standalone zulip_trello.py script that can be run on Python2 and Python3 without having to install the `zulip` package. --- zerver/webhooks/trello/doc.md | 54 +++++++++++++---------------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/zerver/webhooks/trello/doc.md b/zerver/webhooks/trello/doc.md index 0d960c88c8..91d9ac6d5d 100644 --- a/zerver/webhooks/trello/doc.md +++ b/zerver/webhooks/trello/doc.md @@ -1,7 +1,7 @@ Get Zulip notifications from your Trello boards! !!! tip "" - Note that [the Zapier integration][1] is usually a simpler way to + Note that [Zapier][1] is usually a simpler way to integrate Trello with Zulip. [1]: ./zapier @@ -10,8 +10,7 @@ Get Zulip notifications from your Trello boards! 1. {!create-bot-construct-url-indented.md!} -1. We will first collect three items: a **Board ID**, an **API Key**, and a - **User Token**. +1. **Log in to Trello**, and collect the following three items: * **Board ID**: Go to your Trello board. The URL should look like `https://trello.com/b//`. Note down the @@ -24,45 +23,32 @@ Get Zulip notifications from your Trello boards! **Developer API Keys**, click on the **Token** link. Click on **Allow**. Note down the token generated. -1. Download and install our - [Python bindings and example scripts](/api/installation-instructions). +1. Make sure you have a working copy of Python. If you're running macOS or + Linux, you very likely already do. If you're running Windows you may or + may not. If you don't have Python, follow the installation instructions + [here](https://realpython.com/installing-python/). Note that you do not + need the latest version of Python; anything 2.7 or higher will do. - Trello supports outgoing webhooks, but unfortunately, doesn't have a UI - for configuring them. Instead, you have to use the Trello API to create - webhooks. We have provided a convenient script for doing this with the - Trello API in the Zulip Python bindings. You'll need to run this script - once on any machine (it doesn't have to be your Zulip server) to setup - the webhook; after you've done that, Trello will send the notifications - directly to your Zulip server. +1. Download [zulip-trello.py][2]. `Ctr+s` or `Cmd+s` on that page should + work in most browsers. -1. Open `/usr/local/share/zulip/integrations/trello/zulip_trello_config.py` - with your favorite editor and change the following lines to specify - the Trello **API Key**, **User Token**, and the webhook URL constructed - above: +1. Run the `zulip-trello` script in a terminal, after replacing the + arguments with the values collected above. ``` - TRELLO_API_KEY = "" - TRELLO_TOKEN = "" - ZULIP_WEBHOOK_URL = "" + python zulip_trello.py --trello-board-name \ + --trello-board-id \ + --trello-api-key \ + --trello-token \ + --zulip-webhook-url ``` -1. Go to the `/usr/local/share/zulip/integrations/trello/` directory - and run the `zulip_trello.py` script, like so: + The `zulip_trello.py` script only needs to be run once, and can be run + on any computer with python. - ``` - python zulip_trello.py - ``` +1. You can delete `zulip_trello.py` from your computer if you'd like. - Replace `` with the Trello - board's name and **Board ID**, respectively. - - The `zulip_trello.py` script needs to be run only once to register - the webhook, and can be run from any machine. - -!!! tip "" - To learn more, see [Trello's webhooks documentation][2]. - -[2]: https://developers.trello.com/page/webhooks +[2]: https://raw.githubusercontent.com/zulip/python-zulip-api/master/zulip/integrations/trello/zulip_trello.py {!congrats.md!}