Backup To-Do

by Erik Demaine

Backup To-Do is a Python script for saving all your Toodledo tasks as well as folders, contexts, goals, and locations. (No notebook support yet; email me if you want it.) If you set it to run ever day, say, you get regular incremental backups: the script only downloads changes since the last backup.

My main purpose for writing this script was to avoid losing completed events, which expire after some time in Toodledo (depending on your subscription level). The side benefit is that you back up the cloud storage, in case Toodledo has a catastrophe, or you accidentally make a change that can't be undone on the web.

Download

Usage

Just run backuptodo.py in the usual way you run Python scripts. (Double clicking the file should work on Windows and MacOS.) Or, ideally, set it up to run daily.

The first time you run the script, it will ask for your Toodledo email and password. If you choose, this information can be stored and re-used from the file account.json. (This is probably necessary to schedule regular backups.) You can replace this file (or never use it) if you'd like to back up multiple accounts.

Backup Format

The software stores the sequence of updates in the text file backuptodo.db/backup-your@email.txt. Each line is a JSON object with a TYPE field specifying whether it is a task, deleted_task, folder, context, goal, or location. The other fields are as in the Toodledo API 2.

Note that the backed-up data is not especially user friendly. But at least the entire history is all there, even if something gets deleted or edited, and it would be easy to write code to process this information however you'd like. (If you write some code for display or statistics or whatever, please send it along for possible inclusion on this site!)

Toodledo Python API

Included in the source code is toodledo.py, which provides a convenient Python interface to the Toodledo API 2. Feel free to use it in your projects, subject to the license below. Currently it only supports getting objects, not adding, updating, or deleting objects. (Email me if you want these features. They would be easy to add.) Note that, to properly cache session keys and so on, toodledo.py uses a Berkeley database.

Related is Poodledo, which supports more features, but only supports version 1 of the API (so may no longer work), and doesn't cache session keys and so on. A newer version may fix all of these issues.

License

This software is free in both senses of the word. The source code is available under MIT license.

Last updated November 24, 2011 by Erik Demaine.