I keep both work and personal to-do lists in Todoist, to which I refer frequently on a daily basis. This past weekend, Todoist was down for something like 12 hours; from what I subsequently read online, it’s not the first time it has gone down.
I can cope without access to my to-do lists for 12 hours, but what scared me about this outage was the realization that my to-do lists are only in Todoist. If it were to suddenly go away for a more than a day, or if (horror or horrors!) they suddenly went down forever, all my data would be lost. That’s not OK.
Many other people have this same concern and have begged Todoist to provide a mechanism for exporting their data to back it up somewhere. Thus far, the closest they’ve come to this is supporting offline use in their iPhone / iPod / iPad app, which is better than nothing, but not good enough.
So I wrote my own. It’s a Perl script you can download here. Here’s the documentation:
NAME
todoist-fetch.pl – Simple todoist backup / restore script, to reassure you that you won’t lose all of your data if Todoist suddenly goes belly-up.
SYNOPSIS
todoist-fetch.pl [--help] [--manual] [--project=project] [--username=username] [--password=password] –text | –reorder [input-file] | –backup [--nocompleted]
DESCRIPTION
Modes
This script has three modes:
- –text Fetch all of the items in a specific project and print them one per line, including the item ID and content for each item.
- –reorder Read a list in the format produced by –text and reorder the project so it matches the (presumably reordered) list.
- –backup Fetch all of your project and item data (not notes or labels, since I don’t use them, but patches are welcome
and print them in JSON format with some text annotations explaining what the various JSON blobs are.
Backup notes
The format of the backup mode output isn’t intended to be particularly user-friendly, or easy to read, or easy to import into another application. If/when you need to do anything real with the data, you’ll probably need to write another script to convert it into something useful. All it’s intended to do is snapshot your data so you’ll have it in an emergency.
Backup mode uses a non-public API call, because the public API doesn’t allow all completed tasks to be fetched except for premium users, and I’m not a premium user. If the folks at todoist change the non-public API, this will break.
OPTIONS
Other options in addition to the mode options described above:
- –help Print usage message and exit.
- –manual Print entire manual and exit.
- –username (or set $TODOIST_USERNAME) Specify Todoist username.
- –password (or set $TODOIST_PASSWORD) Specify Todoist password.
- –project (or set $TODOIST_PROJECT) Specify Todoist password for –text or –reorder.
- –nocompleted Don’t export completed items in backup.
AUTHOR
Jonathan Kamens <jik@kamens.us>. Please feel free to contact me with questions, comments, or suggestions! Also, please consider making a donation at http://blog.kamens.us/support-my-blog/ to support future development of this and other free tools.
COPYRIGHT
Copyright (C) 2012 Jonathan Kamens. Released under the terms of the GNU General Public License, Version 3 or any subsequent version at your discretion. See http://www.gnu.org/copyleft/gpl.html.
VERSION
$Id: todoist-fetch.pl,v 1.5 2012/01/24 19:34:17 jik Exp $
![[Digg]](http://blog.kamens.us/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://blog.kamens.us/wp-content/plugins/bookmarkify/facebook.png)
![[Email]](http://blog.kamens.us/wp-content/plugins/bookmarkify/email.png)

