Author: | Jakob Schmid (see http://www.schmid.dk/ for contact information) |
---|---|
Version: | 0.1.0 |
Revision: | 3200 |
Date: | 2008-06-23 |
jm.rb (Jabber Message) sends a XMPP (the Jabber protocol) message from the command-line.
Copy jm.rb to /usr/local/bin or somewhere in your path.
jm.rb is really simple to use. When you start it for the first time, it creates a configuration file ~/.jmrc , in which you can enter your account information. Then you can run it like this:
jm.rb hello
I also use it for reminders, e.g.:
sleep 180;jm.rb 'tea is ready'
It can also be used with cron, like this:
34 11 * * 1-5 /usr/bin/ruby -rauto_gem /usr/local/bin/jm.rb hello
Or with procmail, like this:
SUBJECT=`cat | egrep "^Subject:" | sed -re 's/^[Ss]ubject: *//'` FROM=`cat | egrep "^From:" | sed -re 's/^[Ff]rom: *//'` :0 c # continue after this rule | /usr/bin/ruby -rauto_gem /usr/local/bin/jm.rb "You've got mail from ${FROM}. Subject: ${SUBJECT}."
Usage: jm.rb [CONTACT] [MESSAGE] Send instant message using XMPP (Jabber). If message is omitted, message is read from stdin. CONTACT is something like someone@somewhere.org Options: -h, --help this help message -v, --verbose verbose output Usage: jm.rb [CONTACT] [MESSAGE]
None.