https://github.com/suzuki-shunsuke/cht
Notify to the slack channel using the "incoming webhooks" when the previous command has ended.
https://github.com/suzuki-shunsuke/cht
cli incoming-webhooks oss python slack
Last synced: 5 months ago
JSON representation
Notify to the slack channel using the "incoming webhooks" when the previous command has ended.
- Host: GitHub
- URL: https://github.com/suzuki-shunsuke/cht
- Owner: suzuki-shunsuke
- License: mit
- Archived: true
- Created: 2017-03-25T07:46:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-07-18T17:25:59.000Z (almost 2 years ago)
- Last Synced: 2026-01-05T06:45:49.920Z (6 months ago)
- Topics: cli, incoming-webhooks, oss, python, slack
- Language: Python
- Homepage: https://pypi.python.org/pypi/cht
- Size: 85.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 25
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
cht
===
.. image:: https://badge.fury.io/py/cht.svg
:target: https://badge.fury.io/py/cht
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
-----
::
$ ; cht $? [-u ] [-c ] [-m ]
if you want to send the previous command's output to the slack channel,
use pipe.
::
$ | cht [-u ] [-c ] [-m ]
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
------------
1. Fork (https://github.com/suzuki-shunsuke/cht/fork)
2. Create a feature branch
3. Commit your changes
4. Rebase your local changes against the master branch
5. Create a new Pull Request
License
-------
`MIT `__
Author
------
`Suzuki Shunsuke `__