event and task manager
event and task manager
event and task manager
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Overview<br />
GTD with etm<br />
an illustrative project<br />
contexts <strong>and</strong> keywords<br />
Viewing <strong>task</strong>s, <strong>event</strong>s <strong>and</strong> actions<br />
Display options<br />
Display dates for <strong>task</strong>s<br />
Regular expression (regex) matching<br />
Searching<br />
Export to iCal/vCal<br />
Export to CSV<br />
Project details<br />
Events<br />
Reminders<br />
Alerts (for <strong>event</strong>s <strong>and</strong> reminders)<br />
Tasks<br />
Actions<br />
Notes<br />
Anniversary substitutions<br />
Goto links<br />
Fuzzy parsing of dates <strong>and</strong> times<br />
Due dates for repeating <strong>task</strong>s<br />
etm<br />
<strong>event</strong> <strong>and</strong> <strong>task</strong> <strong>manager</strong><br />
Contents<br />
1
Using the date calculator<br />
Installation/Updating<br />
OS X users<br />
Temporary / local installation<br />
Files created <strong>and</strong> used by etm<br />
Configuration files<br />
Rotating data files<br />
Pickle files<br />
Comm<strong>and</strong> line usage<br />
Example Files<br />
License<br />
Overview<br />
etm is an acronym for Event <strong>and</strong> Task Manager. It provides a simple, intuitive format for<br />
using plain text files to store data, a comm<strong>and</strong> line interface for viewing stored information<br />
in a variety of convenient ways <strong>and</strong> a cross-platform, wx(python)-based GUI for creating <strong>and</strong><br />
modifying items as well as viewing them. Displayed items can be grouped by date, context,<br />
keyword or project <strong>and</strong> can be filtered in various ways. A display of busy <strong>and</strong> free times is<br />
also supported as is a ledger view of time spent that is suitable for client billing. Alarms<br />
are supported for <strong>event</strong>s <strong>and</strong> repetition for both <strong>event</strong>s <strong>and</strong> <strong>task</strong>s in a powerful <strong>and</strong> flexible<br />
manner.<br />
GTD with etm<br />
Making Getting Things Done easier is etm’s goal. Getting Things Done, commonly abbreviated<br />
as GTD, is an action management method, <strong>and</strong> the title of a extremely popular book by David<br />
Allen. GTD rests on the common sense notion that with a complete <strong>and</strong> current inventory of<br />
all commitments, organized <strong>and</strong> reviewed in a systematic way, the mind is freed from the job<br />
of remembering everything that needs to be done, <strong>and</strong> can focus on actually performing those<br />
<strong>task</strong>s.<br />
Three observations are critical:<br />
1. Projects usually involve a series of steps, some of which must be carried out consecutively,<br />
e.g., parts must be acquired before assembly can begin.<br />
2
2. The steps of a project are carried out in a context which may vary from step to<br />
step, e.g., parts may be acquired in the context ’err<strong>and</strong>s’ but assembly may be in<br />
the context ’workshop’.<br />
3. While focusing on projects is great for planning, for actually doing things it would<br />
be more convenient to focus on context so that, for example, you could see all<br />
actions from all projects with context ’err<strong>and</strong>s’ before you drive off. To focus on<br />
what needs to be done, it would also be useful to be able to hide actions that are not<br />
yet available so that, for example, ’assemble parts’ is not displayed until ’acquire<br />
parts’ is complete.<br />
GTD thus requires convenient methods for:<br />
planning: storing <strong>and</strong> organizing all the bits.<br />
acting: displaying just the information you need, when you need it.<br />
etm allows you to store <strong>and</strong> organize your commitments using a simple, intuitive format using<br />
plain text files. Tasks can be entered in an ’outline format’ which displays not just your <strong>task</strong>s,<br />
but also your <strong>event</strong>s, actions, notes <strong>and</strong> reminders. Your commitments can be viewed grouped<br />
by date, context, keyword or project. You can hide finished <strong>task</strong>s, or waiting <strong>task</strong>s, or <strong>event</strong>s.<br />
You can display only items whose contexts or keywords match a given regular expression. You<br />
can display busy <strong>and</strong>/or free times for an arbitrary period. You can prepare a ledger view of<br />
your time broken down by any combination of date, keyword, <strong>and</strong>/or context. You can export<br />
matchingitems in vCal/iCal format. In short, etm gives you access to just the information you<br />
need, when you need it.<br />
an illustrative project<br />
Suppose there is a department meeting at noon on Friday, March 13, 2009, that you want to<br />
remember. With etm, the following text file would accomplish this:<br />
---- file begins ----------------report<br />
* staff meeting @c work @d 2009-03-13 @s 12:00p<br />
---- file ends -------------------<br />
The asterisk before ’staff meeting’ means that this line describes an <strong>event</strong>. The staff meeting<br />
would now appear on your agenda for March 13 associated with the project report <strong>and</strong> the<br />
context work. If you would like to be alerted 15 <strong>and</strong> 10 minutes before the meeting <strong>and</strong> be<br />
reminded to bring a report with you to the meeting, then change the <strong>event</strong> line to:<br />
* staff meeting @c work @d 2009-03-13 @s 12:00p @a 15, 10 @n bring report<br />
3
To make things more interesting, suppose that you are responsible for preparing the report<br />
<strong>and</strong> presenting it at the meeting. The following:<br />
---- file begins ----------------report<br />
@c work @d 2009-03-13<br />
* staff meeting @s 12:00p @a 15, 10 @n bring report<br />
. prepare report @b 1<br />
---- file ends -------------------<br />
would remind you of this <strong>task</strong> one day before the meeting.<br />
Still more interesting, suppose you need sales data from Joe <strong>and</strong> inventory data from Mary to<br />
prepare the report. Just add two more <strong>task</strong>s:<br />
---- file begins ----------------report<br />
@c work @d 2009-03-13<br />
* staff meeting @s 12:00p @a 15, 10 @n bring report<br />
. get sales from Joe @b 2<br />
. get inventory from Mary @b 2<br />
. prepare report @b 1<br />
---- file ends -------------------<br />
Tasks can begin with one or more periods or underscores. The <strong>task</strong>s can be regarded as<br />
an outline with the number or periods or underscores determining the level <strong>and</strong> thus the<br />
prerequisites of the <strong>task</strong>. Tasks at the same level in a branch of the outline can be completed<br />
in any order but none can be started until all higher level <strong>task</strong>s in the same branch have been<br />
completed. The single periods before Joe, Mary <strong>and</strong> report mean that these <strong>task</strong>s are at the<br />
same (first) level <strong>and</strong> thus can be completed in any order.<br />
If we need to complete Mary before beginning report then the following should be used:<br />
---- file begins ----------------report<br />
@c work @d 2009-03-13<br />
* staff meeting @s 12:00p @a 15, 10 @n bring report<br />
. get sales from Joe @b 2<br />
. get inventory from Mary @b 2<br />
.. prepare report @b 1<br />
---- file ends -------------------<br />
The two periods before report mean that it is nested under Mary <strong>and</strong> thus that Mary must be<br />
finished before report can begin.<br />
If we really need to complete both Joe <strong>and</strong> Mary before beginning report then we can use<br />
underscores instead of periods before Joe <strong>and</strong> Mary to add both to the prerequisites for report:<br />
4
---- file begins ----------------report<br />
@c work @d 2009-03-13<br />
* staff meeting @s 12:00p @a 15, 10 @n bring report<br />
_ get sales from Joe @b 2<br />
_ get inventory from Mary @b 2<br />
.. prepare report @b 1<br />
---- file ends -------------------<br />
Finally, the following slight modification would cover such meetings when they repeat on the<br />
second Friday of every month:<br />
---- file begins ----------------report<br />
@c work @d 2009-03-13 @r m @w FR(2)<br />
* staff meeting @s 12:00p @a 15, 10 @n bring report<br />
_ get sales from Joe @b 2<br />
_ get inventory from Mary @b 2<br />
.. prepare report @b 1<br />
---- file ends -------------------<br />
What could be easier?<br />
Here’s a slightly more complicated example for a course I’m teaching (lines beginning with #<br />
are comments):<br />
---- file begins -----------------<br />
ECO 207<br />
# classes meet on Tu <strong>and</strong> Th, 2:50-4:05p (75 minutes) from 1/8 until 4/21<br />
# save for the midterm on 2/24 <strong>and</strong> spring break on 3/10 <strong>and</strong> 3/12<br />
* ECO 2O7 @d 2009-01-08 @c class @r w @w (TU, TH) @s 2:50p @e 75<br />
@a (10, 2, 0) @u 2009-04-21 @x (2009-02-24, 2009-03-10, 2009-03-12)<br />
# exams<br />
* ECO 2O7 Midterm @d 2009-02-24 @s 2:50PM @e 75 @a (10, 2, 0) @c exam<br />
* ECO 2O7 Final @d 2009-04-27 @s 2:00PM @e 180 @a (10, 2, 0) @c exam<br />
# preparation<br />
. prepare syllabus @d 2009-01-08 @b 7 @c mac<br />
. prepare midterm @d 2009-02-24 @b 7 @c mac<br />
.. grade midterm @d 2009-02-25 @c desk<br />
... record midterm grades @d 2009-02-26 @c mac<br />
. prepare final @d 2009-04-27 @b 7 @c mac<br />
.. grade final @d 2009-04-28 @c desk<br />
... record course grades @d 2009-04-29 @c mac<br />
---- file ends -------------------<br />
5
contexts <strong>and</strong> keywords<br />
All item types in etm support the use of both context (@c) <strong>and</strong> keyword (@k) entries. The<br />
context field is intended to support the st<strong>and</strong>ard use of context in GTD, e.g., ’err<strong>and</strong>s’, ’phone’,<br />
’computer’, ’office’ <strong>and</strong> so forth. Using<br />
e.py i -g c<br />
shows your items grouped by context or, if you’re about to run some err<strong>and</strong>s you could use<br />
e.py i -c err<strong>and</strong>s<br />
to show only the items with the context ’err<strong>and</strong>s’. You could, of course, choose a completely<br />
different use for the context field.<br />
The keyword field in etm has no natural counterpart in GTD. One possibility that might be<br />
useful would be to differentiate between personal, ’@k per’ <strong>and</strong> work related, ’@k wrk’, items.<br />
Then<br />
e.py i -k wrk<br />
would show only your work related items. Another possibility if you have, say, projects ’A’<br />
<strong>and</strong> ’B’ for a client named ’Jones’ would be to use ’@k Jones:A’ <strong>and</strong> ’@k Jones:B’. Then<br />
e.py i -k Jones<br />
would show all your ’Jones’ items <strong>and</strong><br />
e.py i -k Jones:A<br />
would show only the items relating to Jones’ project A. Similarly,<br />
e.py l -i 0120 -k Jones<br />
would prepare a ledger view showing time spent on items with the keyword Jones broken down<br />
by date <strong>and</strong> project.<br />
6
Viewing <strong>task</strong>s, <strong>event</strong>s <strong>and</strong> actions<br />
Display options<br />
Main view is the opening view of the etm <strong>and</strong> its interactive interface. It displays a monthly<br />
calendar in the top, left-h<strong>and</strong> corner with dates color coded to reflect combined lengths of<br />
scheduled <strong>event</strong>s. Seven days are highlighted in the calendar. Left <strong>and</strong> right arrow keys move<br />
the selected days backward or forward by one day. Up <strong>and</strong> down arrow keys move the selected<br />
days backward or forward by one week. Page up <strong>and</strong> page down change the month. Clicking<br />
on a date in the calendar selects that date <strong>and</strong> the six following days. Press F1 to display a list<br />
of shortcuts.<br />
Items for the seven selected days are displayed in the top, right-h<strong>and</strong> list panel <strong>and</strong> the busy<br />
times for these days are graphically displayed in the bottom, left-h<strong>and</strong> busy panel. When an<br />
item is selected in the list panel, the details of the item are displayed in the details panel<br />
immediately below the list panel. Pressing return or double clicking a selected item in the list<br />
panel opens it for editing. Clicking a bar in the busy panel selects the relevant item in the<br />
list panel <strong>and</strong> double clicking in the busy panel opens the item for editing. Conflicting times<br />
appear as darker colored bars in the busy panel.<br />
The status bar in the bottom of the main display is divided into four regions. From left to right<br />
these regions display 1) the help prompt, 2) the next alert, if any, for the current date, 3) the<br />
current display options <strong>and</strong> 4) the status, if any, of the action timer.<br />
Options for the main display can be set by pressing ’m’. A new window will open with detailed<br />
information about options for the main view <strong>and</strong> with a entry bar to specify options. Press TAB<br />
to select options from a drop-down list. Initially, items in the drop-down list are those specified<br />
in ’main_history’ in your ’~/.etm/rc’ but option strings used during the current session are<br />
appended. Here is the help information for the main view:<br />
-b BEGIN Date. Display items for seven days beginning with this<br />
(fuzzy parsed) date.<br />
-g GROUPBY An element from [d,p,c,k] where:<br />
d: group by date<br />
p: group by project<br />
c: group by context<br />
k: group by keyword<br />
-c CONTEXT Regular expression. Include items with contexts matching<br />
CONTEXT (ignoring case) within the BEGIN ~ END interval.<br />
Prepend an exclamation mark, i.e., use !CONTEXT rather than<br />
CONTEXT, to include items which do NOT have contexts<br />
matching CONTEXT.<br />
-f FILE Regular expression. Include items with project file names<br />
matching FILE (ignoring case) within the BEGIN ~ END<br />
interval. Prepend an exclamation mark, i.e., use !FILE<br />
7
ather than FILE, to include items which do NOT have file<br />
names matching FILE.<br />
-k KEYWORD Regular expression. Include items with contexts matching<br />
KEYWORD (ignoring case) within the BEGIN ~ END interval.<br />
Prepend an exclamation mark, i.e., use !KEYWORD rather than<br />
KEYWORD, to include items which do NOT have keywords<br />
matching KEYWORD.<br />
-p PROJECT Regular expression. Include items with project titles<br />
matching PROJECT (ignoring case) within the BEGIN ~ END<br />
interval. Prepend an exclamation mark, i.e., use !PROJECT<br />
rather than PROJECT, to include items which do NOT have<br />
project titles matching PROJECT.<br />
-s SEARCH Regular expression. Include items containing SEARCH (ignoring<br />
case) in the <strong>task</strong> title or note within the BEGIN ~ END<br />
interval. Prepend an exclamation mark, i.e., use !SEARCH<br />
rather than SEARCH, to include items which do NOT have<br />
titles or notes matching SEARCH.<br />
-o OMIT String with characters from the following:<br />
a: actions<br />
b: <strong>task</strong> begin dates<br />
e: <strong>event</strong>s<br />
f: finished <strong>task</strong>s<br />
n: notes<br />
r: reminders<br />
t: available <strong>task</strong>s<br />
u: undated <strong>task</strong>s<br />
w: waiting <strong>task</strong>s<br />
Items with types belonging to OMIT will not be displayed.<br />
The other, non-interactive, views are invoked from the main display.<br />
item view: Press ’i’ to display the help information <strong>and</strong> open an entry bar<br />
to set the options or press TAB to select them from a drop-down list.<br />
Item view is similar to the main view but can display an arbitrary number<br />
of days <strong>and</strong> supports exporting in both iCal/vCal <strong>and</strong> CSV format.<br />
Initial entries for the drop-down selection list are set in ’item_history’<br />
in your ’~/.etm/rc’. Press ’p’ to print the resulting display.<br />
busy view: Press ’b’ to display the help information <strong>and</strong> open an entry<br />
bar to set the options or press TAB to select them from a drop-down<br />
list. Busy view lists busy <strong>and</strong>/or free times for a specified period in<br />
graphical <strong>and</strong>/or textual form. Options for the free time display control<br />
the opening <strong>and</strong> closing times, the minimum length of a block <strong>and</strong><br />
wrap time required at either end of a free block. Initial entries for the<br />
drop-down selection list are set in ’busy_history’ in your ’~/.etm/rc’.<br />
Press ’p’ to print the resulting display.<br />
8
ledger view: Press ’l’ to display the help information <strong>and</strong> open an entry<br />
bar to set the options or press TAB to select them from a drop-down<br />
list. Ledger view displays an accounting of time spent broken down<br />
<strong>and</strong> ordered by date, keyword or context in many ways. Exporting in<br />
both iCal/vCal <strong>and</strong> CSV format is supported. Initial entries for the<br />
drop-down selection list are set in ’ledger_history’ in your ’~/.etm/rc’.<br />
Press ’p’ to print the resulting display.<br />
When setting options for main, item, busy <strong>and</strong> ledger views, entering an empty string invokes<br />
the default options for the view. New settings from the current session are appended to the<br />
relevant history list.<br />
Display dates for <strong>task</strong>s<br />
We may want to be warned of an upcoming due date for a <strong>task</strong>. We may also want to be<br />
reminded of a <strong>task</strong> that is past due. The displayed interval of dates may or may not include<br />
today. When should <strong>task</strong>s be displayed? The approach taken by etm is the following:<br />
• If the due date for a <strong>task</strong> falls within the displayed interval, then display the <strong>task</strong> on its<br />
due date.<br />
• Else if the due date for a <strong>task</strong> falls before the displayed interval <strong>and</strong> the due date falls on<br />
or before today (the <strong>task</strong> is currently due or past due), then display the <strong>task</strong> on the first<br />
day of the displayed interval.<br />
• Else if the <strong>task</strong> has a begin date (the ’@b’ option was provided) <strong>and</strong> the begin date falls<br />
within the displayed interval, then display the <strong>task</strong> on its begin date.<br />
• Else if <strong>task</strong> has a begin date <strong>and</strong> the begin date falls before the displayed interval <strong>and</strong><br />
the begin date also falls on or before today, then display the <strong>task</strong> on the first day of the<br />
displayed interval.<br />
• Else do not display the <strong>task</strong>.<br />
Regular expression (regex) matching<br />
Etm supports the use of case-insensitive, regular expression matching when searching in main<br />
view <strong>and</strong> when filtering contexts, keywords <strong>and</strong>/or projects in all views. E.g., an option setting<br />
which included ’-c err<strong>and</strong>s’ would limit the display to items which contain ’err<strong>and</strong>s’ in the context<br />
field. Alternatively, within etm ’-c !err<strong>and</strong>s’ would limit the display to items which do not<br />
have contexts matching ’err<strong>and</strong>s’. Note: when using the comm<strong>and</strong> line the latter expression<br />
should be wrapped in single quotes, e.g.,<br />
9
e.py i -c ’!err<strong>and</strong>s’<br />
An excellent introduction to the use of regular expressions is provided by LearningtoUseRegularExpressions.<br />
Skip down to ’Matching Patterns in Text: The Basics’ <strong>and</strong> note that the surrounding<br />
’/’ delimiters are not needed in etm.<br />
Searching<br />
etm supports two types of case-insensitive, regular expression searches. Both types look for<br />
matches in the item description (title) <strong>and</strong> note fields. In the first type, the search expression<br />
is entered in the search box in the top, right-h<strong>and</strong> corner of the main view in the gui. Any<br />
matching item, regardless of date, will be displayed but, in the case of a repeating, non-<strong>task</strong><br />
item, only the first repetition will be displayed. For a repeating <strong>task</strong>, all finished repetitions<br />
will be displayed along with the first unfinished repetition.<br />
The second type involves using the search option, ’-s’, either from the comm<strong>and</strong> line or when<br />
setting options for a view in the gui. This type of search only lists items whose dates fall within<br />
the displayed interval of dates but, in the case of a repeating item, shows every instance of the<br />
repetition falling within these dates.<br />
Export to iCal/vCal<br />
The item view can be exported to applications supporting the iCal (vcalendar) format such as<br />
Google Calendar, Sunbird, KOrganizer, iCal <strong>and</strong>, one of my favorites, phpicalendar. Simply set<br />
the item view options to select the dates <strong>and</strong> items you wish <strong>and</strong> then append ’-x NameOfCalendar’.<br />
E.g., ’-x classes’ would create a calendar named ’classes.ics’.<br />
Export to CSV<br />
Item <strong>and</strong> ledger views also support exporting in CSV (comma separated values) format. Files<br />
in this format can be imported into most spreadsheet <strong>and</strong> database programs. Item view<br />
exports contain all fields for the relevant items <strong>and</strong> ledger view contains two fields, one for<br />
the breakdown <strong>and</strong> one for the corresponding times in minutes. Here, for example, is a ledger<br />
view with ’-i 2120’ in the option settings:<br />
9.8h) 2010-06-02<br />
3.0h) personal<br />
3.0h) social<br />
1.3h) computer<br />
1.3h) work<br />
1.3h) report<br />
1.0h) gym<br />
10
1.0h) personal<br />
1.0h) health<br />
0.5h) phone<br />
0.5h) CR<br />
0.5h) E<br />
4.5h) 2010-06-03<br />
1.0h) personal<br />
1.0h) social<br />
3.5h) office<br />
1.5h) CR<br />
1.5h) E<br />
2.0h) work<br />
2.0h) staff<br />
<strong>and</strong> here is the associated CSV export:<br />
"key","minutes"<br />
"2010-06-02","588"<br />
"2010-06-02:None:personal","180"<br />
"2010-06-02:None:personal:social","180"<br />
"2010-06-02:computer","78"<br />
"2010-06-02:computer:work","78"<br />
"2010-06-02:computer:work:report","78"<br />
"2010-06-02:gym","60"<br />
"2010-06-02:gym:personal","60"<br />
"2010-06-02:gym:personal:health","60"<br />
"2010-06-02:phone","30"<br />
"2010-06-02:phone:CR","30"<br />
"2010-06-02:phone:CR:E","30"<br />
"2010-06-03","270"<br />
"2010-06-03:None:personal","60"<br />
"2010-06-03:None:personal:social","60"<br />
"2010-06-03:office","210"<br />
"2010-06-03:office:CR","90"<br />
"2010-06-03:office:CR:E","90"<br />
"2010-06-03:office:work","120"<br />
"2010-06-03:office:work:staff","120"<br />
Project details<br />
Project files are text files with the default extension .txt within etmdata (’~/.etmdata’ by default)<br />
<strong>and</strong> any sub-directories.<br />
11
• The first line of each project file gives the project title together with any optional arguments.<br />
• Subsequent lines describe one of the six types of entries that are possible in etm data<br />
files. Each occupies a single line.<br />
Event: Something that will happen on a particular day (or days) <strong>and</strong>,<br />
perhaps, at a particular time. An <strong>event</strong> cannot be begun or finished<br />
either early or late. Events may or may not require our participation.<br />
Event lines begin with ’*’ (asterisk).<br />
Reminder: Similar to an <strong>event</strong> but without duration. A starting time is<br />
required <strong>and</strong> a list of starting times can be provided. If alerts are<br />
not specified, one will be triggered at each starting time. Reminder<br />
lines begin with ’&’ (ampers<strong>and</strong>).<br />
Task: Something that needs to be done. It may or may not have a due<br />
date, <strong>and</strong> if it does, it might be begun <strong>and</strong> even finished before the<br />
due date. It might also be finished <strong>and</strong> even begun after the due<br />
date. Task lines begin with one or more ’.’ (period) or ’_’ (underscore).<br />
Action: A record of the time-consuming action required to complete a<br />
<strong>task</strong> or participate in an <strong>event</strong>. Actions are not reminders, they are<br />
instead records of how time was actually spent. Action lines begin<br />
with ’~’ (tilde).<br />
Note: A record of some useful information. Note lines begin with ’!’<br />
(exclamation point).<br />
Arguments provided on the first line can include most of those used on subsequent lines.<br />
When provided, they become the default values for subsequent <strong>task</strong>s, <strong>event</strong>s <strong>and</strong> activities.<br />
Events<br />
Event lines have the following format:<br />
* [Options]<br />
Options:<br />
date @d YYYY-MM-DD with fuzzy parsing (required)<br />
context @c string<br />
goto @g a list of related file paths <strong>and</strong> urls in the format<br />
"long[|short]". Lists will display "short" if provided,<br />
<strong>and</strong> otherwise "long". If selected in the gui, "long"<br />
will be opened using the default application.<br />
keywords @k string or list of strings<br />
repeat @r d)aily, w)eekly, m)onthly, y)early, l)ist<br />
12
Default: none. With l)ist only dates specified<br />
by @l will be included<br />
interval @i 2, 3, ... Default: 1<br />
until @u YYYY-MM-DD with fuzzy parsing. Default: forever<br />
weekday @w MO, TU, ..., MO(-1) or a list of weekdays.<br />
Integers can be used instead with 0=MO, 1=TU <strong>and</strong><br />
so forth.<br />
week @W integer week number or list of week numbers.<br />
monthday @m integer month day or list of monthdays.<br />
month @M integer month number or list of month numbers.<br />
include @l a list of (non matching) dates to include.<br />
exclude @x a list of (matching) dates to exclude.<br />
starttime @s HH:MM[AP] fuzzy parsing.<br />
endtime @e HH:MM[AP] fuzzy parsing (requires starttime).<br />
alerts @a a list of minutes before --starttime for alerts.<br />
note @n string<br />
Events without a starttime are regarded as all-day <strong>event</strong>s.<br />
Note: Lists in <strong>event</strong>s (above) <strong>and</strong> reminders <strong>and</strong> <strong>task</strong>s (below) must be comma separated <strong>and</strong><br />
enclosed in parentheses. A list of numbers can also be specified using the range operator, e.g.,<br />
range(1,5) = (1,2,3,4) <strong>and</strong> range(5,20,3) = (5,8,11,14,17).<br />
Reminders<br />
Reminder lines have the following format:<br />
& [Options]<br />
Options:<br />
date @d YYYY-MM-DD with fuzzy parsing (required)<br />
context @c string<br />
goto @g a list of related file paths <strong>and</strong> urls in the format<br />
"long[|short]". Lists will display "short" if provided,<br />
<strong>and</strong> otherwise "long". If selected in the gui, "long"<br />
will be opened using the default application.<br />
keywords @k string or list of strings<br />
repeat @r d)aily, w)eekly, m)onthly, y)early, l)ist<br />
Default: none. With l)ist only dates specified<br />
by @l will be included<br />
interval @i 2, 3, ... Default: 1<br />
until @u YYYY-MM-DD with fuzzy parsing. Default: forever<br />
weekday @w MO, TU, ..., MO(-1) or a list of weekdays.<br />
Integers can be used instead with 0=MO, 1=TU <strong>and</strong><br />
so forth.<br />
13
week @W integer week number or list of week numbers<br />
monthday @m integer month day or list of monthdays<br />
month @M integer month number or list of month numbers<br />
include @l a list of (non matching) dates to include.<br />
exclude @x a list of (matching) dates to exclude.<br />
starttime @s a time or a list of times (fuzzy parsing).<br />
alerts @a a list of minutes before --starttime for alerts.<br />
Default: 0.<br />
note @n string<br />
Alerts (for <strong>event</strong>s <strong>and</strong> reminders)<br />
Alerts for an <strong>event</strong> or reminder are set by adding an ’@a’ field to the <strong>event</strong>, e.g.,<br />
* phone conference with CR @d tue @s 2p @a (15, 5) ...<br />
would set alerts for 15 minutes before the <strong>event</strong> <strong>and</strong> 5 minutes before the <strong>event</strong>. What happens<br />
when an alert is triggered is determined by the setting for ’alertcmd’ in ’~/.etm/rc’. With the<br />
default setting:<br />
alertcmd = ’’<br />
a message would be displayed with the current time <strong>and</strong> the text of the message.<br />
Alternatively, on a mac (OS X leopard), you could use<br />
alertcmd = ’’’say -v "Alex" "%(t)s. %(m)s."’’’<br />
to announce the message using the voice ’Alex’ or<br />
alertcmd = ’’’say -v "Alex" "%(t)s. %(m)s."; growlnotify -t %(T)s -m "%(m)s"’’’<br />
to have the message both spoken <strong>and</strong> displayed using growl. On linux systems with ’notifysend’,<br />
a warning sound followed by a 5 second popup display of the alert message could be<br />
produced with<br />
alertcmd = ’’’aplay /usr/share/sounds/purple/receive.wav 2> /dev/null; notify-send "<br />
With -t 0 the display would remain until you dismiss it.<br />
More generally, any comm<strong>and</strong> that will accept a string argument could be used.<br />
14
Tasks<br />
Tasks lines have a slightly different format:<br />
[._] [Options]<br />
one or more periods or underscores: a <strong>task</strong> in ’outline’ format with the<br />
level of indention in the outline corresponding to the number of<br />
periods or underscores. The use of underscores rather than periods<br />
adds the <strong>task</strong> to the prerequisites of the next group of lower level<br />
<strong>task</strong>s (sub outline) within the same branch. Examples below.<br />
Options:<br />
date @d YYYY-MM-DD with fuzzy parsing (required for repeating<br />
<strong>task</strong>s)<br />
context @c string<br />
goto @g a list of related file paths <strong>and</strong> urls in the format<br />
"long[|short]". Lists will display "short" if provided,<br />
<strong>and</strong> otherwise "long". If selected in the gui, "long"<br />
will be opened using the default application.<br />
keywords @k string or list of strings<br />
repeat @r d)aily, w)eekly, m)onthly, y)early, l)ist<br />
Default: none. With l)ist only dates specified<br />
by @l will be included<br />
interval @i 2, 3, ... Default: 1<br />
until @u YYYY-MM-DD with fuzzy parsing. Default: forever<br />
weekday @w MO, TU, ..., MO(-1) or list of weekdays.<br />
Integers can be used instead with 0 = MO, 1=TU <strong>and</strong> so forth.<br />
week @W integer week number or list of week numbers<br />
monthday @m integer month day or list of monthdays<br />
month @M integer month number or list of month numbers<br />
include @l a list of (non matching) dates to include<br />
exclude @x a list of (matching) dates to exclude<br />
overdue @o k)eep, r)estart, s)kip. Default: k<br />
note @n string<br />
begin @b integer number of days before date<br />
finished @f YYYY-MM-DD with fuzzy parsing<br />
period @p time in minutes required to complete <strong>task</strong>. Perhaps<br />
an estimate for an unfinished <strong>task</strong> or a record of the<br />
actual time spent for a completed <strong>task</strong>.<br />
Outline format details<br />
The number of periods or underscores gives the level of indention of the <strong>task</strong> in the outline<br />
<strong>and</strong> the level determines <strong>task</strong> prerequisites within a given branch of the outline. Tasks at the<br />
15
same level in a branch can be completed in any order but none can be started until all higher<br />
level <strong>task</strong>s in the same branch have been completed.<br />
The following example illustrates the possibilities. The right-h<strong>and</strong> column shows the prerequisites<br />
for the <strong>task</strong>s in the left-h<strong>and</strong> column. E.g., <strong>task</strong> 9 will not be available until <strong>task</strong>s 3, 4,<br />
5, 6 <strong>and</strong> 8 have been completed.<br />
. <strong>task</strong> 1 prerequisites for <strong>task</strong> 1: ()<br />
.. <strong>task</strong> 2 prerequisites for <strong>task</strong> 2: (1)<br />
_ <strong>task</strong> 3 prerequisites for <strong>task</strong> 3: ()<br />
_ <strong>task</strong> 4 prerequisites for <strong>task</strong> 4: ()<br />
.. <strong>task</strong> 5 prerequisites for <strong>task</strong> 5: (3, 4)<br />
___ <strong>task</strong> 6 prerequisites for <strong>task</strong> 6: (3, 4, 5)<br />
... <strong>task</strong> 7 prerequisites for <strong>task</strong> 7: (3, 4, 5)<br />
___ <strong>task</strong> 8 prerequisites for <strong>task</strong> 8: (3, 4, 5)<br />
.... <strong>task</strong> 9 prerequisites for <strong>task</strong> 9: (3, 4, 5, 6, 8)<br />
... <strong>task</strong> 10 prerequisites for <strong>task</strong> 10: (3, 4, 5)<br />
.. <strong>task</strong> 11 prerequisites for <strong>task</strong> 11: (3, 4)<br />
... <strong>task</strong> 12 prerequisites for <strong>task</strong> 12: (3, 4, 11)<br />
Due dates for <strong>task</strong>s with prerequisites<br />
A <strong>task</strong> with one or more prerequisites but without a due date will implicitly be assigned the<br />
due date of the last prerequisite with an explicit due date.<br />
When assigning explicit due dates for dependent <strong>task</strong>s, be sure not to assign a date that is<br />
earlier than that assigned to any of its prerequisites --- doing so would lead to unpredictable<br />
results.<br />
Actions<br />
Actions are simpler still:<br />
~ [Options]<br />
Options:<br />
date @d a date. Required.<br />
period @p elapsed time in minutes. Required.<br />
context @c string.<br />
goto @g a list of related file paths <strong>and</strong> urls in the format<br />
"long[|short]". Lists will display "short" if provided,<br />
<strong>and</strong> otherwise "long". If selected in the gui, "long"<br />
will be opened using the default application.<br />
keywords @k string or list of strings. Keywords containing a<br />
colon(s), e.g., "x:y", "x:z", will be split to form<br />
groups <strong>and</strong> subgroups when aggregating times.<br />
note @n string<br />
16
Notes<br />
Notes are the simplest of all:<br />
~ [Options]<br />
Options:<br />
date @d a date. Required. The current date will be used if<br />
one is not provided.<br />
context @c string.<br />
goto @g a list of related file paths <strong>and</strong> urls in the format<br />
"long[|short]". Lists will display "short" if provided,<br />
<strong>and</strong> otherwise "long". If selected in the gui, "long"<br />
will be opened using the default application.<br />
keywords @k string or list of strings. Keywords containing a<br />
colon(s), e.g., "x:y", "x:z", will be split to form<br />
groups <strong>and</strong> subgroups when aggregating times.<br />
note @n string<br />
Anniversary substitutions<br />
When items are processed whose titles contain a string of the form !YYYY!, the string will be<br />
replaced with N[st | nd | th] where N is the number of years from YYYY until the current year.<br />
E.g., On August 23, 2010, the <strong>event</strong>:<br />
* Will’s !1985! birthday @r y @M 8 @m 23<br />
would be displayed as:<br />
Will’s 25th birthday<br />
Goto links<br />
All etm item types support the use of goto lists using the format:<br />
e.g.,<br />
@g (longname1[|shortname1], longname2[|shortname2], ...)<br />
@g (http://freshmeat.net/projects/etm|etm, ~/Documents/ETMUsersManual.pdf)<br />
When a item containing such a goto list is selected in the gui, pressing ’g’ would open a selection<br />
dialog for choosing an item from the list to open using the system default application.<br />
The selection list displays short names, if provided, <strong>and</strong> otherwise long names.<br />
17
Fuzzy parsing of dates <strong>and</strong> times<br />
Fuzzy parsing is supported by etm running in interactive mode (running ’e.py w’) thanks to<br />
dateutil. A few examples should provide an idea of what’s possible. Suppose that it is currently<br />
Tuesday, February 17, 2009. Then in fields calling for a date:<br />
entering would give after fuzzy parsing<br />
-------- ------------------------------tue<br />
2009-02-17<br />
thu 2009-02-19<br />
mon 2009-02-23<br />
23 2009-02-23<br />
’mar 2’ 2009-03-02<br />
3/2 2009-03-02<br />
+45 2009-04-03<br />
-90 2008-11-19<br />
Similarly, in fields calling for a time, entering ’6p’ would give after parsing ’06:00PM’. Entering<br />
’6’, on the other h<strong>and</strong>, would give ’2009-02-06’. Notice that dates which include spaces such<br />
as ’mar 2’ must be enclosed in quotes.<br />
Note: Though it is possible to create projects <strong>and</strong> new <strong>task</strong>s <strong>and</strong> <strong>event</strong>s using a text editor,<br />
it is stongly recommended that you use the gui version of etm (by running ’e.py w’). The gui<br />
version provides fuzzy parsing, reports of any parsing errors with an opportunity to correct<br />
them plus a scrollable help screen.<br />
Note: in the fuzzy parsing example above, ’tue’ exp<strong>and</strong>s to ’2009-02-17’ <strong>and</strong> so would ’tuE’<br />
but ’tu’ would raise an error. Three letter (but case-insensitive) weekday abbreviations must<br />
be used with fuzzy parsing. In recurrence rules that specify weekdays, on the other h<strong>and</strong>,<br />
both ’tue’ <strong>and</strong> ’tu’ would raise an error but ’TU’ would not. In specifying weekdays in repeated<br />
<strong>task</strong>s/<strong>event</strong>s, two character weekday abbreviations must be used <strong>and</strong> both characters must be<br />
upper case. This inconsistency is due to the fact that fuzzy parsing <strong>and</strong> recurrence rules are<br />
separate components of dateutil. Needed corrections are provided automatically by etm when<br />
creating items using the gui version but not when creating items with a text editor.<br />
Note: <strong>event</strong>s, actions <strong>and</strong> repeating <strong>task</strong>s must have a date specified by the date, @d, field.<br />
For repeating <strong>task</strong>s <strong>and</strong> <strong>event</strong>s this date should be the first date satisfying the recurrence rule<br />
on which the <strong>task</strong> is due or the <strong>event</strong> occurs. The only exceptions are that with repeating, list<br />
<strong>task</strong>s or <strong>event</strong>s, @r l, the first date from the include dates field, @l, will be used as the starting<br />
date if the date field is not provided.<br />
Due dates for repeating <strong>task</strong>s<br />
A repeating <strong>task</strong> that is finished on its due date presents no difficulty. But what if it’s finished<br />
early or becomes overdue? There are three options with etm:<br />
18
@o k: Keep the current due date if it becomes overdue <strong>and</strong> use the next due date<br />
from the recurrence rule if it is finished early. This would be appropriate, for<br />
example, for the <strong>task</strong> ’file tax return’. The return due April 15, 2009 must still<br />
be filed even if it is overdue <strong>and</strong> the 2010 return won’t be due until April 15,<br />
2010 even if the 2009 return is finished early.<br />
@o s: Skip overdue due dates <strong>and</strong> set the due date for the next repetition to the first<br />
due date from the recurrence rule on or after the current date. This would be<br />
appropriate, for example, for the <strong>task</strong> ’put out the trash’ since there is no point<br />
in putting it out on Tuesday if it’s picked up on Mondays. You might just as<br />
well wait until the next Monday to put it out. There’s also no point in being<br />
reminded until the next Monday.<br />
@o r: Restart the repetitions based on the last completion date. Suppose you want<br />
to mow the grass once every ten days <strong>and</strong> that when you mowed yesterday,<br />
you were already nine days past due. Then you want the next due date to be<br />
ten days from yesterday <strong>and</strong> not today. Similarly, if you were one day early<br />
when you mowed yesterday, then you would want the next due date to be ten<br />
days from yesterday <strong>and</strong> not ten days from today.<br />
Repeating <strong>task</strong>s with prerequisites<br />
As with non-repeating <strong>task</strong>s, the only thing to remember is not to assign earlier due dates to<br />
dependent <strong>task</strong>s.<br />
Using the date calculator<br />
Need to perform arithmetic on dates? etm makes it easy to compute the difference in days<br />
between two dates or the date that results from adding (or subtracting) a number of days to a<br />
date:<br />
Or, from the comm<strong>and</strong> line:<br />
$ e.py c feb 15 + 30 days<br />
2010-02-15 + 30 days = 2010-03-17<br />
$ e.py c mar 17 - feb 15<br />
2010-03-17 - 2010-02-15 = 30 days<br />
$ e.py c feb 15 - 90 days<br />
2010-02-15 - 90 days = 2009-11-17<br />
19
Note that adding/subtracting days is also built into etm’s fuzzy parsing. E.g. if it is currently<br />
2010-02-15, then in a field calling for a date, ’+45’ would give ’2010-04-01’ <strong>and</strong> ’-90’ would give<br />
’2009-11-17’.<br />
Installation/Updating<br />
etm can be installed in the normal python way: download, unpack the etm source in a temporary<br />
directory, open a terminal (’Comm<strong>and</strong> Prompt’ in Windows), cd to that directory <strong>and</strong> then<br />
run:<br />
sudo python setup.py install<br />
Windows users can omit the ’sudo’. The temporary directory can then be removed. This<br />
will download <strong>and</strong> install any necessary supporting modules (dateutil, icalendar), install the<br />
etm package in the ’site-packages’ subdirectory of your python distribution <strong>and</strong> install the<br />
executable e.py in the ’bin’ subdirectory of your python distribution.<br />
If you have setuptools installed, you can skip downloading <strong>and</strong> use:<br />
sudo easy_install -U etm<br />
either to install etm or to update to the latest version.<br />
Easy_install is part of the python package setuptools. To install it, download the appropriate<br />
egg file for your platform, e.g.,<br />
setuptools-0.6c11-py2.6.egg.sh<br />
Then cd to the directory containing the egg file <strong>and</strong>, if necessary, rename it to remove the ’.sh’<br />
extension:<br />
mv setuptools-0.6c11-py2.6.egg.sh setuptools-0.6c11-py2.6.egg<br />
The last step is to run the (renamed) egg file as if it were a shell script:<br />
sudo sh setuptools-0.6c11-py2.6.egg<br />
Setuptools will install itself using the matching version of python (e.g. ’python2.6’), <strong>and</strong> will<br />
place the ’easy_install’ executable in the default location for python scripts.<br />
OS X users<br />
A st<strong>and</strong>alone version, etm.app, is provided for Mac OS X users as a st<strong>and</strong>ard dmg file. Download<br />
this file, click on it <strong>and</strong> then drag etm.app to your Applications folder. Note that this<br />
application provides the gui version of etm but not the comm<strong>and</strong> line version.<br />
20
Temporary / local installation<br />
If you would like to try etm out without installing the system files or if you don’t have root<br />
privileges but would like to install etm for your own use, the process is simple. Unpack the<br />
etm source in a convenient directory, cd to that directory <strong>and</strong> then run<br />
./e.py [options]<br />
This does not require root privileges <strong>and</strong> will not install any system files but will create the<br />
user specific configuration, data <strong>and</strong> alert files mentioned below in your home directory. You<br />
could, of course, use aliases or symbolic links to these files <strong>and</strong> avoid even having to change<br />
to this directory, e.g., if these files are located in ETMDIR, then you could add these lines to<br />
your ~/.bash_profile:<br />
alias e.py=’ETMDIR/e.py’<br />
replacing ETMDIR, of course, with the actual path. These aliases would then function in the<br />
way described under Comm<strong>and</strong> line usage below.<br />
Files created <strong>and</strong> used by etm<br />
Configuration files<br />
The directory ’~/.etm’ <strong>and</strong> the following files are created the first time you run e.py.<br />
Test settings<br />
If the current working directory contains a file named rc when e.py is run then<br />
configuration settings, including the setting for etmdata, will be taken from that<br />
file instead of ~/.etm/rc.<br />
~/.etm/rc: All configuration settings are kept in this file. It will automatically be<br />
created if it doesn’t already exist <strong>and</strong> populated with default values. This<br />
configuration file is self-documented <strong>and</strong> can be freely edited. If you make<br />
changes you don’t like you can simply erase the offending part, or even the<br />
entire file, <strong>and</strong> it will be recreated with defaults the next time you run e.py.<br />
~/.etm/data/: Project files are, by default, kept in this directory <strong>and</strong> its subdirectories<br />
though the setting for etmdata can be changed in ’~/.etm/rc’. It is automatically<br />
created <strong>and</strong> populated with the rotating project files for <strong>event</strong>s<br />
<strong>and</strong> <strong>task</strong>s for the previous <strong>and</strong> current months discussed in Rotating data files<br />
below.<br />
~/.etm/export/: Views exported in iCal or CSV format are, by default, kept in this<br />
directory.<br />
21
Rotating data files<br />
Many times it will be convenient to create a project file to hold a collection of related items as<br />
in the illustrative case of the report. Often, however, items will be created that are independent<br />
of one another. There is no need to create separate project files in such circumstances.<br />
etm, in fact, will automatically create files that can you can use for such independent items.<br />
Furthermore, if ’rotate_files = True’ in your ’~/.etm/rc’, new files will be created each month<br />
<strong>and</strong> these files will be archived for you after one year.<br />
Suppose ’rotate_files = True’ <strong>and</strong> that it is currently February 2009. Then etm will automatically<br />
create ’<strong>task</strong>s_02.txt’, ’evnts_02.txt’, ’actns_02.txt’, ’notes_02.txt’ <strong>and</strong> ’rmdrs_02.txt’ the<br />
first time it is run. By default, <strong>task</strong>s, <strong>event</strong>s, actions, notes <strong>and</strong> reminders created during<br />
February will be written, respectively, to these files. Similar files will be automatically be created<br />
<strong>and</strong> become the defaults as subsequent months arrive. When February 2010 rolls around<br />
’<strong>task</strong>s_02.txt’ will automatically be moved to ’.2009-02_<strong>task</strong>s’, ’evnts_02.txt’ to ’.2009-02_evnts’<br />
<strong>and</strong> so forth <strong>and</strong> new ’<strong>task</strong>s_02.txt’, ’evnts_02.txt’ <strong>and</strong> so forth will be created. Since etm only<br />
processes files with the extension ’.txt’, the monthly archives of your past <strong>task</strong>s, <strong>event</strong>s <strong>and</strong><br />
actions will be kept until you decide to delete them but only the last year’s worth will be loaded<br />
<strong>and</strong> processed by etm. etm will also create files ’done_02.txt’, ’done_03.txt’ <strong>and</strong> so forth, store<br />
finished copies of repeating <strong>task</strong>s in these files <strong>and</strong> archive them after a year.<br />
If, on the other h<strong>and</strong>, ’rotate_files = False’. Then etm will automatically create ’<strong>task</strong>s.txt’,<br />
’evnts.txt’, ’actns.txt’, ’notes.txt’, ’rmdrs.txt’ <strong>and</strong> ’done.txt’ the first time it is run. By default,<br />
<strong>task</strong>s, <strong>event</strong>s, actions, notes, reminders <strong>and</strong> finished copies of repeating <strong>task</strong>s will be written,<br />
respectively, to these files. These files will neither be rotated nor archived but backups will be<br />
made when any action taken by etm modifies them.<br />
When a non-repeating <strong>task</strong> is finished, a date stamp containing the completion date is added<br />
to the <strong>task</strong> so that if, e.g.,<br />
. my non-repeating <strong>task</strong> @d 2009-02-17<br />
were marked finished on Feburary 18, 2009 then it would become:<br />
. my non-repeating <strong>task</strong> @d 2009-02-17 @f 2009-02-18<br />
On the other h<strong>and</strong>, when a repeating <strong>task</strong> is marked finished, the due date for the <strong>task</strong> is<br />
updated to the next due date <strong>and</strong> a copy of the <strong>task</strong> with the repetition details removed <strong>and</strong><br />
the completion date added is appended to the done file. If, e.g.,<br />
. my repeating <strong>task</strong> @d 2009-02-17 @r d @i 7<br />
were finished on Feb 18, 2009, then it would become:<br />
. my repeating <strong>task</strong> @d 2009-02-24 @r d @i 7<br />
22
<strong>and</strong><br />
. my repeating <strong>task</strong> @d 2009-02-17 @f 2009-02-18<br />
would be appended to the appropriate done file.<br />
A repeating <strong>task</strong> that is set to skip overdue due dates presents a new situation since it can<br />
have repetitions that are never finished <strong>and</strong> yet never become overdue. Suppose, for example,<br />
that I need to put the trash on the curb for pickup every Friday:<br />
. take out trash @d 2009-02-20 @r w @w FR @o s<br />
where the ’@o s’ means that the <strong>task</strong> will be skipped if it becomes overdue. Then if I forget to<br />
take out the trash on the 20th, on February 21 this <strong>task</strong> would be automatically be replaced<br />
by:<br />
. take out trash @d 2009-02-27 @r w @w FR @o s<br />
Since the February 20 repetition of this <strong>task</strong> was skipped rather than finished, no record would<br />
be made of a completion in the done file. The completion record would thus show only the<br />
dates on which the <strong>task</strong> was actually marked finished.<br />
Finally, a backup is made of any file before any action using etm w would change it. E.g.,<br />
before a <strong>task</strong> in ’02_<strong>task</strong>s.txt’ would be marked finished, the file would first be copied to<br />
’.02_<strong>task</strong>s.bk1’. If ’.02_<strong>task</strong>s.bk1’ already exists, it would first be moved to ’.02_<strong>task</strong>s.bk2’.<br />
Similarly, if ’.02_<strong>task</strong>s.bk2’ already exists, then it would be first be moved to ’.02_<strong>task</strong>s.bk3’<br />
<strong>and</strong> so forth. In this way, up to ’numbaks’ (3 by default) rotating backups of are kept with<br />
’.bk1’ the most recent. Further, a record showing the <strong>task</strong> before <strong>and</strong> after the change would<br />
be appended to ’.02_<strong>task</strong>s.log’.<br />
Pickle files<br />
For each data file in your data directory <strong>and</strong> its subdirectories, etm makes a copy for internal<br />
use. If there is a data file named ’<strong>task</strong>s.txt’, for example, then etm will create a version for<br />
internal use named ’<strong>task</strong>s.pkl’. These ’pkl’ files are in a special, ’pickle’ format that permits<br />
them to be reloaded by etm more quickly than their ’txt’ counterparts. Whenever a ’txt’ file is<br />
modified, the corresponding ’pkl’ file is recreated.<br />
Comm<strong>and</strong> line usage<br />
Run<br />
e.py h<br />
23
for complete usage information:<br />
Information:<br />
h Show this help message<br />
c Process a date expression of the form ’date (+-) string’<br />
where ’string’ is either a date or an integer followed<br />
by the word ’days’ <strong>and</strong> return the result. E.g., ’dec 1 +<br />
90 days’ or ’nov 30 - sep 1’. Note: ’+’ cannot be used<br />
when ’string’ is a date.<br />
n Display the latest available version of etm<br />
w Start the wx(Python) based gui version of etm. If the<br />
current working directory contains a file named ’emtrc’<br />
then settings from that file will be used instead of those<br />
from ’~/.etm/rc’.<br />
Displays:<br />
i [I] Display a list of <strong>event</strong>s, actions <strong>and</strong> <strong>task</strong>s using comm<strong>and</strong> line<br />
options [first prompting for options <strong>and</strong> displaying help<br />
information].<br />
b [B] Display busy/free times using comm<strong>and</strong> line options [first<br />
prompting for options <strong>and</strong> displaying help information].<br />
l [L] Display a reckoning of time spent in <strong>event</strong>s <strong>and</strong> actions<br />
using comm<strong>and</strong> line options [first prompting for options <strong>and</strong><br />
displaying help information].<br />
or, for example,<br />
e.py i -h<br />
to get usage information for item view.<br />
Run<br />
e.pyw<br />
to open the wx(python) GUI interface <strong>and</strong> press F1 to see a list of available comm<strong>and</strong>s.<br />
Alternatively, a shell script such as:<br />
#!/bin/bash<br />
e.pyw &<br />
could be created <strong>and</strong> automatically invoked by your startup process. Under OS X, naming this<br />
file using the suffix ’comm<strong>and</strong>’, e.g., ’etm.comm<strong>and</strong>’, would allow you to add the file to your<br />
login items <strong>and</strong>/or add the comm<strong>and</strong> to your dock.<br />
24
Example Files<br />
The files in ’etm-eg.tgz’ (simple examples), ’etm-prob.tgz’ (erroneous entries) <strong>and</strong> ’etm-egtest.tgz’<br />
(stress tests) both illustrate <strong>and</strong> test etm’s features. The usage for each is the same.<br />
Unpack the tarball, then cd to the resulting directory <strong>and</strong> run:<br />
python make_egs.py<br />
Running ’make_egs.py’ creates a series of data <strong>and</strong> other supporting files using the templates<br />
in the various *.eg files to produce corresponding *.txt files with suitable dates for illustrating<br />
<strong>and</strong> testing etm. Any existing *.txt files will be removed in the process.<br />
Don’t change the directory name<br />
As a safety feature, ’make_egs.py’ will only run if the directory name is unchanged.<br />
A file named ’rc’ will also be created based on the settings in your ’~/.etm/rc’ but with the<br />
setting for ’etmdata’ changed to point to the current directory. You can then run either e.py<br />
or e.pyw from this directory <strong>and</strong> the example entries will be the only ones displayed.<br />
The created data files should illustrate what’s possible. Complete some of the repeating <strong>task</strong>s<br />
by pressing ’f’ <strong>and</strong> see what happens. Check ledger reports by pressing ’l’ <strong>and</strong> using various<br />
options. Look at the busy/free report by pressing ’b’. Make any changes you like but remember<br />
that all *.txt files in the current directory will be overwritten whenever make_egs.py is run.<br />
The created *.txt <strong>and</strong> other supporting files can always be removed by changing to the ’eg’<br />
directory <strong>and</strong> running<br />
python make_egs.py -r<br />
This will restore the ’eg’ directory to its initial state <strong>and</strong> pr<strong>event</strong> the examples from appearing<br />
in your etm displays.<br />
License<br />
Copyright (c) 2009-2010 Daniel Graham . All rights reserved.<br />
This program is free software; you can redistribute it <strong>and</strong>/or modify it under the terms of the<br />
GNU General Public License as published by the Free Software Foundation; either version 3 of<br />
the License, or (at your option) any later version.<br />
http://www.gnu.org/licenses/gpl.html<br />
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;<br />
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR<br />
PURPOSE. See the GNU General Public License for more details.<br />
25