A simple script for mirroring Trello organization activity to a Zulip stream.
Authentication, source and destination parameters can come from the environment or an external json file. The config_example.json
file is a complete example with placeholder information. Parameter names below and brief descriptions below with full details on creating them in the next section.
Visit the Trello Getting Started Guide for full details about the key and token below.
Trello Application Key and User Token
Interacting with the Trello API requires an application key. This can be generated, after logging in, by visiting the link below:
https://trello.com/1/appKey/generate.
A user token must be generated to access any private data. In the URL below, replace APPLICATION_KEY with the key generated in the above step. Note that the expiration is never. See the guide linked above for other intervals (e.g. expiration=1days):
Zulip Bot and Stream
Bots can be created through the settings page. Visit the settings page and create a new bot (e.g. FullName: TrelloBot, Username: trello, Avatar: Trello logo). Once created, the bot API Key will be displayed on the settings page.
A new stream is the best place to put all the messages from this new bot. Visit the subscriptions page, enter trello for the stream name and click Create Stream.
Create config.json
Copy config_example.json
to config.json
. Edit config.json
and fill in the placeholders with the real information you just created.
Run the script
The script runs in a loop by default. This is convenient for testing or running in a screen session. For example,
./trello-to-zulip.py --config=config.json --verbose
will start the script, request Trello activity, post anything new to Zulip, sleep for a minute and repeat indefinitely. The --verbose
flag echos received activity and created messages for simple monitoring.
Leaving it running
I currently run this during 'working hours' via cron
. The script attempts to be a good citizen by keeping track of the last action date, stored in a file named .trello-to-zulip-date
, and sending that along in the requests for activity.
./trello-to-zulip.py --config=config.json --verbose --once
./trello-to-zulip.py --config=config.json --verbose --no-post
--sleep
interval is in seconds./trello-to-zulip.py --config=config.json --verbose --sleep=300
ZULIP_STREAM=my-other-stream ./trello-to-zulip.py --config=config.json --verbose --once
./trello-to-zulip.py --config=config.json --verbose --all
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4