Command customization with nountype memory

1 view
Skip to first unread message

Jono

unread,
Aug 20, 2009, 2:00:40 PM8/20/09
to ubiqui...@googlegroups.com
Heather said:
In this thread:
http://groups.google.com/group/ubiquity-core/browse_thread/thread/c906069f7574b46a
Heather brought up the subject of adding configurable parameters to commands:

> I'd also like to discuss the possibility of having a mechanism to
> configure commands. Some commands (amazon search, ping.fm, skype,
> google voice) would benefit from customization beyond just
> localization. For example, people have frequently requested the
> ability to seach amazon.co.uk instead of amazon.com. Ping FM requires
> an ID key to work correctly. I have a skype command that's fairly
> cool but is hardcoded to prepend +1 to the numbers because I'm in the
> U.S. I think this is a feature that might be really nice for the end
> user, although it might add complexity to the command API.

There's definitely a need to provide additional settings for some
commands, but I think it can actually be handled through our existing
argument mechanism rather than requiring additions to the command API.
It requires having memory for nountypes, but it goes like this. I'll
use the Skype command as an example:

skype (phone number) from (locale)

1. If you explicitly specify a country code for the locale argument,
it uses that locale. It can of course suggest country codes and map
country names to country codes.
2. If you've never specified a locale argument, it defaults to your
Firefox locale settings.
3. (the important part) the country-code nountype has suggestion
memory, so once you've specified a country code at least once, the
noun type remembers it and makes it a default suggestion in the
future. That means that once I've done "skype 800-555-1234 from ca"
once or twice, it remembers that Canada is my preferred locale; after
that I can just say "skype (number)" and let Ubiquity fill in "canada"
for the locale argument.
4. Any time I'm not in canada, I can explicitly specify my current
location without having to change any settings.

This is, by the way, one of the main reasons I think that suggestion
memory for nountypes will be so important. Also, for this to work the
way I imagine, the nountype suggestion memory must be used by the
default() method, not only the suggest() method.

Any command that would have locale-specific settings can be handled in
the same way. A command that requires login info, like the ID for
Ping FM, can go like this:

ping.fm (update message) as (id)

and it remembers your id in the noun suggestion memory for next time.

--Jono

Brandon Pung

unread,
Aug 21, 2009, 12:27:37 PM8/21/09
to ubiqui...@googlegroups.com
I really like Jono's idea for how to implement these command settings! Since most of the infrastructure for doing that is already there (with suggestion memory), it seems to me that the only modifications we'd need to make would be to have default() use the suggestion memory (as Jono pointed out). Great solution!

-Brandon
--
Brandon James Pung
Massachusetts Institute of Technology Class of 2010
Department of Electrical Engineering and Computer Science
828.777.8640 | bp...@mit.edu
Reply all
Reply to author
Forward
0 new messages