Alfred App + iDoneThis for logging your todo’s, GTD style

With this Alfred extension you can add tasks to your iDoneThis project with only a few keystrokes. Feel free to skip the explanation and go to the installation instructions.


Update: Fix for Mountain Lion at the end of the post!

Getting Things Done: free your mind

From the moment that David Allen started talking about Getting Things Done (GTD), GTD is a subject that many people search for. It’s even a popular subject for courses on Springest . The Getting Things Done method relies on the idea that you have to move tasks out of your mind by storing them externally, for example in an app like Things. So the mind is free from the job of remembering the tasks that need to be completed. When your mind is free, you can concentrate on executing the tasks, instead of remembering.

iDoneThis: log your activities / todo’s

Since GTD became popular, tons of apps have become available to support people in their productivity. Recently iDoneThis was added to the stack. It helps you keep track of the things you have done (a to do list, but the other way around). This can help you share your progress with your colleagues (for example in a Scrum standup meeting), which can be a great help to keeping yourself accountable. Then you make sure that you are not only getting things done but getting the right things done and being honest in the progress you are making.

There is one conflict between iDoneThis and GTD, however. With iDoneThis you get one email per day that you have to reply to with a list of the things that you’ve done that day. So until you get that email, you have to remember everything you’ve done that day, while GTD is about not doing that.

Alfred app Extension

That is where Alfred comes in. It is an app-launcher that boosts your productivity. Alfred provides short-cuts to apps and actions within apps, like “new e-mail” in your e-mail client. Alfred can easily be extended with custom scripts. I made a really simple extension that makes it possible to immediately add an action to your iDoneThis list. Therefore you don’t have to remember that list of things you’ve done. What it actually does is send an email to iDoneThis with your completed action. So instead of sending one email a day, you send multiple emails per day with your completed actions separately.

Technical explanation

This is just a short look into the guts of the script. You can skip this if you’re not a nerd.

<!--?php
$argumentCount = count($argv);
 
$sender = $argv[1];
$headers = 'From: ' . $sender . "\r\n";
 
if($argumentCount --> 3) {
  $to = str_replace(' ', '-', strtolower($argv[2])). '@team.idonethis.com';
  $subjectIdentifier = $argv[2];
  $message = $argv[3];
} else {
  $to = 'today@idonethis.com';
  $subjectIdentifier = 'Personal';
  $message = $argv[2];
}
 
$subject = 'Re: '. $subjectIdentifier . ' digest for ' . date("F d");
 
mail($to, $subject, $message, $headers);

This is done with a PHP script which is called by Alfred ( idonethis.php ).

How to install
Prerequisite: Alfred with Powerpack

  1. Download the extension
  2. Double click on the extension
  3. Click on import
  4. Now you see something like this:
  5. Replace EMAIL_ADDRESS and PROJECT_NAME with the email address and project name that you use for iDoneThis. If you leave out PROJECT_NAME (so {query} follows your email address) you can post to your Personal iDoneThis list. (Thanks Rudy Jahchan for the addition!)
    php idonethis.php "my-email-address-that-is-use-@-iDoneThis" "iDoneThis project-name" {query}
  6. Click save

Now you can add tasks to your iDoneThis list by using your Alfred activation short-cut and typing “idid”.

Press space and type what you did, followed by enter.

A few seconds later, the task is added to your iDoneThis project. Check your email address and project name from point 5 of the installation instructions if it’s not working.

Fix for Mountain Lion

If you’ve upgraded your Mac to Mountain Lion you may notice that this plugin no longer works. Apple messed up some settings with sendmail, which PHP uses to send the emails with. Luckily this is pretty easy to fix: start Terminal and run the following commands (Found on StackOverflow):


sudo mkdir -p /Library/Server/Mail/Data/spool
sudo /usr/sbin/postfix set-permissions
sudo /usr/sbin/postfix start 
Tagged

