Remember The Milk plugin for Mozilla Ubiquity

So I was experimenting with the new Ubiquity extension from Mozilla labs and fell immediatly in love. Needless to say, Twitter integration was great, but I needed Remember The Milk. So, Viola!

rtm_ubiquity

My Ubiquity Feed Page

It’s pretty straightforward, the only command is ‘addtask’ and I think we can all guess its purpose. I’ll hopefully be making it more intelligent soon, its really just a ‘Hello World’ right now.

9 comments so far

  1. Matteo on

    I’ve added the icon and the description 😉

    CmdUtils.CreateCommand({
    name: “addtask”,
    takes: {task: noun_arb_text},
    icon: “http://www.rememberthemilk.com/favicon.ico”,
    description: “Creates a new task in Remember The Milk”,

    _task: function(taskText){
    h=’www.rememberthemilk.com’;
    p=’/services/ext/addtask.rtm’;
    cp=’http://’+h+p+’?d=’+encodeURIComponent(taskText.text)+’&t=’+encodeURIComponent(taskText.text);
    openUrl(cp,null);
    },

    preview: function( pblock , taskText) {
    var msg = ‘Creates the following Task: “${task}“‘;
    pblock.innerHTML = CmdUtils.renderTemplate( msg, {task: taskText.text} );
    },

    execute: function(taskText) {
    this._task(taskText);
    }
    });

  2. xamox on

    Awesome. Is there anyway to get it to just add it, like not forward to a page that I have to click submit?

  3. Gary Hodgson on

    For what it’s worth I made a couple of alterations:
    I’ve renamed it to ‘rtm’ so it doesn’t clash with ‘add-to-calendar’, and I have also moved the date parameter to an ‘on’ modifier, i.e. so you can type “rtm my task on Wednesday” and it splits the task name and date as necessary. (It doesn’t sound too good with “rtm my task on tomorrow” but I reckon I can live with that 🙂

    I haven’t seen a way to submit the task directly, as xamox mentions, but if I do I’ll post back here.

    To save comment space I’ve put the command here: http://garyhodgson.com/ubiquity

  4. Thanos on

    I think openUrl() should be replaced by Utils.openUrlInBrowser(). openUrl will not work for me.

    Thanks

  5. Gary Hodgson on

    Hmm, that worked for me yesterday. Anyhow, I have updated my ubiquity page if it is of use. (I was surprised to see people subscribed to it to be honest 🙂

  6. delm on

    The way to make it work in a nice way (without submitting forms) is using the api of rtm (with api key and api signing).
    All that you need is in http://www.rememberthemilk.com/services/api/
    I’ll be doing some research and testing for the api to work, I *need* this XD
    so.. I’ll be posting here if i got something that’s worth sharing.

    maybe a good command name would be “add to rtm” instead of “rtm” by itself, because we can implement more methods later using the API.

  7. Ben on

    If you wanted it to sound more natural, wouldn’t “for” be a good replacement for “on”?

    I.e. – rtm Get milk for tomorrow / rtm get milk for wednesday / rtm get milk for 10/03/2008

  8. Ben on

    Also, if you were to change the name, i’d leave rtm at the front, so it automatically narrows down the autocomplete feature! 🙂

  9. Bookmarks about Blog on

    […] – bookmarked by 5 members originally found by sylvanne on 2008-08-28 Remember The Milk plugin for Mozilla Ubiquity http://kubasik.net/blog/2008/08/27/remember-the-milk-plugin-for-mozilla-ubiquity/ – bookmarked by […]


Leave a comment