rastodo - Text Based TODO List Application

[Last 5] [Last 10] [Index] [RSS Feed] [Full .plan]
Contact Me
Todo Chart (aka: How busy is Dylan?)


ZFS Timeline Forensics
Honours Thesis
BSDCan 2014 Presentation
ZFS/ZDB Plaso Parsers


C and C++
more notes...


Assorted little scripts and apps.
Commandline/Android ToDo list stored in a text file.
Android Apps
more software...

Game Mods

A Max Payne 2 mod - more realistic and deadly.
more mods...


C Helpdesk Resources
Customising Your CS Account
more RMITCS stuff...

Roleplaying Games

Shadowrun Notes(4th ed)
Heavy Gear Notes(2nd ed)
more RPG stuff...


Examples of my University work.


Old Image Gallery
Trombone slide position chart [PDF]


Rastodo/Rastatodo is a cross-platform Python script which parses a text file containing "To Do" items and displays them in the order of urgency and importance.

The program: rastodo.py revision 244 (released 2014-08-02). There is a very short changelog.


  • Simple flat text file storage. Easy to edit many items, and you can use your own backup/version control/synchronization systems to control how you want to manage the file.
  • Supports multiple "types" of TODO list items, including appointments, "sleeping" items which won't appear until a specified time, "wishlist" items without a due date and more.
  • Supports ANSI colour output when run from a terminal/console and a GUI interface on Android.
  • Output can be sorted and filtered by type, category and/or priority; can be piped into other programs to produce visual/audio reminders or other notifications.
  • Doesn't forget or ignore items which go past their due date, so you won't either.
  • Written in 100% Python, with the same script supporting both the *nix commandline and the Android GUI.

.todo File Format

You'll need a .todo file (default location is $HOME/.todo); the -f option selects a file). Each line of this file should be:

  • blank
  • A comment (line starts with a #; ignored by the program)
  • A category (just a name in square brackets)
  • A todo item (format described later)

Todo item Format

Entries are whitespace separated:

<type><[priority]> <[date YYYY-MM-DD]> <description, can have spaces and tabs>

Some types do not have a priority, some don't have a date, some have both or neither.

Item types are represented by a single char:

t - Todo
No priority, simply has a date by which it must be done. Equivalent to the old todo.c usage. Recommended for most things that have a definite due date.
s - Sleeping
Priority is the number of days proximity before it is shown in the output. Recommended for things you don't need to do or think about until it is nearly due, like taking the bins out on Sunday night.
a - Appointment
These are handled the same as sleeping items, but as you can filter on type this lets you easily show only appointments in the output. They also display the Weekday in the todo entry.
c - Constant
No date, the priority is number of days away this item is "due". Recommended for things which don't have a definite due date and can be pushed back.
w - Wishlist
No priority, No date. Wishlist items are effectively infinity days away but are always shown (unless turned off with the exclude types = wishlist option).

It is anticipated that more types will be added, in particular I intend to add recurring (r) and followup (f) items.

Sample .todo file

c0 always today (this doesn't have a category)
c1 always tomorrow (this doesn't have a category either)

[CS101   ]
t  2014-06-03 week 1 lab report
t  2014-06-10 week 2 lab report
[CS134   ]
c0 see lecturer about something asap
t  2014-06-13 assignment 1 due
t  2014-07-23 assignment 2 due
[CS123   ]
a2 2014-06-05 12:30 appointment with lecturer about project
t  2014-06-15 project report 1 due

# This is a comment...

[new types]
a3 2014-06-07 doctor's appointment
s0 2014-06-06 do backups (s0 - this appears only on the day)
s1 2014-06-06 backups tomorrow! (this first appears the day before)
c2            fix something soon
w             fix something whenever

a15 2014-06-11 Alice's birthday
a12 2014-06-08 Bob's birthday

Sample Output

Produced from the above file on 2014-06-05:

Rastodo on Android

An unattractive but functional Android GUI is included (using list dialogs). The same script can be used from a terminal and on a droid device - it will use the GUI if it can import the Android module, otherwise it will use text output.

To run Python scripts on Android you will need Scripting Layer for Android (SL4A): https://code.google.com/p/android-scripting/

The default todo file location on Android is /sdcard/svncos/dotfiles/todo - because thats where I keep it (svncos is my Subversion directories). You might want to modify this or create a shortcut with the -f option to use another location.

Using the Droid GUI

Tap a category to view entries within that category, then back to return to the list of categories.

Pressing back at the category list will quit the script. Selecting an individual todo entry also quits the script at this stage, however in future versions this will open a dialog that lets you edit or delete that entry.

The lists are sorted with highest priority/urgency at the top.


Use the -h option to the script for a full list. The list below may be out of date.

You can use a partial long argument as long as it is unique (e.g. "--app" or even "--ap" instead of "--appointments")

-f FILE, --file=FILE
 File to parse (defaults to $HOME/.todo)
-e, --edit Invoke your $EDITOR on todo file
-r, --reverse Reversed order of sorting
--mono Monochrome output
--sort-cat Group by category
--all Shows all items, regardless of date and filtering
-d DAYS, --days=DAYS
 Days after which item will not be included
 Only include these types (string of letters)
--appointments Shows appointments only (equivalent to --only-types=a
 Exclude these types (string of letters)
 Only include these categories (comma delimited) NOTE: As shown in the example above, if you put rightmost spaces in categories so they line up neatly in the file, you must do so on the command line as well. This may be changed in the future to ignore whitespace.
 Exclude these categories (comma delimited)
--two-lines Newline before description (i.e. description is on its own line)



Dylan Leigh (http://www.dylanleigh.net)

Rastodo is a much-improved Python rewrite of Dylan's "Rastatodo" todo.c which was itself based on Emil Mikulic's todo.c (http://dmr.ath.cx/code/todo/todo.c).

Generated Sat, 17 Jan 2015 11:14:42 +1100
Copyright © 2002-2014 Dylan Leigh.
[HTML 4.01 Transitional]