Skip to main content

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

  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

Metadata

Release files for cht 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cht 1.2.1
File Size Uploaded Provenance
cht-1.2.1.tar.gz 2.7 kB Without provenance Details

Release files / cht-1.2.1.tar.gz

Download URL cht-1.2.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dfde8d4543e0f0900f800345a0f3f809f7ee9cbf144561bb18c8ac44d6b26cbf
BLAKE2b-256 checksum
How to use checksums
858f3918100af76b6a9ec9107eeda01cbc600ce44b8d374028d85706474e454a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for cht 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page