slacker.jl

A Julia Package that allows sending message to slack (e.g. to let you know a simulation has completed).

MIT License

Stars
2
Committers
1

Slacker

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

using Pkg
Pkg.add("Slacker")

Usage

  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

  using Slacker

  cfg1 = 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

  using Slacker

  cfg = 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)
Package Rankings
Top 36.83% on Juliahub.com
Badges
Extracted from project README
Stable Dev Mac/Linux Windows Codecov Coveralls