Exporting Remember the Milk data to CSV

Published

Photo CC-BY by johanl



Remember the Milk, RTM for short, is a popular web-based todo list manager. You can access your tasks in your browser, through an app and they provide a print template. Exporting the actual data is a bit more cumbersome: They consider iCalender to be the primary backup mechanism and the only other thing they provide is an Atom feed but the content is a bunch of tags. Nothing you'd want to parse.

However, they also provide an API and David Waring has made use of it with his rtm-cli python script. With very little effort I was able to amend his script to include a function to create a csv file for all general RTM fields without notes. Since it's based on his ls function, you can use rtm-cli's general filtering functions. If you wanted to export all unfinished tasks you would execute the following:

$ python rtm -c csv

It would create a UTF-8 file output.csv in your working directory with a structure as such:

ID;List;Title;Completed;Priority;Due date;Tags;Link;
123;"Inbox";"Error reporting broken";;N;;;"http://www.example.com";
124;"Inbox";"Login problem";;N;2013-06-14T00:00:00+02:00;"mysql,apache";;
125;"Inbox";"Add web service";;N;2013-07-21T00:00:00+02:00;;;
126;"Inbox";"Fix IE8";;N;;"ie";"http://www.example.com";

You can get the code through a forked repository. If this exporter worked for you, you could let the maintainer of rtm-cli know by choosing Approve in the pull request

2013-06-24 Update: The maintainer has accepted the pull request.

2013-07-09 Update: If you encouter problems like Tyler with a missing rtm module, make sure you have pyrtm installed (e.g. pip install pyrtm)

Let me know if notes is something you'd need to export, too.