26 Responses to Alfred App + iDoneThis for logging your todo’s, GTD style

  1. Walter says:

    Awesome job, guys! We’d love to feature this over at iDoneThis. I will reach out!

  2. Rudy Jahchan says:

    Great idea but it doesn’t seem to be working for me. I switched it out of “Silent” mode to see what is wrong and saw the following output (FYI I replaced my real email address with EMAIL_ADDRESS before I pasted it here to maintain my privacy):

    ~ $ php idonethis.php EMAIL_ADDRESS "Personal" "see what happened?"
    Could not open input file: idonethis.php

    Any ideas what’s going on and how I can remedy it? Thanks!

  3. Hey Rudy, has your problem been fixed by the pull request you made? Let me know!

  4. Felix says:

    Hey Wouter,
    thanks for putting the instructions back up!
    greetings,
    felix

  5. Eric Lubow says:

    From someone who uses iDoneThis every day (and the entire team does as well), this is an awesome feature. Most of the team uses Alfred too, so it’s a natural harmony. Good work.

  6. Bakari says:

    Hmm, this is not working for me. I got set up like this:

    php idonethis.php [my email address for idone] {query}

    I saved the plug-in and everything. Any suggestions?

  7. Todd Clarke says:

    I am getting the same error as Rudy above.

    The output shows that the php file could not be opened.

    ~ $ php idonethis.php EMAIL_ADDRESS “Personal” “see what happened?”
    Could not open input file: idonethis.php

    What up please?

  8. Hey Bakari and Todd,

    I uploaded a new version to the downloads archive: https://github.com/wouter-de-boer/iAlfredThis/downloads.

    This should enable personal lists when installing the downloadable .alfredextension.

  9. Bakari says:

    Dennis, thanks for the update. But it still doesn’t work for me. It actually worked once, but when I try it again, it simple will not work. I still set up the code like this: php idonethis.php [my email address for idone] {query}

  10. Todd Clarke says:

    Hi Dennis,

    I too am getting the exact same behavior as previously…

    php idonethis.php “blablabla@mydomain.com” “Personal” “test”
    Last login: Fri May 25 21:57:23 on ttys000
    Macintosh-001b639bcf3d:~ Todd$ php idonethis.php “todd@fireundereverybutt.com” “Personal” “test”
    Could not open input file: idonethis.php
    Macintosh-001b639bcf3d:~ Todd$

  11. Todd Clarke says:

    Hi Dennis,

    Any ideas why this is not working based on my comments above?

    Thanks.

    Todd

  12. Todd Clarke says:

    No more responses to my dillema, Dennis?

    Would love to get this to work.

    Thanks.

    Todd

  13. DIps says:

    @Todd Clarke

    It wasn’t working for me either. I ended up creating an AppleScript within Alfred:

    on alfred_script(q)
    set donethis to q
    tell application “Mail”
    set MyEmail to make new outgoing message with properties {subject:”A new thing I did today”, content:donethis}
    tell MyEmail
    make new to recipient at end with properties {address:”today@today.idonethis.com”}
    send
    end tell
    end tell
    end alfred_script

  14. If this plugin stopped working for you in Mountain Lion, you can find a fix at the end of the post :)

  15. Rachael Brown says:

    I still can’t get this to work in Mountain Lion. When I run the script I get told that there is a problem with the second line (i get the following “chown: /usr/share/man/man1/postalias.1.gz: No such file or directory”)

    Does anyone have a fix? I would really like the integration with Alfred

  16. Todd Clarke says:

    I have still never gotten this to work on Snow Leopard. Sux, man.

    I always get the message: Could not open input file: idonethis.php

    WTF Gives?

  17. David Kong says:

    Oh wow – I wish I had read this before buying power pack. I really wanted to use this, but it doesn’t work on mountain lion. I did the fix and it still doesn’t work.

  18. David, does it work when you start postfix like this: sudo postfix start

  19. Tim Beyers says:

    Hi everyone,

    I’m running OS X Lion and can’t seem to make the extension work. I’ve run the Mountain Lion fix per above with no luck.

    Settings:

    php idonethis.php EMAIL_ADDRESS “Personal” {query}

    Output:

    Macintosh-7:~ tbeyers$ php idonethis.php EMAIL_ADDRESS “Personal” Test for publishing
    Could not open input file: idonethis.php
    Macintosh-7:~ tbeyers$

    Thoughts?

  20. Vincent Oord says:

    What do the file permissions for your idonethis.php file look like Tim?


    $ ls -al idonethis.php

  21. Tim Beyers says:

    Here’s what I get after reinstalling and running the extension:

    $ ls -al idonethis.php
    ls: idonethis.php: No such file or directory

    Do I need to restart my Mac perhaps? (Not sure if it needs a fresh reboot to install the file.)

  22. Tim Beyers says:

    So, same problem after a fresh reboot. Executing ls -al idonethis.php brings up “No such file or directory.” Is there anything else I can do?

  23. Tim, in what directory are you executing the command? Make sure the file is in the same directory as the one you are executing the command in.

  24. Tim Beyers says:

    Hi Dennis,

    >>Tim, in what directory are you executing the command? Make sure the file is in the same directory as the one you are executing the command in.

    Can you be more specific about how I check this? Right now, all I get is the Bash output I’ve already posted.

    Thanks much,

    Tim

  25. GRer says:

    See @DIps and @Todd Clarke

    Works great!
    1. When you copy and paste, replace quotes.
    2. If you have more than one email account, use “name of every account” as a one liner to Mail to get list of email accounts.

  26. Gavan Watson says:

    With Alfred v2.x, I’d love to be able to add this extension, but it’s my understanding that Alfred has replaced extensions with workflows. Any chance this will be updated to support v2?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>