https://github.com/andreif/slackme
📣 A tiny utility to send Slack messages using Incoming WebHook.
https://github.com/andreif/slackme
Last synced: 5 months ago
JSON representation
📣 A tiny utility to send Slack messages using Incoming WebHook.
- Host: GitHub
- URL: https://github.com/andreif/slackme
- Owner: andreif
- License: bsd-3-clause
- Created: 2017-05-08T13:13:34.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-08T13:29:36.000Z (about 9 years ago)
- Last Synced: 2025-09-17T13:41:19.078Z (9 months ago)
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
slackme
=============
A tiny utility to send Slack messages using Incoming WebHook.
Installing
.. code:: sh
$ pip install slackme
Help
.. code:: sh
$ slackme -h
usage: slackme [-h] [-v] [-n NAME] [-i EMOJI] [-u URL]
[-c CHANNEL [CHANNEL ...]]
TEXT [TEXT ...]
A tiny utility to send Slack messages using Incoming WebHook.
positional arguments:
TEXT parts of message to be merged into one
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-n, --name NAME username for the message, default: `slackme`
-i, --icon-emoji EMOJI
emoji for the massage, default: `rocket`
-u, --url URL Hook url which can also be provided via environment
variable SLACK_URL
-c, --channels CHANNEL [CHANNEL ...]
Example usage in an Ansible Playbook
.. code:: yaml
- name: notify deploy
when: image|changed or force is defined
become: false
local_action: "command slackme
--url {{ slack_url }}
--name deploy
--icon-emoji rocket
--channels deploy some-project
'`{git_user}` deployed `{{ project_name }}:{{ env_name }}`'
'from docker image `{{ docker_image }}`'
'to `{{ ansible_user_id }}@{{ inventory_hostname }}`'"
tags:
- deploy