Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sumidu/slacker.jl
A Julia Package that allows sending message to slack (e.g. to let you know a simulation has completed).
https://github.com/sumidu/slacker.jl
julia julia-language slack slackbot
Last synced: 7 days ago
JSON representation
A Julia Package that allows sending message to slack (e.g. to let you know a simulation has completed).
- Host: GitHub
- URL: https://github.com/sumidu/slacker.jl
- Owner: Sumidu
- License: mit
- Created: 2019-10-11T11:56:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T17:02:50.000Z (about 5 years ago)
- Last Synced: 2024-10-19T05:18:33.385Z (4 months ago)
- Topics: julia, julia-language, slack, slackbot
- Language: Julia
- Size: 78.1 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slacker
[](https://sumidu.github.io/slacker.jl/stable)
[](https://sumidu.github.io/slacker.jl/dev)
[](https://travis-ci.com/sumidu/slacker.jl)
[](https://ci.appveyor.com/project/sumidu/slacker-jl)
[](https://codecov.io/gh/sumidu/slacker.jl)
[](https://coveralls.io/github/Sumidu/slacker.jl?branch=master)A package that allows sending to slack. It uses a configuration file stored in the home directory of the user.
It allows for multiple named configurations, if several slack servers are used.*NOTE* Version 1.0 breaks compatibility with earlier versions.
## Installation
```julia
using Pkg
Pkg.add("Slacker")
```## Usage
```julia
using Slacker# replace the url with your incoming Webhook URL
cfg = SlackConfig("https://hooks.slack.com/services/....", "JuliaBot", "#general", ":ghost:")addConfig(cfg)
sendMessage("Hi this is a Test from Slacker.")
```
## Using Multiple Servers
```julia
using Slackercfg1 = SlackConfig("url1", "JuliaBot", "#general", ":ghost:")
cfg2 = SlackConfig("url2", "JuliaBot2", "@sumidu", ":smile:")addConfig(cfg, "server1")
addConfig(cfg, "server2")sendMessage("Hi this is a Test from Slacker to server1.", "server1")
sendMessage("Hi this is a Test from Slacker to server1.", "server2")```
## Changing the channel or username of a configuration temporarily
```julia
using Slackercfg = loadConfig("server1")
cfg.channel = "#random"
cfg.user = "Julia Random Bot"
cfg.icon_emoji = ":grinning:"sendMessage("Hi this is a Test from Slacker to server1.", cfg)
```