Quicksilver and a simple command line interface for Chandler
February 2nd, 2006 at 6:16 pm (2 years, 6 months ago) by Ted Leung under Community, Product Design, Public EventsA few weeks ago, we had some sprints for the OSAF staff. These were kind of blue sky sprints and people worked on pretty much whatever they felt like (if you are looking for cool project ideas related to Chandler, there are a bunch of those there as well).
Morgen had worked up a simple XML-RPC server which allowed him to build an OS X Dashboard widget that could get information out of Chandler. That, discussions we’ve had about building a simple command line interface into Chandler, and the KGTD Quicksilver Action were the inspiration for a quick hack.
The KGTD Quicksilver action allows you to use Quicksilver’s text entry facilities to dump ideas or reminders or whatever into KGTD right from Quicksilver. It provides a quick, unobtrusive mechanism for collecting stuff that you need to get out of your head and into your Getting Things Done (GTD) system.
What I did was to do a similar thing, but instead of sending the text to KGTD, I send the text to Chandler via XML-RPC. And instead of sending just a piece of text, I implemented a very stupid command line interface to Chandler. The XML-RPC servlet and the command line processor are now checked into Chandler’s subversion repository, and the QuickSilver AppleScript is checked into my OSAF sandbox: http://svn.osafoundation.org/sandbox/twl/applescripts/ToChandler.scpt. The script ended up being very simple, because AppleScript has built in support for XML-RPC handling. In fact, the code is so short, that I’ll just include it here, too.
-- Invoke applescript with text -- 1. Activate QuickSilver and select this script.This is mostly a cool developer hack at the moment, but it gives you a taste of things you could do to integrate better with the native platform, as well as demonstrating the power of having some server functionality built into a desktop application. Of course, in an ideal OS X world, we’d have an AppleScript dictionary for Chandler and just use AppleScript (instead of XML-RPC) to do all this. But that’s probably a topic for another post.
– 2. Tab to the next and select Process Text.. – 3. Tab to the final pane and enter the command line textusing terms from application “Quicksilver” on process text ThisClipping tell application “http://localhost:1888/xmlrpc” set returnValue to call xmlrpc {method name:”commandline”, parameters:ThisClipping} end tell end process text end using terms from









February 3rd, 2006 at 10:22 pm
Though the AppleScript interface would be cool, doesn’t the generic XML-RPC interface make it more flexible for pulling off the same stunt cross-platform? I can see a similar Mono/.NET hack in someone’s future.
February 6th, 2006 at 11:56 am
Yes, it does, and we’re not going to take it out. The thing is that Applescript exposes an object model for that app, which is nice, and it uses local inter app communication, so there’s less overhead from http and XML processing. To be a proper Mac app, you really want to support scripting. But for Windows and Linux, we’ll still have xml-rpc.