Simple python script changes emoji and message to Slack status.
- Runtime: Python 3.8
Create a config.json
by copying config.json.sample
.
$ cp config.json.sample config.json
{
"slack": {
"user_id": "XXXXXXXX",
"api_token": "xoxp-********-********-********",
"default_status_emoji": ":ghost:",
"default_status_message": "I'm a ghost."
}
}
user_id
: your Slack user IDapi_token
: your Slack API tokendefault_status_emoji
: default status emoji when the-e
option is omitteddefault_status_message
: default status message when the-m
option is omitted
$ docker build -t michimani/chss .
$ docker run michimani/chss -h
usage: change_status.py [-h] [-e EMOJI] [-m MESSAGE]
optional arguments:
-h, --help show this help message and exit
-e EMOJI, --emoji EMOJI
Slack emoji code for status icon. (e.g) :ghost:
-m MESSAGE, --message MESSAGE
message for status.
$ docker run michimani/chss -e ":monkey:" -m "I am a monkey."