Giter Club home page Giter Club logo

irssi-zeromq's Introduction

irssi-zeromq

Motivation

I have long been using Irssi running in a screen as my IRC client of choice. Lately I have also been putting ZNC in between to also be able to connect from my iPhone, iPad and nice graphical OSX clients. But somehow I always end up going back to irssi. The one thing I am missing though is the instant notification when something happens which might need my attention. The nice things you get with GUI clients like bouncing dock icons, ping sounds and growl notifications. I know there are a lot of solutions for this, but I kind of didn't feel like constantly parsing a logfile over SSH to get notifications.

And I REALLY wanted to play with ZeroMQ.

Overview

irssi-zeromq is an irssi plugin, inspired by fnotify, which subscribes to irssi events and distributes them via ZeroMQ pub/sub. Notification handlers just subscribe to the socket, get notified about events and can be written in any language. If you have irssi running on a remote system, just change the socket to use TCP and your golden.

Example subscribers

Writing messages to stdout with Python:

import sys
import zmq

context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect ("ipc://irssi.ipc")
socket.setsockopt(zmq.SUBSCRIBE, 'irssi')

print socket.recv()

Display a growl notification with Ruby:

require 'rubygems'
require 'ffi-rzmq'

context = ZMQ::Context.new(1)
subscriber = context.socket(ZMQ::SUB)
subscriber.connect("ipc://irssi.ipc")
subscriber.setsockopt(ZMQ::SUBSCRIBE, "irssi")

s = ''
subscriber.recv_string(s)
system("growlnotify -t irssi -m \"#{s}\"")

I think you get the idea. Now it's super easy to write notification subscribers in any language you like. Go forth and subscribe.

Requirements

  • the perl ZeroMQ module from CPAN

Todo:

  • emit the actual irssi event as pub channel
  • emit more events

Meta

Thanks

  • Thorsten Leemhuis for fnotify
  • ZeroMQ for being awesome

irssi-zeromq's People

Contributors

mrtazz avatar

Stargazers

 avatar John Jenkins avatar Sean Leonard avatar  avatar Cheston Lee avatar

Watchers

 avatar James Cloos avatar  avatar

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.