Skip to main content

Pipe stdout directly to Mattermost channels or users.

Project description

patter

Pipe stdout directly to Mattermost.

Install

$ pip install patter

Then set the following environment variables based on your Mattermost server's config:

MATTERMOST_TEAM_NAME
MATTERMOST_URL
MATTERMOST_USERNAME
MATTERMOST_PASSWORD
MATTERMOST_PORT

Usage

Send a message to a user.

$ echo "testing" | patter -u some_user

Send a message to a channel.

$ echo "testing" | patter -c town-square

Todo

  • remove prints and add logging with verbose flag
  • add unit tests via pytest
  • allow text that is not UTF-8 to be sent
  • add option of reading from a .patter file instead of using env vars.

Contribute

PRs accepted.

License

MIT © Christopher Hranj

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

patter-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded source

Built Distributions

patter-0.1.0-py3.7.egg (8.7 kB view hashes)

Uploaded 3 7

patter-0.1.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page