Don’t lose your data if Todoist goes away

By | January 24, 2012

UPDATE [2012-12-10]: I’ve updated the script with the new login URL shown in the comment below.

UPDATE [2012-12-10]: I’ve added a new “–import” option to the script for importing a text file listing to-do items into a project.

UPDATE [2012-12-10]: I’m not using Todoist anymore. I’ve switched to Toodledo, which I’m much happier with. You should check them out!

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] | –import [input-file] | –backup [–nocompleted]

DESCRIPTION

Modes

This script has four 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.
  • –import— Read a list of to-do items and import them into the specified project.Blank lines are ignored; all other lines are considered to-do items.Whitespace indentation in the input list causes indented to-do items.The use of tab indentation is discouraged, but if it is used, then tab stops are assumed to be eight spaces apart.Be consistent in indentation or the results may be confusing.
  • –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, –reorder, or –import.
–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.8 2012/12/10 16:10:26 jik Exp $

Print Friendly, PDF & Email
Share

4 thoughts on “Don’t lose your data if Todoist goes away

  1. Rick Carter

    Hi,

    I’ve been using Todoist for a bit now, and I was curious if you could talk about Toodledo vs. Todoist a bit, what you saw as the improvements. I like Todoist but I don’t *love* todoist (despite having paid for a year of the extra features). Todoist now lets you do backups but one negative is it doesn’t appear that it backs up your completed projects where I might want to refer to old notes.

    Reply
    1. jik Post author

      I honestly don’t remember at this point all of the problems I had with Todoist; I stopped using it a long time ago.

      I think the two biggest issues were the fact that they didn’t provide any sort of backup mechanism; and the fact that they seemed to longer, more frequent outages than I thought acceptable. You say they’re providing the ability to do backups right now, so that’s an improvement, and who knows, perhaps they’ve gotten better about downtime.

      There are too many things I like about Toodledo to be able to list them all, but one thing that is worth noting is that Toodledo’s API supports synchronization, so that, e.g., you can use a to-do app on your phone that integrates with Toodledo and see and manipulate your entire to-do list even when you’re away from network access.

      One thing Todoist has (as I recall) that Toodledo doesn’t is the ability to prioritize items by dragging and dropping them, so if that’s a very important feature for you, you may wish to stick with Todoist.

      Reply
  2. Hector

    Thanks for such a good script!

    Unfortunately the API has changed. You should update the line 157 with:
    http://todoist.com/Users/showLogin?mini=1

    It would be also great to warn users to install the following perl modules:
    sudo apt-get install libjson-perl libwww-mechanize-perl libterm-readpassword-perl

    Would there be an option to backup all the projects without having to specify them one by one?

    All the best,
    Hector

    Reply
    1. jik Post author

      Unfortunately the API has changed. You should update the line 157 with:
      http://todoist.com/Users/showLogin?mini=1

      Fixed in the new version I just uploaded.

      It would be also great to warn users to install the following perl modules:
      sudo apt-get install libjson-perl libwww-mechanize-perl libterm-readpassword-perl

      I think that anybody who can’t figure out how to install missing Perl modules probably isn’t a good candidate for using this script. 🙂

      Would there be an option to backup all the projects without having to specify them one by one?

      I’m not using Todoist anymore — I’ve switched to Toodledo, which I’m much happier with — so I’m not going to be doing any more feature development on this script. Note, however, that before I stopped using Todoist, I added a “–import” mode to the script, which is included in the new version I uploaded today.

      Reply

Leave a Reply

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