sm - Slack Message
==================
sm is a minimal binary to send a message to a Slack channel.
Requirements
------------
In order to build sm you need rustc and libtls (LibreSSL).
Installation
------------
Edit Makefile to match your local setup (sm is installed into
the /usr/local/bin namespace by default).
Afterwards enter the following command to build and install sm:
make clean install
Running sm
----------
sm takes the channel id and the message, in this order, and posts
the message to that channel as the owner of SLACK_USER_TOKEN.
Exit status is 0 on success and non-zero on failure.
sm C03DEET2M18 "hello from sm"
The message may also be read from standard input by passing "-":
date | sm C03DEET2M18 -
Print the version:
sm -V
Formatting
----------
sm sends the message bytes verbatim. Slack renders the text as
its own mrkdwn flavor on the server side; the syntax is similar
to but not identical to CommonMark (e.g. `*bold*` instead of
`**bold**`). See the Slack formatting reference for the full
list:
https://api.slack.com/reference/surfaces/formatting
Configuration
-------------
sm reads a single environment variable:
SLACK_USER_TOKEN Slack user token, e.g. xoxp-...
The token must have the chat:write scope for the target channel.
Download
--------
got clone ssh://ijanc@ijanc.org/sm
License
-------
ISC — see LICENSE.