···1+download: https://github.com/downloads/jcs/adium-pipeevent/PipeEventPlugin.AdiumPlugin.zip
2+3+for more info, see http://jcs.org/notaweblog/2010/12/28/pipe_event_adium_plugin/
-39
README.rdoc
···1-# vim:ts=8:sw=8:tw=80
2-3-PipeEvent Plugin for {Adium}[http://adium.im/]
4-Written by {joshua stein}[mailto:jcs@jcs.org] - {http://jcs.org/}[http://jcs.org/]
5-6-This is a simple plugin that will add a "Pipe event" action that you can add
7-to events, which will pipe the contents of the event text to an executable of
8-your choosing.
9-10-The most common case would be adding it to the "Message received" event, which
11-would pipe the content of the incoming message to your program.
12-13-To install, download the plugin:
14-15- https://github.com/downloads/jcs/adium-pipemessage/PipeEventPlugin.AdiumPlugin.zip
16-17-Unzip it and double-click it. Adium should notify you that the plugin has been
18-installed and you may have to restart Adium.
19-20-In Adium's Preferences, choose Events. You may also create a per-contact alert
21-by double-clicking on a contact and clicking the Events icon.
22-23-Click an event, such as "Message received", and click the [+] button. Select
24-"Pipe event to command". Enter the *full path* to your command and hit OK.
25-26-The command will be executed every time the event is run and have STDOUT and
27-STDERR closed, and then have the full content of the event/message written to
28-its STDIN. For easier scripting, the event/message has a trailing newline
29-appended. The title of the event (for messages, the sender's name) will be
30-passed to the command as its first argument.
31-32-A simple script that will write every received message to a file:
33-34- #!/usr/bin/ruby
35- File.open("#{ENV['HOME']}/adium.log", "a+") do |f|
36- f.puts "#{Time.now}: #{ARGV[0]} - #{STDIN.read}"
37- end
38-39-Note: make sure the command is executable (chmod +x).