项目作者: Brodan

项目描述 :
Pipe to Mattermost
高级语言: Python
项目地址: git://github.com/Brodan/patter.git
创建时间: 2018-06-30T01:21:13Z
项目社区:https://github.com/Brodan/patter

开源协议:MIT License

下载


patter

Pipe stdout directly to Mattermost.

patter demo

Install

  1. $ pip install patter

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

  1. MATTERMOST_TEAM_NAME
  2. MATTERMOST_URL
  3. MATTERMOST_USERNAME
  4. MATTERMOST_PASSWORD
  5. MATTERMOST_PORT

Usage

Send a message to a user.

  1. echo "testing" | patter -u some_user

Send a message to a channel.

  1. echo "testing" | patter -c town-square

Send a file.

  1. patter -c town-square -f some_file.txt

Todo

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

Contribute

PRs accepted.

License

MIT © Christopher Hranj

Notice: This project was developed in part during my 10% time at Truveris, Inc.