Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/z0mbix/hipcat
Send/pipe messages to HipChat using just curl
https://github.com/z0mbix/hipcat
Last synced: about 1 month ago
JSON representation
Send/pipe messages to HipChat using just curl
- Host: GitHub
- URL: https://github.com/z0mbix/hipcat
- Owner: z0mbix
- License: mit
- Created: 2016-01-13T09:27:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-13T09:29:33.000Z (almost 9 years ago)
- Last Synced: 2024-04-17T20:13:13.308Z (9 months ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hipcat
======This is something we've been using at work for several years to easily send messages to hipchat, and finally found time to open source it. We use it for many things. Some ideas:
- Send notifications from deploy/build scripts
- Send installation notifications from RPM/DEB post-install scripts
- Send messages from automation scripts (backups etc.)
- Send the output from cron jobs
- Send messages when files/directories change using [incrond](http://incron.aiken.cz)This is very simple and the only dependency is 'curl'.
## Setup
You need to set you hipchat API token as an environment variable:
export HIPCAT_TOKEN=1234567890
## Usage
Pipe message to hipcat, specifying the room:
$ echo "What the deuce?" | hipcat -r 123456
Pass message directly to hipcat, also specifying the room:
$ hipcat -r 123456 -m "Giggity..."
If you export HIPCAT_ROOMS (one or more space separated), you don't need to use the -r option:
$ export HIPCAT_ROOMS="1234 5678"
$ date | hipcatRun 'hipcat' with no options to see full usage details:
$ hipcat
Usage: /usr/bin/hipcat -r [room_id(s)] -m [message -c [colour] -f [from] -n -h
At least one room ID and a message (including stdin) is required.
Use -f to change who the message is from
Use -n to notify room
Use -h to send an HTML message
Use -c to set the message colour (yellow|red|green|purple|gray|random)
Your hipchat token should be specified by exporting HIPCAT_TOKEN## TODO
- Read token and rooms from a config file?