Ikachan compatible interface with multiple backends (IRC, Slack, etc)
MIT License
Ikachan compatible interface with multiple backends (IRC, Slack, etc).
Write Gemfile:
source "https://rubygems.org"
gem 'daioikachan'
Run:
$ bundle
IRC, Slack backends are bundled as default.
Daioikachan supports plugin architecture. You may add your favirite backends as gems. See Plugin section for details.
This is an example to post messages for both IRC and Slack.
Generate a sample daioikachan.conf:
$ bundle exec daioikachan -g daioikachan.conf
Create .env
and configure your IRC server and Slack token:
IRC_SERVER=XX.XX.XX.XX
SLACK_API_TOKEN=XXX-XXXXX-XXXXXX-XXXXX
Start daioikachan
as
$ bundle exec daioikachan
Test to post a message to #daioikachan
channel of both IRC and Slack via daioikachan
like:
$ curl -d "channel=#daioikachan&message=test daioikachan" http://localhost:4979/notice
Look whether posting to IRC, and Slack succeeds.
See example.conf or multi_slack.conf as examples.
daioikachan
is created based on Fluentd
. So, you can use routing
features which Fluentd has, such as tag
and label
.
See fluentd.org:config-file documentation of Fluentd for details.
See following pages for built-in plugins.
If you need other backends, search other fluentd output plugins and add them. Enjoy!
You can create and add your own backends for daioikachan as a Fluentd Plugin.
See http://www.fluentd.org/plugins#notifications for available plugins.
Send notice
message.
$ curl -d "channel=#channel&message=test message" http://localhost:4979/notice
in_daioikachan
emits a messages as:
notice.channel {"command":"notice","channel":"channel","message":"test message"}
Send privmsg
message.
$ curl -d "channel=#channel&message=test message" http://localhost:4979/privmsg
in_daioikachan
emits a messages as:
privmsg.channel {"command":"privmsg","channel":"channel","message":"test message"}
The server always returns 200, and ignore.
IRC client (fluent-plugin-irc
) automatically joins to a channel on sending message.
Slack client does not require to join to a channel.
The server always returns 200, and ignores.
See CHANGELOG.md for details.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright (c) 2015 Naotoshi Seo. See LICENSE for details.
See https://github.com/choplin/fluent-plugin-irc