Giter Site home page Giter Site logo

cacophony's Introduction

Cacophony notifier

Caco-whatsie?

Cacophony is a small library that broadcasts notifications via a variety of mechanisms, such as growl, email and twitter. All instances of cacophony can share a configuration file, which can be used to centralise notification configfuration for a variety of applications. Thus, you can manage the way notifications are sent from all applications from one config file. It also comes with a command line executable which is great for notifiying you(or others) when a long running task is complete. It operates as a standalone executable, and it also can read from STDIN to pipe output from your tasks to the notifiers. The various notifiers are configured in ~/.cacophony, or via a config file passed via -c option.

Requirements

  • ruby 1.9.x

  • trollop

  • Growl (if you want growl notifications)

Install

sudo gem install cacophony

Running cacophony for the first time will prompt you to create a sample configuration file, which you can edit as appropriate.

Usage - Ruby library

Some examples:

notifier = Cacophony::Notifier.new   #defaults to reading config from ~/.cacophony
notifier.notifiy('Witty title', 'informative message')

notifier = Cacophony::Notifier.new('~/.alternative_config_file')
notifier.notifiy('Witty title', 'informative message')

notifier = Cacophony::Notifier.new({:growl_notifier => {...}})  #pass config hash directly.
notifier.notifiy('Witty title', 'informative message')

Usage - Command line

Some examples:

cacophony -m 'just a message'
./long_task_is_long | cacophony 
./long_task_is_long | cacophony -t 'job output:'
./long_task_is_long && cacophony -m 'coffee break over'

Developers

You can add customer notifiers by adding a class to lib/notifiers/. They must follow the naming pattern xNotifier, copy one of the existing classes for method signatures.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.