This program sends XMPP (Jabber) messages passed by command line.
It just starts, reads command line parameters, then reads config file, then it logins to server, sends specified message and quits.
I wrote it to have fun receiving notifications from remote rtorrent each time it finishes loading a torrent. But it could be used with any program which could run external utility by an event you want to be reported about.
-
Launch
setup.exe
and follow it’s directions -
Run Xmpp Sender by using a shortcut created during setup
-
Add ruby to firewall exceptions when dialog pops up
-
Edit
xmpp_sender.yml
to use your own defaults
I’ve tested it with rtorrent 3.0.
So you’ve installed Xmpp Sender to C:\Program Files\Xmpp Sender
directory.
Try to issue in cmd the following command:C:\Program Files\Xmpp Sender\xmpp_sender.exe -j 'rtorrent just finished %N' -b 'torrent loaded to: %D'
You should recieve a new message in your IM with subject rtorrent just finished %N
and body torrent loaded to: %D
.
If you’ve received that message, then launch rtorrent ang go to Options/Preferences/Advanced/Run Program
tab
Type in the field labeled Run this program when a torrent finishes this string: C:\Program Files\Xmpp Sender\xmpp_sender.exe -j 'rtorrent just finished %N' -b 'torrent loaded to: %D'
Click OK button and try to load some torrents. Enjoy!
If you want to compile it you need to clone the repo git://github.com/Zloy/xmpp_sender.git and install Inno_Setup, ruby_1.8.7 and xmpp4r, ocra gems.
Change dir to where you’ve placed the cloned repo, say it be C:\ruby_apps\xmpp_sender
.
In xmpp_sender.iss find entry [Files], under that entry in all lines those start with ‘Source:’ change paths to source files from C:\InstantRails\ruby_apps\xmpp_sender\
to the path where you placed the cloned repo: C:\ruby_apps\xmpp_sender\
.
run:> ocra --chdir-first --no-lzma --innosetup xmpp_sender.iss --icon doc/images/logo_icon.ico xmpp_sender.rb
see in LICENSE