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: 19 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T17:02:50.000Z (over 4 years ago)
- Last Synced: 2024-10-03T05:06:12.317Z (about 1 month 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
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://sumidu.github.io/slacker.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://sumidu.github.io/slacker.jl/dev)
[![Mac/Linux](https://travis-ci.com/sumidu/slacker.jl.svg?branch=master)](https://travis-ci.com/sumidu/slacker.jl)
[![Windows](https://ci.appveyor.com/api/projects/status/github/sumidu/slacker.jl?svg=true)](https://ci.appveyor.com/project/sumidu/slacker-jl)
[![Codecov](https://codecov.io/gh/sumidu/slacker.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/sumidu/slacker.jl)
[![Coveralls](https://coveralls.io/repos/github/Sumidu/slacker.jl/badge.svg?branch=master)](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)
```