No commit activity in last 3 years
No release in over 3 years
A fluentd plugin to notify notification center with terminal-notifier.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 11.0
~> 3.2

Runtime

< 2, >= 0.14.0
 Project Readme

Fluent::Plugin::TerminalNotifier

Build Status

A fluentd plugin to notify notification center with terminal-notifier.

Notice

0.1.0 had been dropped support Fluentd v0.12. If you want to use this plugin with Fluentd v0.12, please add version constraint in your Gemfile like as:

gem "fluent-plugin-formatter_simple_tsv", "~> 0.0.3"

Installation

Add this line to your application's Gemfile:

gem 'fluent-plugin-terminal_notifier'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fluent-plugin-terminal_notifier

TerminalNotifierOutput

Configuration Example

For example, add terminal-notifier configuration section like this:

<match terminal_notifier.**>
  @type terminal_notifier
  title test
  sub_title sub
</match>

Also you can specify app ID to activate like this:

This example is activating Terminal.app.

<match terminal_notifier.**>
  @type terminal_notifier
  title test
  sub_title sub
  activate com.apple.Terminal
</match>

In more detail about activatation, please refer to the TerminalNotifier document.

Parameters

  • title (String. Optional) This key is used in Notification title.
  • sub_title (String. Optional) This key is used in Notification sub title.
  • activate (String. Optional) This key is used in OS X application activating.

TerminalNotifierFilter

Configuration Example

This is a filter version of terminal-notifier fluentd plugin.

For example, add terminal_notifier configuration section like this:

<filter filter.terminal_notifier.**>
  @type terminal_notifier
  title filtered
  sub_title sub_filtered
</filter>

Also you can specify app ID to activate like this:

This example is activating Terminal.app.

<filter filter.terminal_notifier.**>
  @type terminal_notifier
  title filtered
  sub_title sub_filtered
  activate com.apple.Terminal
</filter>

In more detail about activatation, please refer to the TerminalNotifier document.

Parameters

  • title (String. Optional) This key is used in Notification title.
  • sub_title (String. Optional) This key is used in Notification sub title.
  • activate (String. Optional) This key is used in OS X application activating.

More Complex Example

Please refer to the example configuration.

And note that this output plugin do not emit records, so, please consider to use something like copy plugin.

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/cosmo0920/fluent-plugin-terminal_notifier.

License

The gem is available as open source under the terms of the MIT License.