My Todo.txt Workflow, including Unison, Todour and Android
Published: 24-07-2013 | Author: Remy van Elst | Text only version of this article
Table of Contents
What is Todo.txt
Todo.txt is a way to manage your tasks/todo items in a plaintext format. It hasa few simple rules, there are a lot of applications to work with it, but in itscore it is a plaintext file, so a text editor is sufficient to use it. RecentlyI started using todo.txt, including syncing on all my devices via my ownservers. This article shows you my workflow, and how to set up a similarenvironment, including ssh, unison, todour for OS X, DayTasks for Ubuntu andSimpletasks Cloudless (for Android).
In this article I'll describe the applications I use and afterwards describe thesync setup I have with unison and Foldersync lite. Most of the applications areopen source, except for Foldersync on Android.
Why Plain Text
Plain text is software and operating system agnostic. Its searchable, portable,lightweight and easily manipulated. Its unstructured. It works when someoneelses web server is down or your Outlook .PST file is corrupt. Theres noexporting and importing, no databases or tags or flags or stars or prioritizingor [Insert company name here]-induced rules on what you can and cant do with it.More
Todo.txt is a plain text file, but to take advantage of structured task metadatalike priority, projects, context, creation and completion date, there are a fewvery simple but flexible file format rules.
These rules make the todo.txt file both readable by humans, and easily parsed bytools like the Todo.txt Touch mobile app and Todo.txt Command Line interface.This format has been developed and refined over the course of 5 years by theTodo.txt community of users and developers.
- A single line in your todo.txt text file represents a single task.
Write Todo.txt Article
- If priority exists, it ALWAYS appears first.
(A) Write Todo.txt Article
- A tasks creation date may optionally appear directly after priority and a space.
(A) 2013-05-01 Write Todo.txt Article
- Contexts and Projects may appear anywhere in the line after priority/prepended date.
(A) 2013-05-01 Write Todo.txt Article @website +article
- A completed task starts with an x.
x (A) 2013-05-01 Write Todo.txt Article @website +article
- The date of completion appears directly after the x, separated by a space.
x 2013-05-29 (A) 2013-05-01 Write Todo.txt Article @website +article
My workflow is very simple. I have a few desktops and a few phones and I add andremove tasks/todo items on all those devices. By using a central SSH server tohelp with the syncing, unison on the desktop and SimpletasksCloudless/FolderSync on my Android phones.
Since I use multiple operating systems, I also use multiple programs withtodo.txt On Ubuntu/Arch Linux I use DayTasks, on Mac OS X I useTodour, and mixed between machines I use the todo.txt commandlineinterface.
Syncing is done via Unison to an SSH server, the setup of it is described laterin this article.
Mac OS X
Todour is a cross-platform (Mac OS X and Windows) application written in QT tomanage todo.txt files. It is small, simple and works well. I like the refreshbutton, this works very good with my sync process. It also has an Archivebutton, which moves tasks to a done.txt file, which is handy. Search is alsostraight forward and fast, including contexts and projects. Setup is simple,download, unpack/install and done.
Arch and Ubuntu Linux
Daytasks is also a simple todo.txt manager, having most of the features ofTodour. It also supports the same done.txt file as todour, so that is very nice,the search is just as fast and the interface is clean. It doesn't have a refreshbutton, so when I sync from another device I have to close and start theapplication. Not a big issue, could be fixed. On Arch Linux I had to manuallyinstall the .deb package, but it just works afterwards.
On the mobile side I use two applications, Simpletasks Cloudless to use the tasklist, and Foldersync lite to sync the todo.txt file.
Simpletasks is available in two versions, one using Dropbox and one using justthe local file system. I use the latter one, because I take care of theunderlying sync. It has a very nice view with projects and contexts, and whenadding a task it allows you to select previously used projects or contexts,which results in less typing on a mobile phone. It does not have an archivingfunction, but since my android phones are used for ad-hoc adding of tasksmostly, that is not an issue.
Foldersync is used to sync the todo.txt file via ssh back and forth with theother devices. I have it set up to sync every 30 minutes, but the sync time canvary. It supports SSH with a private key (keys with passwords as well). Youfirst set up your account, then you set up a folder pair to the remote server,with two-way sync, including subfolders, hidden files, and as action for"Conflicting Modifications" you select "Overwrite Oldest". That's it, set up andforget.
For usage on the go, or on other computers when I don't have my phone with me, Iuse a HTML5 web application. It is also used when I'm in plannings, meetings andother business related events on a projector. As you can see, it supportspriority, sorting, contexts and projects. Works just fine, in all modernbrowsers like Firefox, Safari and Chrome. It is a simple HTML5 application, opensource and requires no PHP or Ruby on the server side.
I'm using a VPS server to sync the todo.txt file on all the above mentioneddevices. It has SSH enabled, allowing only public-private key login. The serverand all the *NIX clients use Unison to sync all the files. You can install it onDebian/Ubuntu with apt, and on other distro's it is in your repository:
apt-get install unison
Next make sure you have a folder to use for syncing, e.g. where your todo.txtfile is located:
Next, on your local machine also create a folder to use for syncing. Also makesure you can login with your private key. Then try the first sync:
unison -prefer newer -batch -ui text ~/todo/ ssh://vps.example.org/sync/
If this works, then you are almost done. Set it up as a cronjob:
crontab -e*/5 * * * * unison -prefer newer -batch -ui text ~/todo/ ssh://vps.example.org/sync/ >> ~/unison.log
This will log to
~/unison.log for troubleshooting, and sync your todo.txtevery 5 minutes.
If you are on OS X, the above cronjob might not work because it doesn't detectthe ssh-agent (because OS X prefers launchd over cron...). You can use thiscronjob, that will work:
*/5 * * * * declare -x SSH_AUTH_SOCK=$( find /tmp/launch-*/Listeners -user remy -type s | head -1 ) && unison -prefer newer -batch -ui text ~/todo/ ssh://vps.example.org/sync/
With the above described setup you can have your todo/tasks everywhere, anytime,self hosted in a usable and future proof format. It works very well for me, andI hope it does for other people too.
- SimpleTasks Cloudless for Android
- FolderSync Lite for Android
- ToDour for OS X
- DayTasks for Ubuntu/Arch
- Vim Plugin for Todo.txt
- Unison File Syncronizer