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.
You'll need a .todo file (default location is $HOME/.todo); the -f option selects a file). Each line of this file should be:
- A comment (line starts with a #; ignored by the program)
- A category (just a name in square brackets)
- A todo item (format described later)
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.
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 [birthdays] a15 2014-06-11 Alice's birthday a12 2014-06-08 Bob's birthday
Produced from the above file on 2014-06-05:
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.
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-types=TYPES Only include these types (string of letters) --appointments Shows appointments only (equivalent to --only-types=a --ex-types=EX_TYPES Exclude these types (string of letters) --only-cat=ONLY_CAT 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. --ex-cat=EX_CAT Exclude these categories (comma delimited) --two-lines Newline before description (i.e. description is on its own line)
--ex-cat=Choreswhen not at home or
--only-cat=Billswhen at the bank. I have aliases for my home, work and uni computers to only show the relevant categories for where I'm sitting.
rastodo --ex-types=a --sort-cat; rastodo --app -d 7
-d 2 --ex-types=wcan be set up to mail you if anything is due in 2 days (excluding "wishlist" items).
xrootconsolecan be used to display your todo in the root window, or if you have spare screens use a while loop and a spare terminal. Piping output through wc can be used to count items and display "You have 2 things due today!" for a ticker widget or when you start a new terminal.