Merge branch '2.0.0' of tasktools.org:task into 2.0.0

This commit is contained in:
Federico Hernandez 2011-09-09 06:38:57 +02:00
commit 1dc0230aba
2 changed files with 66 additions and 1 deletions

59
EXPOSITION Normal file
View file

@ -0,0 +1,59 @@
Startup
On startup, main creates a global Context object, then calls the
Context::initialize and Context::run methods.
Context is a large object that holds all task information, both in terms of
the task data, and intermediate run-time data. Having one global Context
object means we don't have 50 global variables. Context is therefore just a
big bucket of data.
Context::initialize sets up all the data and processes the command line. The
initialization process is a big chicken-and-egg problem, because the command
line depends on configuration (aliases) and the command line can force a
reload of configuration (rc:foo). This is solved by look-ahead: the command
line is scanned for 'rc:xxx' and 'rc.data.location:xxx' arguments, then later
for overrides.
The Context::run method handles all the debug output and exceptions. Its
main purpose is to set up exception handling and call Context::dispatch.
Command Line Parsing
Command line parsing is difficult because of all the ambiguity. The solution
is to make several passes over the command line. For example, the task
command determines whether subsequent arguments are interpreted as part of a
filter or set of modifications.
Dispatch
Dispatch is simple: once the command line is parsed, the command is used to
look up a command object, then call its execute method.
Context stores an associative map of command object pointers indexed by a
string. This means the 'done' string is an index to the CmdDone object that
implements the functionality.
Command Objects
Column Objects
GC
TDB2
Filter
Sorting
Render

View file

@ -2,7 +2,7 @@
FH month and year are treated as IDs
* project.t
PB problem known, disabled output (???)
PB There is a bug in the calculation
* text.t
PB need to use a UTF-8 friendly way of doing input[--eol].
@ -18,4 +18,10 @@ FH merge fails because of missing undo.data in data dirs.
FH 'task info' shows tasks from the completed.data file when doing a filter on the ID
could it be confused and interpretes this as an UUID
* uuid.t
PB There is a (likely) timezone problem in uuid.t that causes an off-by-one day
problem that we have seen before.
* bug.concat.t
PB The word 'original' is parsed as 'or'(operator) ' '(space) 'iginal'(word).