pip install slackclient
- Create a Slack App
- Click on the new App - Install App and get Bot User OAuth Access Token.
export SLACK_BOT_TOKEN='your bot user access token'
.- copy script from gist.
- Check if the script works right.
- Go to https://trello.com/1/appKey/generate and generate API key.
export KEY='your trello API key'
- Go to https://trello.com/1/authorize?key=[KEY]&name=SimpleBASHScript&expiration=never&response_type=token&scope=read,write and get token
export TOKEN='your trello API token'
.- Using given key and token, go to https://developers.trello.com/v1.0/reference#introduction and check.
- What i've used:
[GET] /boards/{id}/actions
: Getting all the actions related to the boards.
- Command format:
@DFAB get [user initial] [period] [a/b]
. trello_api.py
: receive arguments, requests and preprocess user's trello data and return.starterbot.py
: split the command, pass arguments to get trello data, pass output to the user.forever.py
: run forever in local!
local PC (24hr): nohup ./forever starterbot.py > /dev/null 2>&1&