While I've been hacking around with Sherlock I managed to put together a new search channel to search Google. In every sense of the word this is a hack since Apple hasn't released the Sherlock SDK yet. The main problem is altering the UI elements. Without the SDK you can't open the nib files in Interface Builder so I used the AppleCare channel UI and hacked it with a hex editor to change some of the strings. The scripts are easy once you battle through the weird conglomeration of Javascript and XQuery that they are using. Anyway, to use the channel it's really easy.
Here is the Sherlock URL to add this channel to Sherlock. sherlock://www.xmldatabases.org/projects/GoogleSearch/Channel.xml?action=add In Internet Explorer you should just be able to click the link and it will automatically add it. Other browsers may not work, but you should be able to add it under Sherlock : Preferences : Subscriptions, click Add and then use this URL. http://www.xmldatabases.org/projects/GoogleSearch/channels.xml
This channel is an experiment and really only exists because I wanted to figure out how Sherlock works. Once Apple releases the SDK it will be possible to build much more compelling examples. BTW, if anyone knows where I can get the SDK please let me know.
What this does is search Google and return the first 100 results. Clicking the search button again will return another 100 results and so on. Single clicking an item shows the abstract in the bottom window and double clicking it opens it in a new browser window.
There are a few caveats with this. The relevance column isn't used, it's just there because it's part of the AppleCare interface and I couldn't remove it. Search results aren't returned in the same order that Google returns them, I'm trying to figure this out.
Now the interesting part about how Sherlock works is that if I update the channel it should be updated automatically in Sherlock. This provides a way to offer limited functionality applications with native Mac OS X GUIs and strong web services support via a centrally managed mechanism. Other then the Google pieces, all the logic for the channel runs within a constrained environment within Sherlock. You don't have full native access to the local PC since it would be horribly insecure. There is much more that can be done here then what Apple is currently using. In environments where Mac OS X is the main OS, Sherlock should become a tool for many things well beyond toy apps like searching Google. I'll try to explain more on what I mean in the future.
3:50:17 PM
|