I already pondered about making magic words extensible here:
http://groups.google.com/group/ubiquity-core/browse_thread/thread/c2ce330eb1ef1452
Thought the idea deserved it's own thread. :)
magic.add({
name: '...',
aliases: ['...','..'],
homepage: '...', // optional
icon: '...', // optional - url to icon for this magic
license: '...', // optional - comma separated list of licenses
summary: '...', // optional - a short summary of what this magic does
description: '...', // optional - longer description of this magic
suggest: function() { // mandatory
}
});
The suggest() method (for want of a better name) would do the magic. I
envisage that there could be different types of magic based on the
nature of the magic word.
For example "here" could relate to the current text area, the current
document, my geolocation, etc. I'm really not sure how to deal with
this as I have no idea how the current magic words function.
I'd imagine that the suggest method would be passed an object that
describes the current command somehow so that it could then work out
what verbs and nouns are in use and either return a value, a list of
suggestions or somehow manipulate the command object.
Maybe people could list suggestions for magic words in to this topic
or a page somewhere so we can see what sort of features would be
needed.