Well I a currently working on something in computational chemistry (i can't tell the details here), for which i required certain updates to be posted on web (so as i can monitor from them from my home ;)) and guess what i wrote a the "search" tool as a plugin into google deskbar with in 5 mins!! Here is the code in C#:
-----------------------------------------------------------------
// A sample Deskbar plugin which searches for GAMESS Jobs on the phi-grid
//
// Copyright V.Ganesh 2004
using System;
using System.IO;
using Google.Desktop;
public class GamessJobSearch : ICustomSearch {
public string Title() { return "Gamess Job List"; }
public OutputType GetOutputType() { return OutputType.kViewer; }
bool Match(string query, string name, string email) {
if (email.ToLower().StartsWith(query))
return true;
string[] name_words = name.Split(' ');
foreach (string w in name_words)
if (w.ToLower().StartsWith(query))
return true;
return false;
}
public string Run(string query, OutputType browser_type) {
return "[MY COMPUTE SERVER]?q=" + query;
}
}
-----------------------------------------------------------------
I have removed the URL as its a bit private, any way its fun to work with google stuff :)
1 comment:
Hello V. Ganesh,
I read about your plugin with interest. I would appreciate your advise.
I am interested in developing my own plugin which will search one of my sites, a travel related search engine...
Could this be as simple as changing the URL in your script? If so, should I keep your copyright notice? Also, what is one suppose to do after writing a plugin, how does it get uploaded or downloaded?
Any hint is greatly appreciated.
Thank you.
Bob
Post a Comment