Kevin Kubasik’s Personal Blog
RSS icon Email icon Home icon
  • Remember The Milk plugin for Mozilla Ubiquity

    Posted on August 27th, 2008 Kevin Kubasik 9 comments

    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 responses to “Remember The Milk plugin for Mozilla Ubiquity”

    1. 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. Awesome. Is there anyway to get it to just add it, like not forward to a page that I have to click submit?

    3. 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. I think openUrl() should be replaced by Utils.openUrlInBrowser(). openUrl will not work for me.

      Thanks

    5. 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. 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. 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. Also, if you were to change the name, i’d leave rtm at the front, so it automatically narrows down the autocomplete feature! :)

    9. [...] – 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 reply