|o||The entries no longer appear on the default listing (tdl list / tdll)|
|o||The entries are eligible to appear on the report list (tdl report)|
|o||The entries are eligible for removal by the purge command (tdl purge.)|
datespec is the time at which the entry/entries should be marked as having been completed. The default is to mark them completed at the current time. The competion time of an entry affects whether it is shown by the report command for a particular range of reported times.
The format for datespec is described in the DATE SPECIFICATION section later in this page.
tdl edit index_to_change [new_text]
This command is used to change the text of an entry. If no [new-text] is provided, you will be prompted with the old text to edit interactively. (This is only useful if the GNU readline library has been linked in.)
Note, in earlier versions, edit could be used to change the start-time of one or more entries. This is now handled by the defer command.
The exit command is used to exit from tdl when it is used in interactive mode.
The exit command is not available in the command line mode, where it would not
The exit command writes any pending updates to the database before exiting. Compare the quit command, which loses all updates made during the current tdl run.
tdl export filename index_to_export ...
This command is used to create a new TDL database (whose name is given by the filename argument). The initial contents of the new database are the entries specified by the list of indices following the filename, in that order. Each index becomes a top-level entry of the new database. The operation is read-only on the original database.
This command displays a summary of use of each of the commands.
tdl ignore index_to_ignore ...
The ignore command puts one or more entries into an ignored state. It is
actually implemented in the same way as marking them as done, but as though
they were done a very long time ago. Thus, ignored entries will be deleted
by any subsequent purge operation.
I added this feature because, when applying remove to several entries, I kept getting tripped up by the indices changing below the entry that was removed (I kept removing the wrong entries later by not using the revised indices). Instead, I can ignore them and rely on a periodic purge to clean up the database.
Another use for the ignore command would be to move moribund entries into a wastebasket to stop them cluttering up the normal listing, but without removing them entirely in case you need to reprieve them later.
If you need to un-ignore an entry, just undo it
tdl import filename
This command is used to merge entries from the TDL database filename into the default TDL database (i.e. the one that most of the other commands would be accessing).
You might use this command if you had a number of separate TDL databases, and wanted to merge their entries to form one combo database.
tdl into new_parent_index indices_to_move ...
This command moves one or more entries under a new parent entry. It is equivalent to the above command when the new_parent_index argument has ".0" appended to it.
tdll [-v] [-a] [-p] [-m] [-1...9] [<min-priority>] [<parent_index>|<search_conditions...]
The list or its synonymous ls command is used to display the entries in the database. By default, only entries that have not been marked done and which dont have start times deferred into the future are shown. If you want to display all entries, include the -a option (which means all). If you want to display the dates and times when the entries were added and/or done, include the -v option (which means verbose). The -p option stands for postponed. It means that tasks which are deferred or postponed are shown as well as open tasks.
By default, only entries having normal, high or urgent priority are shown. To change the minimum priority shown, specify the min-priority argument. For example, tdll h will only show entries with priority high or urgent.
By default, the whole database is scanned. If you only want to show part(s) of the database, additional arguments can be given. These are the indices of the top node of each part of the database you want to show. So if your database contains entries with indices 1, 2, 2.1, 2.2, 2.2.1, 3 and 4, the command
tdl list -a 2
will show all entries 2, 2.1, 2.2 and 2.2.1, whether or not they are completed.
Also by default, all entries in the database, at any depth, will be shown. If you only wish to show top-level entries, for example, you can use
tdl list -1
This lists level-1 entries. Any level-1 entry with hidden child entries underneath it will show a summary of how many such children there are. For example, the output
3 [2/7] A top level entry
means that the entry with index 3 has a total of 7 entries underneath it, of which 2 are still open and 5 are completed (i.e. theyve had tdl done applied to them.)
Because the single digit arguments are used this way for the list subcommand, the normal negative index method cant be used to specify an entry a certain distance from the end of the list. If you want to do this, use a syntax like
tdl list -- -1
to show the last index in the array, or
tdl list -2 -- -3 -2 -1
to show level-1 and level-2 entries within the last 3 level-1 entries in the list.
Each search condition specifies a case-insensitive substring match that is applied to all parent indices further on in the arguments. (If no parent indices are given, all the search conditions are anded together and applied to filter all the nodes that would be shown according to the depth, priority etc arguments).
Each search condition takes one of the following forms
In each case, an entry will match if substring is actually a substring of the text of that entry. In the second form (where the number may be 0, 1, 2 or 3), a match occurs if there are up to that many errors in the substring. An error is a single character inserted, removed or changed.
This option is most useful if you have a large database and can remember you have an entry somewhere containing particular word(s), but cant remember where it is.
If you need regular expression matching, the best approach would be to run tdll from the shell and pipe the output to grep. The internal matching does approximate matches with keys up to 31 characters.
By default, the listing is produced with colour highlighting. The -m option can be used to produce a monochrome listing instead. Alternatively, the TDL_LIST_MONOCHROME enviroment variable can be set (to any value) to achieve the same effect.
The colours are assigned as follows:
Colour Meaning Red Urgent task Yellow High priority task White Normal priority task Cyan Low priority task, done task Blue Very low priority task Green Captions
This command is used to add a new entry and mark it done immediately. It is most useful in conjunction with the report command, to record unexpected extra tasks you had to do.
The arguments for the log command are the same as those for the add command.
The narrow command can be used to limit the effects of later commands to operate within a particular sub-tree of your database. Because the indices you specify for the later operations have the common prefix omitted, this can save typing if you have many changes to make within the same subtree.
If your listings are in colour, the common prefix is coloured in blue whilst the paths below the root of the sub-tree are shown in the usual green. (In monochrome mode, there is no distinction.)
Whilst your view is narrowed, the index of the sub-tree root is shown in square brackets between tdl and > (i.e. ).
If you want to operate on the sub-tree root entry itself whilst you are narrowed, you can use . to specify its index (think: current directory in Unix.)
To reverse the effects of the narrow command, use the widen command (see widen command).
This command is only available when tdl is being run interactively, i.e. when you have a tdl prompt. It is not available directly from the shell (where it wouldnt make much sense).
tdl open index_to_reopen[...] ...
The open command is used to reverse the effect of the postpone command. Its effect is actually to set the arrival time of the entries to the current time.
tdl postpone index_to_postpone[...] ...
The postpone command is used to make 1 more more entries postponed. Its effect is actually to set the arrival time of the entries a long way in the future (i.e. its an extreme form of the deferred feature available through the add and defer commands.) Postponed entries can be re-activated with the open command.
tdl pri new_priority index_to_change ...
This command changes the priority of one or more entries. The indices are in the same format as those in the output of the list command. The new_priority argument takes the same possible values as for the add command.
tdl purge since_epoch [entry_index...]
This command is used to remove old done entries from the database. It is much more convenient than repeated remove commands.
The since_epoch argument specifies a time. The format for this argument is described in the DATE SPECIFICATION section later. Entries that were marked done (using the done command) before that epoch will be purged.
Zero or more entry_indices may be given. These restrict the purging to just those entries and their descendents. The default is to purge the entire database.
The quit command is used to exit from tdl when it is used in interactive mode. The quit command is not available in the command line mode, where it would not make sense.
The quit command DOES NOT write any pending updates to the database before exiting. Compare the exit command, which does write all updates made during the current tdl run.
The main use for the quit command would be to avoid damaging the database if a serious error had been made.
tdl delete index_to_remove ...
Completely remove one or more entries from the database. The indices are the same format as those shown in the output of the done command.
If the string "..." is appended to an index, it means that entry and all its descendents. This provides a quick way to remove a whole sub-tree of tasks.
tdl report start_time [end_time]
The report command produces a report (in bulleted list format) of tasks completed in a certain time period. This is useful if (for example) you have to write a weekly summary of the work youve done.
The default for the end of the time period is the current time, if the end_time argument is not present. The start of the period to report on must always be specified. The format for the time arguments is described in the DATE SPECIFICATION section later. Examples :
tdl report 1w
will list all tasks completed in the previous week, whereas
tdl report 2w 1w
will list all tasks completed between 2 and 1 weeks ago.
Where a child entry has been completed in the reporting period, but its parent has not been completed, the parent text in the report will be surrounded by child entries that havent been completed yet.
The revert command discards any changes made in the session and reloads the in-memory database from disc. If you have used the save command in the session, the database will revert to its state at the most recent save. Otherwise it will revert to its state when tdl was initially run.
The revert command does not take any arguments.
The save command can be used to write the current in-memory database out to the disc database file. The behaviour is currently equivalent to the command exit followed by re-running tdl from the shell.
This command is useful if you tend to do long interactive tdl sessions. It guards against the risks of
1. accidentally typing quit when you meant exit
2. machine crashes
3. running tdl in another window and seeing a stale copy of the database file.
The save command does not take any arguments.
tdl undo index_of_entry_to_undo ...
This command cancels the effect of the done command for one or more entries, e.g. after they have been mistakenly marked as done.
If the string "..." is appended to an index, it means that entry and all its descendents. This provides a quick way to re-open a whole sub-tree of tasks.
Same as tdl help (q.v.)
Show the version number of the software.
Show the filename of the database that tdl accesses in the current context.
The optional n_levels parameter tells tdl how many levels to widen the view. If the parameter is not specified, it defaults to 1. If you try to widen more levels than the depth of the current sub-tree root node, the widening will be silently limited to its depth.
This command is only available when tdl is being run interactively, i.e. when you have a tdl prompt. It is not available directly from the shell (where it wouldnt make much sense).
When tdl has been compiled to use the readline library, the interactive mode supports a number of completion functions, activated with the <tab> key.
In particular, the following are supported:
Command completion. If <tab> is pressed when the command line is empty, a list of possible commands will be shown. If <tab> is pressed when a partial command has been typed, the command will be completed immediately if possible, otherwise a list of commands matching the already-typed prefix will be shown.
Help completion. If help or usage is already in the buffer, a list of commands will be shown (as above). The <tab> completion works in the same way to complete the name of the command you want a help summary for.
Priority completion. If list or priority is at the start of the input buffer and the current word starts with a letter, tdl will try to complete the name of a priority level if <tab> is pressed.
Open task completion. If done is at the start of the input buffer, hitting <tab> will show a list of task indices that are still open. If part of an index has already been typed, the open task indices for which the typed characters are a prefix will be shown.
Postpone completion. If postpone is at the start of the input buffer, hitting <tab> will show a list of tasks that may be postponed. Tasks marked done are excluded. If open is at the start of the input buffer, hitting <tab> will show a list of tasks that may be opened.
Parameter hints. If some other command is at the start of the input buffer and <tab> is pressed, tdl will show a one-line summary of that commands parameters.
The commands add, done, purge, report, take arguments defining dates (with add and done it is optional). Dates may be specified in several formats, shown by the following examples:
-1h exactly 1 hour ago -2d exactly 2 days ago +1w exactly 1 week in the future +1m exactly 1 month (30 days) in the future +2y exactly 2 years in the future -1d-0815 08:15am yesterday +1d-08 8am tomorrow +1w-08 8am on the same day as today next week +6h-08 8am on the day containing the time 6 hours ahead of now .-08 8am today .-20 8pm today 20011020 absolute : 12 noon on 20th October 2001 011020 absolute : 12 noon on 20th October 2001 (current century) 1020 absolute : 12 noon on 20th October 2001 (current century and year) 20 absolute : 12 noon on 20th October 2001 (current century, year and month) 20011020-081500 absolute : 08:15am on 20th October 2001 20011020-0815 absolute : 08:15am on 20th October 2001 (seconds=0) 20011020-08 absolute : 08:00am on 20th October 2001 (minutes=seconds=0) 011020-08 absolute : 08:00am on 20th October 2001 (minutes=seconds=0, current century) etc (see below) -sun 12 noon on the previous Sunday +sat 12 noon on the following Saturday +sat-08 8am on the following Saturday -tue-0815 08:15am on the previous Tuesday etc (see below)
In the all-numeric format, the rule is that dates can have fields omitted from the start (assumed to be the current value), and times can have fields omitted from the end (assumed to be zero, except if the hours figure is missing it is assumed to be 12, since most work is done in the day.)
In the weekday and time format, the time rule is the same: missing minutes and seconds are taken as zero and missing hours as 12. If the weekday is the same as today, the offset is always 7 days in the required direction. If the weekday is not the same as today, the offset will always be less than 7 days in the required direction.
In the relative format, when a time is included as well, the procedure is as follows. First the time is determined which is the given number of hours, days etc away from the current time. Then the specified time on that day is used. The main use for this is to specify times like 8am yesterday. Obviously some of the more uses of this mode are rather far-fetched.
For the weekday and relative formats, the sign is actually optional. The default sign (implying past (-) or future (+)) will then be assumed depending on the command as shown below:
Command Default Reason add + Add entries with deferred start times done - Entries have been completed at some time in the past report - Reporting on earlier completed tasks not future ones purge - Tasks wont be completed in the future, so no need to purge future ones
The homepage for tdl on the internet is http://www.rc0.org.uk/tdl/
The author is Richard P. Curnow <firstname.lastname@example.org>.
I got the idea from a program called devtodo. I liked what that program did and the command line approach to using it, but I ran into lots of compilation problems with it on older C++ installations. The path of least resistance turned out to be to hack up a C program to do a similar job.
TDL_DATABASE If this variable is set, it defines the name of the file to use for holding the database of tasks. If the variable is not set, the search approach described in the FILES section is used. TDL_LIST_MONOCHROME If this variable is set, the output from the list command is produced in monochrome instead of colour (the default).
./.tdldb, ../.tdldb, ../../.tdldb, ... If the TDL_DATABASE environment variable is not present, the file .tdldb in the current directory is used, if that is present. If not, the same file in the parent directory is used, and so on, until the root directory of the filesystem is reached. If the database is still not found, a new one will be created in the current directory (except for options that dont modify the database, such as list, help and version.) If you want to have a .tdldb file in every directory, the suggested approach is to set the TDL_DATABASE environment variable to "./.tdldb". So in a Bourne-like shell (sh, bash, zsh, ksh etc), youd write TDL_DATABASE=./.tdldb
and in a C-like shell (csh, tcsh etc) youd write setenv TDL_DATABASE ./.tdldb If you want to share .tdldb files between directory hierarchies in some non-standard way, the suggested approach is to use symbolic links to do this, for example: cd project1
ln -s ../project2/.tdldb .
Please report them to the author.
The full documentation for tdl is maintained as a Texinfo manual. If the info and tdl programs are properly installed at your site, the command
should give you access to the complete manual.
|1.4||TDL (1)||May 2003|