Skip to content

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

License

Notifications You must be signed in to change notification settings

Sumidu/slacker.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slacker

Stable Dev Mac/Linux Windows Codecov Coveralls

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)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages