Notify to the slack channel using the incoming webhook when the previous command has ended.
Project description
Notify to the slack channel using the incoming webhooks when the previous command has ended.
Requirements
Python 2
Install
pypi
$ pip install cht
Download
If you don’t want to install cht with pip, download the main script.
# assume that ~/bin is included in $PATH $ curl https://raw.githubusercontent.com/suzuki-shunsuke/cht/master/cht.py -o ~/bin/cht $ chmod a+x ~/cht
Usage
$ <previous command>; cht $? [-u <url>] [-c <channel>] [-m <message>]
if you want to send the previous command’s output to the slack channel, use pipe.
$ <previous command> | cht [-u <url>] [-c <channel>] [-m <message>]
Environment Variable
You can use the following environment variables to set the channel and webhook url.
CHT_URL: webhook url
CHT_CHANNEL: channel name
Command line arguments are prefered to the environment variables.
Contributing
Create a feature branch
Commit your changes
Rebase your local changes against the master branch
Create a new Pull Request
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cht-1.2.1.tar.gz
.
File metadata
- Download URL: cht-1.2.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfde8d4543e0f0900f800345a0f3f809f7ee9cbf144561bb18c8ac44d6b26cbf |
|
MD5 | 902df0ef27a43ea1eaca53d682c6e48d |
|
BLAKE2b-256 | 858f3918100af76b6a9ec9107eeda01cbc600ce44b8d374028d85706474e454a |