Create Listable and GDocs Ubiquity Commands

Here are two command templates that I cooked up for Ubiquity. They allow you to easily create simple call and insert commands.

The point is that if you want a collection of values for reference, it should be easy to make it happen by putting it into a Google Spreadsheet or Listable.org and pointing Ubiquity to it.

The first is CmdUtils.makeListableCommand, which references a list from the site Listable.org.

Here’s how it looks:

screenshot2

The structure of it looks like this:

CmdUtils.makeListableCommand({
name: “countries”,
homepage : “http://www.porganized.com/category/ubiquity”,
description : “Search a list of world countries from Listable.org”,
author : { name: “Peter Organisciak”, email: orga...@gmail.com},
license : “MPL”
});

The name in this command (in this case “countries”) needs to be the same name as the end of the Listable.org url. So, in the example above, the url for the list was http://www.listable.org/show/countries. To create your own list, make a free account at Listable.

Easy? I hope so.

The other command let’s you use Google Spreadsheets (or any other CSV file).

It’s looks like this:

CmdUtils.makeCSVCommand({
name: “fast-food-restaurants”,
icon : “http://www.google.com/favicon.ico”,
csvUrl : “http://spreadsheets.google.com/pub?key=pFSeqrAljsWYeC31S9nilIg&output=csv&gid=0″,
homepage : “http://www.porganized.com/category/ubiquity”,
author : { name: “Peter Organisciak”, email: orga...@gmail.com},
license : “MPL”
});

The name could be anything. In this case, it’s the “csvUrl” that matter. If you’re using Google Spreadsheet, you can get the url by going to Share > Publish as a webpage > More publishing options, and then selecting “CSV” and hitting “generate URL”. The example above is based on this spreadsheet.

screenshot4screenshot5screenshot6

This page should offer to install the framework for you. Along with it are a few sample commands: “countries”, “us-state-names”, “fast-food-restaurants”, “canadian-prime-ministers”, and “most-commonly-used-passwords”.

To make your own commands, you’ll want to type in “command-editor” into ubiquity and craft you commands based on the examples above.


Comments