Mozilla’s Ubiquity is a wonderful thing, especially for an avid Quicksilver user as I am. Nowadays I live in the browser and having this tool across all the platforms I use it’s priceless.
Since the first version I wanted to contribute with some code for the engine or with some commands, but I got overwhelmed and only recently I caved in.
I actually wrote my first Ubiquity command almost a month ago, but I never got around to post a blog post to publish it. It queries my json-zh service for the pinyin character of the selected chinese text and gives you 3 way to deal with the result putting it in the
- clipboard,
- replacing the selected text
- or in a displayed message using Ubiquity’s notification method.
The code is really simple and using the embedded editor is amazing, except that I’d love some debugging facilities.
Working with optional arguments led me thinking about concatenated commands and a way to solve the problem of chaining them. Material for another post or (finally) a message in the ML: guys, you write too much and I barely keep the pace just reading the subjects ;)
Here’s the code, I hope someone will benefit from it.