Rolling your own todo.txt

Todo.txt is not a complicated todo list software application, it is as minimal as it can be: one plaintext “todo” file, and a CLI script for it.

The file syntax is what you would expect if you look at your current todo file (I’m sure you have one somewhere :P), but with added goodies such as +tags, +locations, due dates, priorities, etc. Here’s an example of one:

(A) very important task +test
(B) somewhat important task +test
(C) somewhat important task +test @work due:2014-04-12 t:2014-04-12
2014-04-11 little task +next

Let’s set up this todo list solution in a desktop and an Android phone.

Desktop

Install todo.txt-cli. Download the latest stable release and set up for your shell. You can see my install on my dotfiles repo, todotxt dir:

  • bin/ Contains the todo.txt-cli scripts. If you need to bump its version, just paste them here.
  • addons/ Go figure.
  • .todo.symlink/: Contains the txts for todo, done & report tasks. This dir is unstaged on the dotfiles repo for privacy. With my dotfiles symlinking, it will land in ~/.todo
  • aliases.zsh, completion.zsh, path.zsh: For hooking up todo.txt with the shell.
  • todo.cfg Well, todo.txt’s config file.

I have some addons installed, that add new commands:

  • edit: Open todo.txt in $EDITOR.
  • revive: Restore tasks from done.txt.

Once installed, let’s add some terminal goodies, which I found here. I have added a todo count on my right prompt of my zsh terminal. You can take a look at my prompt.zsh to see how it’s done, it’s pretty straightforward. Currently I’m using it to display counter of tasks with the “+next” tag:

Simpletask terminal

If you don’t like using it by terminal, you can try this Gnome Shell Extension client.

Also, consider installing the Sublime Test’s Todo.txt syntax package.

Android

The best todo.txt Android app I have found is Simpletask, which is open source and on F-droid. Download and install it. This app is simply perfect: stylish (with a Holo theme) easy & feature full. It also has a widget, take a look at it:

Simpletask widget

Syncing

We are going to use ownCloud for syncing the todo.txt and done.txt files.

Desktop

Install the ownCloud client with sudo apt-get install owncloud-client. Execute it and configure it, is pretty straightforward. After that, make symlinks between ~/.todo/ files and the ownCloud files (by default in ~/ownCloud/).

Android

The setup is a bit difficult on Android. The oficcial ownCloud Android app does not sync files and keep them up to date, it copies the files to the Android’s ownCloud dir and sync those. Because the filesystem is fat32, we cannot make a symlink, and instead of fiddling with mounting directories around, we are going the privative Foldersync.

The Android Foldersync configuration is a bit sketchy. Here it goes:

  1. Add a WebDAV account, and fill it this way:
    • Protocol: https
    • Server Address: www.yourownclouddomain.com
    • Start Folder: /remote.php/webdav
    • Port: <Leave Blank – Unless there is a Non-default port>
    • Use expect-continue: Leave this box checked
    • Login Name: [use the account name that you setup for your private owncloud]
    • Password: [Only you know this]
  2. Press test connection, and if succeedes, save it.
  3. Create an event with the following options:
    • Remote dir: /todo/
    • Local dir: /storage/sdcard0/data/nl.mpjanssen.simpletask (look in simpletask for your path)
    • Sync type: double sided
    • Program the automatic sync for every hour (or never, and use a widget)
    • sync subdirs
    • sync deleted files
    • always overwrite old files
    • if conflicted, overwrite old
    • use wifi, use 3g, use 2g
    • notify meanwhile syncing
Víctor Cuadrado Juan

I'm Víctor Cuadrado Juan, a developer and FOSS enthusiast, in love with Linux. Currently living in Nürnberg, Germany. Feel free to waste your precious time around here, or to contact me.