Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/juanpabloaj/slacker-cli

Messages to slack from command line
https://github.com/juanpabloaj/slacker-cli

command-line python slack

Last synced: about 2 months ago
JSON representation

Messages to slack from command line

Awesome Lists containing this project

README

        

===========
slacker-cli
===========

.. image:: https://github.com/juanpabloaj/slacker-cli/actions/workflows/test.yml/badge.svg
:target: https://github.com/juanpabloaj/slacker-cli/actions
.. image:: https://codecov.io/gh/juanpabloaj/slacker-cli/branch/master/graph/badge.svg?token=xkOKL9Ysv4
:target: https://codecov.io/gh/juanpabloaj/slacker-cli

Send messages to `Slack `_ from command line.

Usage
=====

.. code-block:: bash

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``

.. code-block:: bash

# ~/.bashrc
export SLACK_TOKEN="slack_token_string"

.. code-block:: bash

date | slacker -c slack_channel

Send message to user:

.. code-block:: bash

date | slacker -u user_name

Upload file to channel:

.. code-block:: bash

date | slacker -c slack_channel -f image.png

Add sender name and emoji avatar:

.. code-block:: bash

date | slacker -n SlackerBot -i :dancer:

Installation
============

.. code-block:: bash

pip install slacker-cli

Tokens
======

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

Contributors
============

- `Alex Jurkiewicz `_
- `David Yen `_
- `Ethan Erchinger `_
- `Hugo van Kemenade `_
- `JuanPablo AJ `_
- `Kentaro Wada `_
- `Marc Abramowitz `_
- `Valentin Lab `_