Day One Meet Memento Final Chapter

Day One Meet Memento Final Chapter

I mentioned yesterday that I’d successfully added my Twitter posts to Day One and that now I only needed to add Remember The Milk and I’d be satisfied. Today, I think I’ve succeeded.

Back in 2008, Yves Rütschlé released a command line tool for Remember The Milk written in Perl. It uses the WebService::RTMAgent and also requires Date::Manip. Once those modules are installed and you’ve authorized the program, it’s simple to pull the items you’ve completed today.

# rtm -f completed:today  
0: Check connection report  
1: Trash day  
2: Copy drivers license  
3: Seriously, it's trash day

Given this, I’ve written the following Perl script to add my completed items to Day One.

#!/usr/bin/perl -w  
use strict;  

my @complete = `/Users/stephen/bin/rtm -f completed:today`;  
my $message = '';  

if (scalar @complete == 0)  
    $message = "RTM: No items completed today.";  
    $message = "RTM Completed Today:\n";  
    foreach my $item (@complete)  
        $message .= $item;  

`echo \"$message\" | /usr/local/bin/dayone new`;  

All I have to do is add this to crontab to run nightly and I’m good to go.