
etm is an acronym for Event and Task Manager. It provides a format for using simple text files to store event, task and action information, a command line interface for viewing tasks and events in a variety of convenient ways and a curses-based GUI for creating and modifying events and tasks as well as viewing them. Alarms are supported for events and repetition for both events and tasks in a powerful and flexible manner.
Sample entries
A sales meeting on the 25th of the current month from 9:00am until 10:00am with a 5 minute early warning alert:
* sales meeting @d 25 @s 9a @e 10a @a 5
A reminder to prepare a report for the meeting beginning 3 days early:
+ prepare report @d 25 @b 3
A record of spending 35 minutes preparing the report on the 23rd:
~ report preparation @d 23 @p 35
A reminder to get a haircut on the 24th of the current month and then [r]epeatedly at (d)aily [i]ntervals of (14) days and, [o]n completion, to (r)estart from the completion date:
+ get haircut @d 24 @r d @i 14 @o r
| Name | Last modified | Size | Description | |
|---|---|---|---|---|
| Parent Directory | - | |||
| Actions.html | 22-Nov-2009 14:50 | 5.8K | ||
| CHANGES | 22-Nov-2009 15:51 | 18K | ||
| FAQ.html | 22-Nov-2009 14:50 | 9.8K | ||
| TimeReports.html | 22-Nov-2009 14:50 | 17K | ||
| etm-297.tar.gz | 20-Sep-2009 19:52 | 52K | ||
| etm-389.tar.gz | 22-Nov-2009 15:51 | 52K | ||
| etm-eg-389.tgz | 22-Nov-2009 15:51 | 2.0K | ||
| etm-tests-297.tgz | 20-Sep-2009 19:52 | 5.7K | ||
| etm.scpt | 22-Nov-2009 15:51 | 1.0K | ||
| etm.sh | 22-Nov-2009 15:51 | 39 | ||
| examples/ | 26-Feb-2009 13:10 | - | ||
| images-new/ | 22-Nov-2009 14:51 | - | ||
| images/ | 24-May-2009 12:37 | - | ||
| version.txt | 22-Nov-2009 15:51 | 4 | ||
Contents
Nearly all of the code has been rewritten and simplified with associated performance improvements. Screen displays in the gui version are now cached.
All supporting files are now contained in the single '~/.etm' directory:
~/.etm/
data/ # the default location for etm data files
ical/ # the default location for iCal exports
etmalerts # warning alerts for the current day
etmlock # lock file (when the background alerts process
is running)
etmrc # configuration settings (formerly ~/.etmrc)
Command line options have been simplified:
h Show this help message
n Display the latest available version of etm
w Start the wx(Python) based gui version of etm
b [B] Display busy/free times using command line options [first
prompting for options and displaying help information].
l [L] Display a list of events, actions and tasks using command line
options [first prompting for options and displaying help
information].
r [R] Display a reckoning of time spent in events and actions
using command line options [first prompting for options and
displaying help information].
a [A] Display the agenda using command line options [first prompting
for options and displaying help information].
The old curses-based gui has been replaced by a wx(Python) based gui:
- The new gui runs under MS Windows as well as Linux and OS X. The old curses based gui did not work under Windows.
- The display has been simplified. The context, project and id columns have been removed and are now shown with other 'details' in a second line the display of which can be toggled off and on. The screenshot below shows the 'details' view. Other screenshots are in the images-new directory.
- The entry bar now automatically expands by adding lines when needed.
- Entry and display of unicode characters is supported.
- When creating/modifying new projects, events, tasks and actions, the relevant usage information is automatically displayed above the entry bar.
- In the entry bar, pressing <backquote>-d pops up a calendar for date selection. Similarly, pressing <backquote>-c pops up a selection list of previously used contexts and <backquote>-k pops up a selection list of previously used keywords.
- In setting options for the standard agenda, list, busy and reckoning views, pressing <backquote>-h pops up a list of previously used view-specific option histories. Often used option strings can be specified for each of the standard views in etmrc. Option strings from the current etm session are appended to these lists.
- Ctrl-P prints a nicely-formated version of the current display.
- Ctrl-S saves a nicely formated version of the current agenda, list, busy/free or reckoning view to the system clipboard.
- Item id-numbers are only displayed when needed for the pending operation.
- Confirmations for standard actions have been streamlined. Confirming messages are temporarily displayed in the status bar and then automatically disappear after a (user controlled) number of seconds.
- Any action can be canceled by simply pressing the <Esc> key.
TRYING OUT THE NEW VERSION
You will need python >= 2.5.2 for the command line interface plus wxPython >= 2.8.10 for the gui interface. If you have a choice between an ansi and a unicode version for wxPython, I would advise getting the unicode version. Both the command line and the gui interfaces still require dateutil >= 1.4.1.
You can try it out the new version after installing/upgrading python and wxPython without changing your existing etm setup in any way.
First unpack the tarball in a convenient spot, then cd to the unpacked etm root directory where you should find e.py, among other things, and run:
python e.py
This will create a new directory, ~/.etm, and a default configuration file, ~/.etm/etmrc. The defaults will put your etm project files in ~/.etm/data, ical exports in ~/.etm/ical and alerts in ~/.etm/alerts. You can thus test things without touching your existing projects or configuration.
You can now run:
python e.py h
for the command line usage information or:
pthon e.py w
to start the wxPython-based graphic user interface.
With etm you can:
Making Getting Things Done easier is etm's goal. Getting Things Done, commonly abbreviated as GTD, is an action management method, and the title of a extremely popular book by David Allen. GTD rests on the common sense notion that with a complete and current inventory of all commitments, organized and reviewed in a systematic way, the mind is freed from the job of remembering everything that needs to be done, and can focus on actually performing those tasks.
Three observations are critical:
GTD thus requires convenient methods for:
| planning: | storing and organizing all the bits. |
|---|---|
| acting: | displaying just the information you need, when you need it. |
Suppose there is a department meeting at noon on Friday, March 13, 2009, that you want to remember. With etm, the following text file would accomplish this:
---- file begins ----------------- report * staff meeting @c work @d 2009-03-13 @s 12:00p ---- file ends -------------------
The asterisk before 'staff meeting' means that this line describes an event. The staff meeting would now appear on your agenda for February 20 associated with the project report and the context work. If you would like to be alerted 15 and 10 minutes before the meeting and be reminded to bring a report with you to the meeting, then change the event line to:
* staff meeting @c work @d 2009-03-13 @s 12:00p @a 15, 10 @n bring report
To make things more interesting, suppose that you are responsible for preparing the report and presenting it at the meeting. The following:
---- file begins ----------------- report @c work @d 2009-03-13 * staff meeting @s 12:00p @a 15, 10 @n bring report + prepare report @b 1 ---- file ends -------------------
would remind you of this task one day before the meeting.
Still more interesting, suppose you need sales data from Joe and inventory data from Mary before you can prepare the report. Just add two more tasks:
---- file begins ----------------- report @c work @d 2009-03-13 * staff meeting @s 12:00p @a 15, 10 @n bring report + get sales from Joe @b 2 - get inventory from Mary @b 2 + prepare report @b 1 ---- file ends -------------------
Tasks can begin either with a plus or a minus sign. The plus sign before Joe means that Mary can be started before Joe is done. The minus sign before Mary means, on the other hand, that Mary, and thus Joe as well, must be finished before report, can begin.
Finally, the following slight modification would cover such meetings when they repeat on the second Friday of every month:
---- file begins ----------------- report @c work @d 2009-03-13 @r m @w FR(2) * staff meeting @s 12:00p @a 15, 10 @n bring report + get sales from Joe @b 2 - get inventory from Mary @b 2 + prepare report @b 1 ---- file ends -------------------
What could be easier?
Here's a slightly more complicated example for a course I'm teaching:
---- file begins -----------------
ECO 207
# classes meet on Tu and Th at 2:50 from 1/8 until 4/21 save for the
# midterm on 2/24 and spring break on 3/10 and 3/12
* ECO 2O7 @d 2009-01-08 @c class @r w @w (TU, TH) @s 2:50PM @a (10, 2, 0)
@u 2009-04-21 @x (2009-02-24, 2009-03-10, 2009-03-12)
# exams
* ECO 2O7 Midterm @d 2009-02-24 @s 2:50PM @a (10, 2, 0) @c exam
* ECO 2O7 Final @d 2009-04-27 @s 2:00PM @a (10, 2, 0) @c exam
# preparation
- prepare syllabus @d 2009-01-08 @b 7 @c mac
- xerox syllabus @d 2009-01-08 @b 7 @c office
- prepare midterm @d 2009-02-24 @b 7 @c mac
- xerox midterm @d 2009-02-24 @b 7 @c office
- prepare final @d 2009-04-27 @b 7 @c mac
- zerox final @d 2009-04-27 @b 7 @c office
---- file ends -------------------
Lines beginning with # are comments.
Project files are text files with the default extension .txt within etmdata ('~/.etmdata' by default) and any sub-directories.
Arguments provided on the first line can include most of those used on subsequent lines. When provided, they become the default values for subsequent tasks, events and activities.
The important distinctions among events, tasks and activities are the following:
| Event: | A reminder of something that will happen on a particular day (or days) and, perhaps, at a particular time. An event cannot be begun or finished either early or late. Events may or may not require our participation. |
|---|---|
| Task: | A reminder of something that needs to be done. It may or may not have a due date, and if it does, it might be begun and even finished before the due date. It might also be finished and even begun after the due date. |
| Action: | A record of the time-consuming action required to complete a task or participate in an event. Actions are not reminders, they are instead records of how time was actually spent. |
Event lines have the following format:
* <event name> [Options]
Options:
date @d YYYY-MM-DD with fuzzy parsing (required)
context @c string
keywords @k string or list of strings
repeat @r d)aily, w)eekly, m)onthly, y)early, l)ist
Default: none. With l)ist only dates specified
by @l will be included
interval @i 2, 3, ... Default: 1
until @u YYYY-MM-DD with fuzzy parsing. Default: forever
weekday @w MO, TU, ..., MO(-1) or a list of weekdays.
Integers can be used instead with 0=MO, 1=TU and
so forth.
week @W integer week number or list of week numbers
monthday @m integer month day or list of monthdays
month @M integer month number or list of month numbers
include @l a list of (non matching) dates to
include
exclude @x a list of (matching) dates to
exclude
starttime @s HH:MM[AP] fuzzy parsing
endtime @e HH:MM[AP] fuzzy parsing (requires starttime)
alerts @a a list of minutes before --starttime
for alerts. The separate program ew.py must be
running for alerts to be triggered.
note @n string
Events without a starttime are regarded as all-day events.
Note: Lists in events (above) and tasks (below) must be comma separated and enclosed in parentheses. A list of numbers can also be specified using the range operator, e.g., range(1,5) = (1,2,3,4) and range(5,20,3) = (5,8,11,14,17).
Tasks lines have a slightly different format:
[+-] <task name> [Options]
+: a parallel task (the next task can be started before this one is finished)
-: a series task (the next task cannot be started before this one is finished)
Options:
date @d YYYY-MM-DD with fuzzy parsing (required for repeating tasks)
context @c string
keywords @k string or list of strings
repeat @r d)aily, w)eekly, m)onthly, y)early, l)ist
Default: none. With l)ist only dates specified
by @l will be included
interval @i 2, 3, ... Default: 1
until @u YYYY-MM-DD with fuzzy parsing. Default: forever
weekday @w MO, TU, ..., MO(-1) or list of weekdays.
Integers can be used instead with 0 = MO, 1=TU and so forth.
week @W integer week number or list of week numbers
monthday @m integer month day or list of monthdays
month @M integer month number or list of month numbers
include @l a list of (non matching) dates to include
exclude @x a list of (matching) dates to exclude
overdue @o k)eep, r)estart, s)kip. Default: k
note @n string
begin @b integer number of days before date
finished @f YYYY-MM-DD with fuzzy parsing
Actions are simpler still:
~ <Description of activity> [Options]
Options:
date @d a date. Required.
period @p elapsed time in minutes. Required.
context @c string.
keywords @k string or list of strings. Keywords containing a
colon(s), e.g., "x:y", "x:z", will be split to form
groups and subgroups when aggregating times.
note @n string
See Actions for a discussion of how the gui verion of etm makes creating records of time expenditures particularly easy.
Fuzzy parsing is supported by etm running in interactive mode (running 'e.py -i') thanks to dateutil. A few examples should provide an idea of what's possible. Suppose that it is currently Tuesday, February 17, 2009. Then in fields calling for a date:
entering would give after fuzzy parsing -------- ------------------------------- tue 2009-02-17 thu 2009-02-19 mon 2009-02-23 23 2009-02-23 mar 2 2009-03-02 3/2 2009-03-02 2/1/2010 2010-02-01
Similarly, in fields calling for a time, entering '6p' would give after parsing '06:00PM'. Entering '6', on the other hand, would give '2009-02-06'.
Note: in the fuzzy parsing example above, 'tue' expands to '2009-02-17' and so would 'tuE' but 'tu' would raise an error. Three letter (but case-insensitive) weekday abbreviations must be used with fuzzy parsing. In recurrence rules that specify weekdays, on the other hand, both 'tue' and 'tu' would raise an error but 'TU' would not. In specifying weekdays in repeated tasks/events, two character weekday abbreviations must be used and both characters must be upper case. This inconsistency is due to the fact that fuzzy parsing and recurrence rules are separate components of dateutil.
Note: Though it is possible to create projects and new tasks and events using a text editor, it is stongly recommended that you use the gui version of etm (by running 'e.py -i'). The gui version provides fuzzy parsing, reports of any parsing errors with an opportunity to correct them plus a scrollable help screen. See Creating new entries and changing existing ones.
Note: all repeating tasks must have a starting date specified by @d YYYY-MM-DD. This date would normally be specified as the first date satisfying the recurrence rule on which the task should be done.
Once every other week: Monthly on the 2nd and 15th:
@r w @i 2 @r m @m (2,15)
Monthly on the 2nd-15th: Monthly on the first and last days:
@r m @m range(2,16) @r m @m (1,-1)
Monthly on the third Monday: 30 days from the last completion:
@r m @w MO(+3) @r d @i 30 @o r
The 3rd, 10th and 25th of April: Every 13th which is a Friday:
@r l @l apr 3, apr 10, apr 25 @r m @m 13 @w FR
Weekly on Tu and Th until May 7: The first Tuesday after a Monday
@r w @w (TU,TH) @u 2009-05-07 in November every four years
(presidential election day):
@r y @i 4 @M 11 @m range(2,9) @w TU
A repeating task that is finished on its due date presents no difficulty. But what if it's finished early or becomes overdue? There are three options with etm:
| @o k: | Keep the current due date if it becomes overdue and use the next due date from the recurrence rule if it is finished early. This would be appropriate, for example, for the task 'file tax return'. The return due April 15, 2009 must still be filed even if it is overdue and the 2010 return won't be due until April 15, 2010 even if the 2009 return is finished early. |
|---|---|
| @o s: | Skip overdue due dates and set the due date for the next repetition to the first due date from the recurrence rule on or after the current date. This would be appropriate, for example, for the task 'put out the trash' since there is no point in putting it out on Tuesday if it's picked up on Mondays. You might just as well wait until the next Monday to put it out. There's also no point in being reminded until the next Monday. |
| @o r: | Restart the repetitions based on the last completion date. Suppose you want to mow the grass once every ten days and that when you mowed yesterday, you were already nine days past due. Then you want the next due date to be ten days from yesterday and not today. Similarly, if you were one day early when you mowed yesterday, then you would want the next due date to be ten days from yesterday and not ten days from today. |
What do you see in soon and list views?
| @o k: | Both finished and unfinished repetitions. |
|---|---|
| @o s: | Repetitions that were finished (not skipped) and unfinished repetitions. |
| @o r: | Finished repetitions and the first unfinished repetition. |
The GUI version of etm makes it easy to create and change events, tasks, actions and reminders:
e: Create a new event. Prompt for file number, display event help
and prompt for entry.
t: Create a new task. Prompt for file number, display task help
and prompt for entry.
a: Start the timer for a new action. Pressing 'a' again stops
the timer, prompts for a file number to record the entry, shows
action help information and prompts for the completion of an
entry that already contains the date and elapsed time.
p: Create a new project. Prompt for file name, display project
help and prompt for entry.
r: Create a new (remind) event. Display remind help and prompt for
entry.
f: Toggle the finished status of a task. Prompt for the task number.
If an argument is provided it will be (fuzzy) parsed for the
completion date. Otherwise TODAY (today's date) will be used.
Note: the finished status can only be turned off for a
non-repeating task.
m: Modify an existing task, event or reminder. Prompt for the number.
P: Open an existing project for editing. Display a numbered list
of existing projects and prompt for the file number to use.
D: Delete an existing task, event, action or reminder. Prompt for
the item number. Warning. This cannot be undone!
The process of creating a new task (t) is illustrated below. After pressing 't', the file number prompt appears:
After entering the file number, the new task entry prompt appears. Here the 'prepare report' task being entered:
If this task were being entered on Tuesday, 10 March 2009, then fuzzy parsing of 'thu' would return 2009-03-12.
The confirmation screen gives an opportunity to cancel creating the task, make further changes or append the task to the selected file.
For a more interesting example, suppose I want to be reminded to vote in the 2012 presidential election. I enter the recurrence rule from the repetition examples but, since I'm too lazy to look up the date of the 2012 election, I simply enter '2012' for the date:
Note that in the confirmation screen, '2012' has been replaced by the actual date of the election from the recurrence rule. This is not only convenient, but also provides a check that the recurrence rule is working correctly.
Note also that 'tue' has been replaced by 'TU' which is the weekday abbreviation required for the recurrence rule. If instead of 'tue', I had entered 'teu' by mistake, then I would have seen:
In this way the GUI version of etm provides a user-friendly method for creating new tasks, events and actions by automatically correcting minor issues and informing the user of the others.
This is the default view for both the command line and GUI versions of etm. Here events and tasks are groupded by date starting with today and continuing, by default, for an additional (user configurable) SOON days in the future. The task list for each displayed date is limited to unfinished tasks which are due on that date and which are available, i.e., not dependent on the completion of some, as yet unfinished, prior task(s).
The display of tasks and events grouped by date is followed, if necessary, by three further groups:
| Waiting for prior task completion: | |
|---|---|
| Tasks which are due on or before the last displayed date but which require the prior completion of one or more currently unfinished task(s). | |
| Available by <last displayed date>: | |
| Task which are not due within the listed dates but which have begin dates falling on or before the last displayed date. | |
| Without a due date: | |
| Tasks for which no due date is specified. | |
The display can optionally be limited to those whose title or note matches a specified search string. Matching is case insensitive.
The screenshot below displays the soon view for the report illustration
Users of remind should note that the 'daylight' entry for March 11 was provided by remind.
List view displays events and tasks, both unfinished and finished and both available and unavailable, whose due dates fall within a specified period. This list can be grouped by date, the default, or by project or by context.
When grouping by date, an addition group is provided, if necessary, for tasks without a due date.
The display can optionally be limited to those whose title or note match a specified search string or, when grouping by projects or contexts, to those whose project or context title matches a specified string. All matching is case insensitive.
The screenshot below shows the list view grouped by project for the report illustration.
From the help screen:
-d DAYS <integer>: Temporarily use this number of days for SOON
(soon view) and for NEXT (list view).
-b BEGIN <date>: With list view, display tasks/events beginning
with this (fuzzy parsed) date. A space is required between -b
and BEGIN, e.g., -b feb 3. Ignored with soon view where
BEGIN is always TODAY.
-e END <date>: Display tasks/events ending with this (fuzzy parsed)
date. A space is required between -e and END, e.g., -e mar 1.
Default: TODAY plus SOON days for soon view; BEGIN plus RECENT
plus NEXT days for list view.
-g GROUPBY <[dpc]>: Only with list view. How to group tasks/events:
d: group by due date (the default).
p: group by project.
c: group by context.
k: group by keyword.
Spaces and tabs are not allowed in the regular expressions below; use
'\s' for a whitespace character instead.
-f FIND <regex>: Only show tasks|events containing FIND (ignoring
case) in either the task title or note and falling within the
BEGIN ~ FINISH interval using the GROUPBY setting.
-c CONTEXT <regex>. Only show tasks|events with contexts containing
CONTEXT (ignoring case) and falling within the BEGIN ~ FINISH
interval using the GROUPBY setting.
-p PROJECT <regex>. Only show tasks|events with projects containing
PROJECT (ignoring case) and falling within the BEGIN ~ FINISH
interval using the GROUPBY setting.
-k KEYWORD <regex>. Only show tasks|events with keywords matching
KEYWORD (ignoring case) and falling within the BEGIN ~ FINISH
interval using the GROUPBY setting.
-x EXPORT. (List View only) Export list view items in iCal format to
EXPORT.ics in the etmical directory specified in '~/.etmrc'.
After pressing 'l' to bring up 'list options', '-f mary' is entered to show items containing 'mary' in either the title or the note. Here is the result:
Keywords can be used to track priorities. Add, for example, keywords such as 'priority:1', 'priority:2', and so forth to tasks, events and/or actions and then, in list view, use '-g k -k priority' to display items containing the keyword 'priority' grouped and sorted by priority.
Unscheduled periods view displays a lists of scheduled (busy) and unscheduled (free) intervals starting, by default, TODAY and continuing through NEXT days after TODAY, first prompting for options. The graphical plus times display is illustrated below. A times-only display is also available.
Options for the scheduled/unscheduled view:
-d, -b, -e as with list and soon views above. -m MINIMUM interval size in minutes to consider unscheduled/available. -E EARLIEST time to consider unscheduled/available. -L LATEST time to consider unscheduled/available.
See TimeReports.
From the help screen:
F5: Display twelve month calendar starting last month.
F6: Switch to the previous display.
d: Display sun and moon data from the USNO for a (fuzzy parsed) date.
q: Display the current contents of the etm warning queue.
v: Check for available etm updates.
V: Toggle displaying alerts, keywords and notes. Prefix titles with
hidden items by [x] where x contains the keys of the hidden items.
w: Display current weather data from yahoo.
Exporting a list view to iCal requires the python module icalendar which can be easily installed using the command:
sudo easy_install -U icalendar
List view options can be used to select the date range and show only items matching regex searches. E.g.,
e.py -l -b 6/1 -e 8/30 -c class -x classes
would create a calendar named 'classes.ics' containing all items with dates between June 1 and August 30 with a context matching 'class'.
Such calendars can be imported into any calendar application that supports this format, e.g., Sunbird, KOrganizer and iCal. One of my favorites, phpicalendar, is web based and supports daily, weekly and monthly views:
Alerts for an event are set by adding an '@a' field to the event, e.g.,
* Staff meeting @s 10:00A @a (10, 5, 0) ...
would set alerts for 10 minutes before the event, 5 minutes before the event and at the starting time of the event. For these alerts to be triggered the etm background warning process must be running. This process is typically started by running 'ew.py -s &' at a command prompt. See Command line usage. What happens when an alert is triggered is determined by the setting for 'alertcmd' in '~/.etmrc'. With the default setting:
alertcmd = '''echo %(t)s. %(m)s. | wall'''
the current time would be substituted for '%(t)s', the text of the event title for '%(m)s' and then 'wall' would be called to display the resulting message. Under the default settings, the first alert message would be:
The time is 9:50AM. Staff meeting in ten minutes.
and the last alert message would be:
The time is 10:00AM. Staff meeting now.
On a mac (OS X leopard), you could use:
alertcmd = '''say -v "Alex" "%(t)s. %(m)s."'''
to announce the message using the voice 'Alex'. More generally, any command that will accept a string argument could be used.
Many times it will be convenient to create a project file to hold a collection of related tasks and events as in the illustrative case of the report. Often, however, tasks and events will be created that are independent of one another. There is no need to create separate project files in such circumstances. etm, in fact, will automatically create files that can you can use for such independent tasks and events and, further, will automatically archive these files for you after one year.
Suppose it is currently February 2009. Then etm will automatically create 'tasks_02.txt', 'evnts_02.txt' and 'jrnl_02.txt' the first time it is run. By default, tasks, events and actions created during February will be written, respectively, to these files. Similar files will be automatically be created and become the defaults as subsequent months arrive. When February 2010 rolls around 'tasks_02.txt' will automatically be moved to '2009-02_tasks', 'evnts_02.txt' to '2009-02_evnts', 'jrnl_02.txt' to '2009-02_jrnl' and new 'tasks_02.txt', 'evnts_02.txt' and 'jrnl_02.txt' files will be created. Since etm only processes files with the extension '.txt', the monthly archives of your past tasks, events and actions will be kept until you decide to delete them but only the last year's worth will be loaded and processed by etm.
etm will also create files 'done_02.txt', 'done_03.txt' and so forth and, as with the tasks, evnts and jrnl files, archive them after a year. When a non-repeating task is finished, a date stamp containing the completion date is added to the task so that if, e.g.,
+ my non-repeating task @d 2009-02-17
were marked finished on Feburary 18, 2009 then it would become:
+ my non-repeating task @d 2009-02-17 @f 2009-02-18
On the other hand, when a repeating task is marked finished, the due date for the task is updated to the next due date and a copy of the task with the repetition details removed and the completion date added is appended to the done file for the appropriate month. If, e.g.,
+ my repeating task @d 2009-02-17 @r d @i 7
were finished on Feb 18, 2009, then it would become:
+ my repeating task @d 2009-02-24 @r d @i 7
and
+ my repeating task @d 2009-02-17 @f 2009-02-18
would be appended to 'done_02.txt'.
A repeating task that is set to skip overdue due dates presents a new situation since it can have repetitions that are never finished and yet never become overdue. Suppose, for example, that I need to put the trash on the curb for pickup every Friday:
+ take out trash @d 2009-02-20 @r w @w FR @o s
where the '@o s' means that the task will be skipped if it becomes overdue. Then if I forget to take out the trash on the 20th, on February 21 this task would be automatically be replaced by:
+ take out trash @d 2009-02-27 @r w @w FR @o s
Since the February 20 repetition of this task was skipped rather than finished, no record would be made of a completion in 'done_02.txt'. The completion record would thus show only the dates on which the task was actually marked finished.
Finally, a backup is made of any file before any action using etm -i would change it. E.g., before a task in '02_tasks.txt' would be marked finished, the file would first be copied to '.02_tasks.bk1'. If '.02_tasks.bk1' already exists, it would first be moved to '.02_tasks.bk2'. Similarly, if '02_tasks.bk2' already exists, then it would be first be moved to '02_tasks.bk3' and so forth. In this way, up to 'numbaks' (3 by default) rotating backups of are kept with '.bk1' the most recent. Further, a record showing the task before and after the change would be appended to '02_tasks.log'.
etm provides limited support for remind users. If '~/.reminders' exists and the remind executable can be found in your path, then etm will display your reminders and provide shortcuts to edit them. Further, etm will provide a shortcut to create new reminders in this file or, optionally, another file that you specify in ~/.etmrc.
Note: If you install remind after etm, delete the entries for 'remind' and 'reminders' in '~/.etmrc' and they will be updated the next time you run etm.
etm treats all remind events as belonging to project remind and having no context. Since remind provides its own alert mechanism, remind reminders will not trigger etm alerts.
Unpack the etm source in a temporary directory, cd to that directory and then run:
sudo python setup.py install
The temporary directory can then be removed. This will download and install any necessary supporting modules (setuptools, dateutil), install the etm package in the 'site-packages' subdirectory of your python distribution and install the executables e.py and ew.py in the 'bin' subdirectory of your python distribution.
If you have setuptools installed, you can skip downloading and use:
sudo easy_install -U etm
either to install etm or to update to the latest version.
If you would like to try etm out without installing the system files or if you don't have root privileges but would like to install etm for your own use, the process is simple. Unpack the etm source in a convenient directory, cd to that directory and then run
./e.py [options] or ./ew.py [options]
This does not require root privileges and will not install any system files but will create the user specific configuration, data and alert files mentioned below in your home directory. You could, of course, use aliases or symbolic links to these files and avoid even having to change to this directory, e.g., if these files are located in ETMDIR, then you could add these lines to your ~/.bash_profile:
alias e.py='ETMDIR/e.py' alias ew.py='ETMDIR/ew.py' alias etm='(ETMDIR/ew.py -s &) && ETMDIR/e.py -i; ETMDIR/ew.py -q'
replacing ETMDIR, of course, with the actual path. These aliases would then function in the way described under Command line usage below.
These files/subdirectories are created the first time you run either e.py or ew.py.
| ~/.etmrc: | All configuration settings are kept in this file. It will automatically be created if it doesn't already exist and populated with default values. This configuration file is self-documented and can be freely edited. If you make changes you don't like you can simply erase the offending part, or even the entire file, and it will be recreated with defaults the next time you run e.py or ew.py. |
|---|---|
| ~/.etmdata/: | Project files are, by default, kept in this directory and its subdirectories though the setting for etmdata can be changed in '~/.etmrc'. It is automatically created and populated with the rotating project files for events and tasks for the previous and current months discussed in Rotating files. |
| ~/.etmupdates/: | etm updates are downloaded to this subdirectory when updating is invoked from etm itself. |
The following files support alerts. The idea is to let the (background) thread process sleep for most of the time but wake up at regular intervals to check for messages. Depending upon the message, the thread process will either (1) shut itself down or (2) add any new alerts to the queue, trigger any queued alerts set for the current time and then go back to sleep.
| ~/.etmalerts: | Alerts for the current day are automatically stored in this file whenever e.py is run or when 'e.py -i' is running and any project changes are made. |
|---|---|
| ~/.etmlock: | When 'ew.py -s &' is run, a background thread is started to trigger alerts. This process wakes up automatically at regular intervals (set in '~/.etmrc'), reads alerts from '~/.etmalerts', creates a corresponding alert queue and writes the status of this queue to '~/.etmlock' so that etm can provide status reports on the queue and so that redundant background alert threads cannot be started. |
| ~/.etmlock_: | When 'ew.py -q' is run to stop the background alert thread, the file '~/.etmlock' is moved to '~/.etmlock_'. When the next automatic update occurs, the fact that '~/.etmlock' no longer exists will cause the alert queue to be cleared, the background thread to be terminated and '~/.etmlock_' to be removed. While no alerts will be triggered after 'ew.py -q' is run, it may be a few seconds before '~/.etmlock_' is removed and the thread is terminated. |
Run
e.py -h
or
ew.py -h
for complete usage information.
Run
e.py -i
to open the GUI interface and press F1 to see a list of available commands.
Run
ew.py -s &
to start a background process to provide warning alerts for upcoming events. The action taken when an alert is triggered can be set in ~/.etmrc.
Tip: with an alias such as
bash: alias etm='(ew.py -f &) && e.py -i' csh/tcsh: alias etm '(ew.py -f &) && e.py -i'
entering 'etm' at a command prompt would (force) start a background alert process and fire up etm in interactive, gui mode.
Copyright (c) 2009 Daniel Graham <daniel.graham@duke.edu>. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
http://www.gnu.org/licenses/gpl.html
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.