···11+download: https://github.com/downloads/jcs/adium-pipeevent/PipeEventPlugin.AdiumPlugin.zip
22+33+for more info, see http://jcs.org/notaweblog/2010/12/28/pipe_event_adium_plugin/
-39
README.rdoc
···11-# vim:ts=8:sw=8:tw=80
22-33-PipeEvent Plugin for {Adium}[http://adium.im/]
44-Written by {joshua stein}[mailto:jcs@jcs.org] - {http://jcs.org/}[http://jcs.org/]
55-66-This is a simple plugin that will add a "Pipe event" action that you can add
77-to events, which will pipe the contents of the event text to an executable of
88-your choosing.
99-1010-The most common case would be adding it to the "Message received" event, which
1111-would pipe the content of the incoming message to your program.
1212-1313-To install, download the plugin:
1414-1515- https://github.com/downloads/jcs/adium-pipemessage/PipeEventPlugin.AdiumPlugin.zip
1616-1717-Unzip it and double-click it. Adium should notify you that the plugin has been
1818-installed and you may have to restart Adium.
1919-2020-In Adium's Preferences, choose Events. You may also create a per-contact alert
2121-by double-clicking on a contact and clicking the Events icon.
2222-2323-Click an event, such as "Message received", and click the [+] button. Select
2424-"Pipe event to command". Enter the *full path* to your command and hit OK.
2525-2626-The command will be executed every time the event is run and have STDOUT and
2727-STDERR closed, and then have the full content of the event/message written to
2828-its STDIN. For easier scripting, the event/message has a trailing newline
2929-appended. The title of the event (for messages, the sender's name) will be
3030-passed to the command as its first argument.
3131-3232-A simple script that will write every received message to a file:
3333-3434- #!/usr/bin/ruby
3535- File.open("#{ENV['HOME']}/adium.log", "a+") do |f|
3636- f.puts "#{Time.now}: #{ARGV[0]} - #{STDIN.read}"
3737- end
3838-3939-Note: make sure the command is executable (chmod +x).