Remember the Milk “Plugin” for Alfred

Alfred is a really slick new launcher for OS X. It’s a lot simpler than QuickSilver.

One feature I can’t live without in my launcher is the ability to add tasks to my todo list and diary, both kept in the excellent Remember the Milk.

Alfred can’t run commandline programs (yet) so I wrote this simple webpage to send in tasks via the Remember the Milk email interface.

<?php

define('RTM_ADDR', 'YOUR RMILK EMAIL POST ADDRESS HERE');
define('CC_ADDR', 'IF YOU WANT TO SEND A COPY ANYWHERE');

function main() {
    $list = isset($_GET['list']) ? $_GET['list'] : 'To Do';
    $sending = $_GET['s'] . " #" . $list;
    if (strpos($sending, "^") === FALSE) {
        echo '<p>No Due Date - set to today</p>';
        $sending .= " ^today";
    }
    echo "<p>Sending " . htmlentities($sending) . "</p>";
    $success = mail(RTM_ADDR, $sending, '', "Cc: " . CC_ADDR . "\r\n");
    echo $success ? '<p style="color: green">Success</p>' : '<p style="font-size: large; color: red">Failure</p>';
}

main();

It’s quite annoying having a browser window come open and success/failure refers only to the sending of the email not the addition to Remember the Milk, but it’s a lot better than not having the capability.

PS I kind of hate the actual Remember the Milk API. It’s wonderful that they support undo and serious security and so on but it’s a real pain when all you want to do is post a task to a list and you have to deal with requesting timelines and frobs and tokens, etc.

5 Replies to “Remember the Milk “Plugin” for Alfred”

  1. You have to put this somewhere on a webserver that runs PHP. Then you point Alfred at it by creating a “todo” task or similar that points at the script. Fill in the right value for RTM_ADDR so the emails get sent to the right place. Then when you say: “todo Remember to explain how to set up Alfred script ^today !1” the script will send an email to rtm creating a priority 1 task due today with the above text. By default the scripts adds to your “To Do” list (whether you have one). To send it somewhere else include list=listname in the URL you add to Alfred.

  2. It seems that you cannot add a tag to your task when adding to RTM this way. The task never makes it to RTM at all. If I say: (my command for sending a task via Alfred to RTM is a simple ‘rtm whatever my task is’) rtm pick up some milk !1 – that works, but… rtm pick up some milk !1 #store – that does not work and the task never makes it to rtm Any ideas? Also, it would be sweet to eventually see Growl integration. Used to use Quicksilver with RTM and I had that. That’s the ONLY thing I miss about QS.

  3. Tags/Lists work for me I’m afraid. Can you output what is being sent in the email and see if it is getting mangled somehow.

Leave a Reply

Your email address will not be published.