Skip to content

Instantly share code, notes, and snippets.

@wwood
Created September 3, 2009 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwood/180067 to your computer and use it in GitHub Desktop.
Save wwood/180067 to your computer and use it in GitHub Desktop.
A pubmed search plugin for ubiquity that works with Ubiquity 0.5. Inspired by http://hublog.hubmed.org/archives/001747.html
/* This is a template command. */
CmdUtils.CreateCommand({
names: ["pubmed"],
icon: "http://www.ncbi.nlm.nih.gov/favicon.ico",
description: "Searches <a href='http://www.ncbi.nlm.nih.gov/pubmed'>pubmed</a>.",
help: "type 'pubmed something', enter. The something is like searching from the front page of PubMed",
author: { name: "Ben J. Woodcroft", email: "b.woodcroft near pgrad.unimelb.edu.au"},
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text}],
execute: function execute(args) {
var urlString = "http://www.ncbi.nlm.nih.gov/PubMed?term="+args.object.text;
Utils.openUrlInBrowser(urlString);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment