Skip to content

Latest commit

 

History

History
72 lines (45 loc) · 1.73 KB

README.rst

File metadata and controls

72 lines (45 loc) · 1.73 KB

slacker-cli

https://travis-ci.org/juanpabloaj/slacker-cli.svg?branch=master https://coveralls.io/repos/juanpabloaj/slacker-cli/badge.svg?branch=master

Send messages to Slack from command line.

Usage

date | slacker -c slack_channel -t slack_token

The Slack token can be called from an enviroment variable, called SLACK_TOKEN.

You can set SLACK_TOKEN in your ~/.bashrc

# ~/.bashrc
export SLACK_TOKEN="slack_token_string"
date | slacker -c slack_channel

Send message to user:

date | slacker -u user_name

Upload file to channel:

date | slacker -c slack_channel -f image.png

Add sender name and emoji avatar:

date | slacker -n SlackerBot -i :dancer:

Installation

pip install slacker-cli

Tokens

You can either generate test tokens or create a bot user and use its token.

Contributors