public
Fork of lachie/starjour
Description: Watches the ether for the handy *jour scripts.
Homepage:
Clone URL: git://github.com/quamen/starjour.git
name age message
file .gitignore Fri Jun 13 06:38:45 -0700 2008 ignoring files like starjour.xcodeproj/drnic.mo... [drnic]
file AppController.rb Loading commit data...
file AppJour.rb Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file AppJour.xib
file BonjourWatcher.rb
file CollectionView.rb
file CollectionViewItem.rb
directory English.lproj/
file GemJour.rb Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file GemJour.xib Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file GitJour.rb
file GitJour.xib Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file Info.plist
file Jour.rb
file MessageView.rb Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file PasteJour.rb Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file PasteJour.xib Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file Rakefile
file Readme.textile Sat Jun 14 15:48:26 -0700 2008 update README image [drnic]
file ServiceKind.rb Sat Jun 21 00:34:54 -0700 2008 lots of refactorage [lachie]
file main.m Thu Jun 12 21:47:53 -0700 2008 first commit [lachie]
file rb_main.rb Thu Jun 12 21:47:53 -0700 2008 first commit [lachie]
file star-jour.icns
directory starjour.xcodeproj/ Wed Aug 13 17:28:37 -0700 2008 fixed up xcode project [lachie]
Readme.textile

starjour

A wee rubycocoa gooey for monitoring scripts of the *jour fad.

Starjour - panels branch
Uploaded with plasq’s Skitch!

You need xcode to compile it, but a pre-compiled version is here: http://rails-oceania.googlecode.com/files/starjour-0.1.0.zip

expando ~/.jourrc

You can double click on a message to make it do something appropriate.
The builtin service spies don’t really do much at the moment.

To implement your own behaviour, put something like this in ~/.jourrc


puts “reading .jourrc”

service(‘pastejour’) do |service|
(from, to) = *service.name.split(‘-’)

message = “Paste from #{from}” message << " to #{to}" if to [‘pastejour’, message, lambda {|msg| system(“/opt/local/bin/pastejour ‘#{msg[:service].name}’ | pbcopy”); ‘copied to pasteboard’}]

end

  1. or a whole darn class, in this form:

class Paste < OSX::NSObject
attr_reader :text

def initWithService(service) if init @service = service (from, to) = *service.name.split(‘-’) @text = “Paste from #{from}” @text << " to #{to}" if to end self end def service_name; ‘paste’ end def run system(“/opt/local/bin/pastejour ‘#{@service.name}’ | pbcopy”) ‘copied to pasteboard’ end

end

service(‘pastejour’,Paste)

whence

Dr Nic was asking for help on his version (rubyjour) which we couldn’t get to fly.
I couldn’t stop thinking about it, so I had to get this done!

license

Copyright © 2008 Lachie Cox

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.