Author

My name is Payton, and I wrote Tweet to fill a software gap I found in the linux world. If you have questions or suggestions (especially if you have plugins!) you can contact me at brillig@users.sourceforge.net. If you want to know more about me and my projects, you can check out my blog.

Hosted By

RubyForge Logo

Licensed By

CC-GNU GPL
This software is licensed under the CC-GNU GPL.

Why should I use Tweet?

Running Tweet as your notifier allows all your (Tweet-aware) applications to send notifications through one standard interface instead of each application having its own method of notification. For example, I might have my email client, my IM client, my compiler, and a system monitor on a remote server all set up to notify Tweet when they have new information to tell me. When any of them sends a message to Tweet, I see a popup window with the message and the event is logged to syslog. Taking the example further, I can tell Tweet that I only want to know about events classified (by each application) as extremely important, and to ignore everything else. I can even write custom plugins to have Tweet behave the way I want it to.

How does Tweet work?

Tweet is a daemon which can be run on the command-line with very minimal configuration. It will listen on a network port for connections from other applications. When another application contacts it with a message, Tweet will notify you of the message using whatever plugins you have chosen. The basic plugins include a gtk2 popup window and a syslogger. More plugins will be available as I develop them, and it's very simple to write your own.

Naturally, an application has to be aware of Tweet to send it messages. Some applications may already be able to, as included is a command-line Ruby script ("tweet") that sends a notification to Tweet. If you have an application, such as an email client, which has the ability to notify you of new messages when they arrive by executing an arbitrary command, you can set it to execute the "tweet" script instead. Hopefully, more developers will support using Tweet as a notifier, and you can have one place for all your notification needs.

You can also notify Tweet very easily from within Ruby. See the documentation for more details.

How do I get Tweet?

gem install tweet

To start the daemon, run the following command (you don't have to be root): tweetd -d -n syslog I suggest you run: tweetd --help first to learn about the different options available to you. Also look at the example configuration file which will be default be installed as ~/.tweet/config.

How do I make my application notifyTweet?

Providing Tweet with a notification is very simple. There are currently three methods to contact a running Tweet daemon. The hardest is a TCP connection (defaulting to port 9128). Your application needs only to send a string like the following: app "MyApplication";title "hello world";message "Hello World!";duration "2";priority "3" Tweet will handle the rest. You may also consider providing a custom plugin for Tweet if you have some specific requirements for your messages.

A simpler approach if you'd like to notify tweet directly or manually, try using the ruby script tweet, provided with Tweet: tweet "Welcome to Tweet! Put your message here."; which will send a notification to tweet on the default network port.

Finally, if you are writing an application in Ruby, you can use the tweet API. See the documentation for more information. Here's a basic example: require 'tweet'
Tweet.message "Hello World!"

You can even request a specific plugin to be used:
require 'tweet' Tweet.message_with_notifiers('Hi there!', ['XOSDNotifier'])

How do I make a plugin for Tweet?

Tweet notification plugins are the simplest kind of plugin to make. Hypothetically, you can make whatever sort of plugin you'd like, though, to add new features. Since Tweet is written in Ruby, it is completely dynamic and extensible. To make any kind of plugin, you should know a little Ruby first, but it's one of the simplest-to-learn and most powerful languages out there, so give it a shot.

To create a new notification plugin, first look at the examples provided with Tweet. The RDoc documentation included should also be a valuable resource. Esentially, all that you need to do is to make a ruby file with a class that subclasses the Tweet::Notifier class and make a method called show. The method takes one argument, which is an intance of Tweet::Note. The Note contains all the information about the notification request. All you have to do is fire it off.

Tweet License

Tweet is licensed under a Creative Commons GPL License. What this means is that you can basically use it however you like (with NO WARANTY!) so long as you credit me with its original creation.