https://github.com/operable/gbexec
Standalone Greenbar template executor
https://github.com/operable/gbexec
Last synced: 6 months ago
JSON representation
Standalone Greenbar template executor
- Host: GitHub
- URL: https://github.com/operable/gbexec
- Owner: operable
- License: other
- Created: 2016-11-16T00:02:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-02T23:38:42.000Z (over 8 years ago)
- Last Synced: 2025-02-24T10:36:50.165Z (about 1 year ago)
- Language: Elixir
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
## Compilation prequisites
* Erlang 19.1
* Elixir 1.3.4
* C++ compiler (Tested with gcc and clang)
## Building
### Native
1. Clone this repo
1. `cd` to cloned directory
1. `mix do deps.get, escript.package`
1. Place the contents of `gbexec/bin` in your path
### Docker
1. run Dev build in container:
```
docker build -t gbexec:dev .
```
1. Test container:
```
docker run --rm -v $PWD/examples:/examples -w /examples gbexec:dev -s hello.greenbar hello.json
```
## Using
```
> gbexec --help
gbexec 1.0.0
gbexec (-s,--slack|-h,--hipchat)
-s, --slack Use Slack template renderer
-h, --hipchat Use HipChat renderer
--help Display this help message
Path to a Greenbar template
Path to a file containing valid JSON
```
## Examples
### Render a template for Slack
```
> bin/gbexec -s hello.greenbar data.json
*Hello Louise*
```
### Render a template for HipChat
```
> bin/gbexec -h hello.greenbar data.json
Hello Louise
```
See [examples](examples/README.md) directory for more examples.