Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/a-sync/slackr
Simple shell command to send or pipe content to slack via webhooks. (To upload snippets or files use: www.github.com/a-sync/slackfu)
https://github.com/a-sync/slackr
shell shell-script slack slack-api slack-bot slack-messages slack-webhook slackbot webhook-api
Last synced: 3 months ago
JSON representation
Simple shell command to send or pipe content to slack via webhooks. (To upload snippets or files use: www.github.com/a-sync/slackfu)
- Host: GitHub
- URL: https://github.com/a-sync/slackr
- Owner: a-sync
- License: mit
- Created: 2017-11-28T19:11:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-19T20:12:44.000Z (about 6 years ago)
- Last Synced: 2024-05-02T12:40:14.704Z (6 months ago)
- Topics: shell, shell-script, slack, slack-api, slack-bot, slack-messages, slack-webhook, slackbot, webhook-api
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 43
- Watchers: 9
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slackr
## Requirements
* bash compatible shell
* sane install of python
* sane install of curl## Installation
1. download and unpack the [archive](https://github.com/a-sync/slackr/archive/master.tar.gz)
2. enter the unpacked directory and make [slackr](slackr) executable
3. set [your webhook](https://my.slack.com/services/new/incoming-webhook/) URL in the WEBHOOK_URL variable of [slackr](slackr#L3)
4. create a global symbolic link
```bash
curl -sL https://github.com/a-sync/slackr/archive/master.tar.gz | tar xz
cd slackr-master && chmod +x slackr
read -p "Enter webhook URL: " WHURL && sed -i "3s|.*|WEBHOOK_URL=\"$WHURL\"|" slackr
sudo ln -s "$(readlink -f slackr)" /usr/local/bin
```## Usage
```
Usage: slackr [options]Options:
-r
-i
-n
-c
-a
-t
-l
-f
-wExamples:
slackr some text
slackr -c good -n friendlybot -i :cat: hello
slackr -r general < logfile.txt
ls -la /etc/ | slackr -r D024BE91L -f "$(history 1)"
tail /var/log/syslog | slackr -a "$(id -un) $(hostname -f)"
```## :warning: Important
[@username format as a recipient (-r) is deprecated!
Slack API support was removed on 2018-09-12.](https://github.com/a-sync/slackr/wiki#important)