-
Notifications
You must be signed in to change notification settings - Fork 0
/
tdl.texi
1831 lines (1529 loc) · 55.9 KB
/
tdl.texi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\input texinfo
@c {{{ Main header stuff
@afourwide
@paragraphindent 0
@setfilename tdl.info
@settitle User guide for the tdl program
@c @setchapternewpage off
@ifinfo
@dircategory Utilities
@direntry
* tdl: (tdl). To-do-list management utility
@end direntry
@end ifinfo
@titlepage
@sp 10
@title The tdl program
@subtitle This manual describes how to use
@subtitle the tdl program for managing to-do-lists.
@author Richard P. Curnow
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 2001,2002,2003,2004,2005 Richard P. Curnow
@end titlepage
@contents
@c }}}
@ifnottex
@node Top
@top
@menu
* Introduction:: What the tdl program does
* Installation:: Compiling and installing the software
* Usage:: Quickstart guide and examples of use
* Reference:: Reference section
@end menu
@end ifnottex
@c {{{ Introduction
@node Introduction
@chapter Introduction
tdl is a lightweight program for managing a 'to-do' list of pending jobs that
you have.
It supports the following features :
@itemize @bullet
@item 1 database per directory, or per tree of directories (tdl searches up
through parent directories to find the database, so you can have one per
project, for example.)
@item add new entries, mark them done, edit the text of entries
@item add a new entry and immediately mark it done (e.g. to log tasks you did
which you tackled immediately you got them.)
@item organise the entries in a tree structure (sub-tasks of other tasks etc)
@item move the tasks around and re-organise the hierarchy.
@item list the tasks in the database (default listing excludes 'done' tasks,
but these can be shown too if desired). The listing is in colour by default,
with monochrome output as an option.
@item allows entries to be prioritised (priorities shown in different colours
on listing). The listing can selectively show only entries at or above a given
priority level.
@item the start time for tasks can be set, to allow for 'deferred' tasks with
start times in the future. Such tasks are excluded from the default listing.
@item tasks can be marked 'postponed' to avoid them cluttering up the normal
listing.
@item track date added and date completed for each task
@item generate report of tasks completed in a given earlier time period (useful
if you have to produce a weekly summary of your work done, for example)
@item import and export entries, to allow splitting and merging of databases.
@item written in C
@item runs on a Linux console or in a terminal window. It currently generates
a coloured listing (monochrome is an option), so a colour xterm or rxvt is
preferred.
@item tdl can run a single sub-command direct from the command line, or it can
run in an interactive mode where several sub-commands can be used within a
single run. If the GNU readline library is available at compile time, the
interactive mode features command line editing and various completion and usage
hint facilities.
@end itemize
@c }}}
@c {{{ Installation
@node Installation
@chapter Installation
This section discusses installation
@menu
* Build from source:: Installing tdl from source code
* Packaging:: Notes for package builders
@end menu
@c {{{ Build from source
@node Build from source
@section Installing tdl from source code
The procedure for installing tdl from source code is as follows:
@enumerate
@item @strong{Unpack the sources}
@example
gunzip < tdl-1.0.tar.gz | tar xvf -
cd tdl-1.0
@end example
@item @strong{Configure the makefile}
tdl does not use a @code{./configure} mechanism (yet!) to configure options.
You have to manually edit @file{Makefile}. The variables you may want to edit are
@table @samp
@item CC
The choice of C compiler
@item CFLAGS
The choice of flags to pass to the C compiler
@item prefix
The parent directory where the binaries and documentation will be installed.
You'd normally set this to @file{/usr/local} or @file{/usr}, unless you use a
stow or stow-like approach, or are building a distribution package.
@item INC_READLINE
If you want readline support in the interactive mode (highly recommended),
uncomment the appropriate line in the Makefile, and if necessary edit the path
for the include directory where @file{readline.h} and @file{history.h} can be
found. Note that a @file{readline} subdirectory is assumed to be suffixed onto
whatever path you define.
@item LIB_READLINE
Likewise, edit the path for the directory where @file{libreadline} and
@file{libhistory} can be found.
@end table
@item @strong{Compile the sources}
@example
make
@end example
@item @strong{Install the software}
@example
make install
@end example
@item (Optional) @strong{Build the documentation}
This assumes you have the @file{makeinfo} and @file{tex} tools on your path.
@example
make docs
@end example
@item (Optional) @strong{Install the documentation}
Currently, there are no Makefile targets for this. Pick the documentation
formats you want to keep and install them manually to the appropriate places.
@end enumerate
@c }}}
@c {{{ Packaging
@node Packaging
@section Notes for package builders
For building a Slackware package, you could follow the steps above except for
the installation
@example
vi Makefile
make
make docs
mkdir pkg
make install DESTDIR=./pkg
(copy appropriate docs into subdirectories of pkg)
cd pkg
makepkg tdl.tgz
@end example
Packagers for other distributions may be able to adapt this. (The point the
example is making is that @file{Makefile} contains support for using a variable
@var{DESTDIR} in this way.)
An example spec file for RedHat packaging is in the file
@file{tdl.spec.sample}.
@c }}}
@c }}}
@c {{{ Usage
@node Usage
@chapter Usage
This section contains examples of using tdl.
@menu
* Getting started:: Getting started with tdl
@end menu
@c {{{ Getting started
@node Getting started
@section Getting started
This section shows how you can get started with tdl.
Let's assume you have a working directory for a project, and you want to
maintain a to-do list for things you need to do on that project. Let's assume
the working directory for the project is @file{/home/foobar/myproject}. Then
you'd start by entering the following commands into your shell:
@example
% cd /home/foobar/myproject
% tdl create
@end example
Now, lets say you have some tasks to keep track of:
@example
% tdl
tdl> add "Write user guide"
tdl> add "Write release notes"
tdl> add "Fix bug where empty data file causes core dump"
tdl> exit
%
@end example
The above sequence will add 3 tasks to your newly created database. A few days
later, you might come back to the project and think "Hmmm. What did I need to
do next?" You can enter
@example
% tdl list
1 Write user guide
2 Write release notes
3 Fix bug where empty data file causes core dump
%
@end example
This shows another feature of tdl. If you pass a sub-command (and its
arguments, if any) on the tdl command line, tdl will execute just that command,
and return you to your shell prompt. However, if you run tdl with no
arguments, it will go into its interactive mode. For a single command like
@command{list} in this situation, you'd probably find the direct method
quicker.
Suppose you fix the bug. Then you could enter
@example
% tdl done 3
@end example
after which the list command would only show the first two tasks as still being
open, like this:
@example
% tdl list
1 Write user guide
2 Write release notes
%
@end example
The @command{add}, @command{list} and @command{done} commands may be all that
you need in some cases. However, another useful command is @command{report},
which will summarise all the tasks you completed in a given period. For
example, you could list everything you completed in the last 7 days like this
@example
% tdl report 7d
- Fix bug where empty data file causes core dump
%
@end example
The other commands in tdl are mostly to do with changing the order of tasks in
the database, assigning them priorities, and so on.
@c }}}
@c }}}
@node Reference
@chapter Reference
@menu
* Start and Exit:: Starting and exiting tdl
* Command line flags:: Flags that can be used from the shell command line
* Node specification:: How to reference existing nodes
* Command list:: Alphabetical list of all commands
* Shortcuts:: Quick access to tdl commands from the shell
* Interrupting:: How to make tdl stop whilst it is running
* Location:: How tdl finds the database file to use
* Completion:: Completion facilities
* Datespec:: How dates are specified
* Backup file:: How tdl saves a backup copy of the database
* Index specification:: How indices can be specified
@end menu
@c {{{ Start and Exit
@node Start and Exit
@section Starting and exiting tdl
tdl has a set of functions that can be accessed in two different ways:
@itemize @bullet
@item Directly from the command line
@item Interactively
@end itemize
In the 'direct' method, the function and its arguments are provided on the
command line. This mode is useful if you only want to perform a single
operation. An example
@example
% tdl add "A task"
%
@end example
The 'interactive' method is entered when the tdl command is run with no
arguments. In this mode, many tdl operations may be performed within a single
run of the program. This avoids loading and saving the database for each
operation, which may have a small performance benefit. However, if the program
is compiled with the readline library, the @key{tab} key will provide various
completion functions. An example
@example
% tdl
tdl> add "A task"
tdl> exit
%
@end example
When in interactive mode, these methods can be used to exit and return to the shell:
@itemize @bullet
@item The @command{exit} command (@pxref{exit command})
@item Hitting @key{Ctrl-D} (i.e. end of file on stdin)
@item Hitting @key{Ctrl-C}, @key{Ctrl-\} etc. The associated signals are
caught by tdl and it will attempt to save the database. However, this method
is more risky than the first two.
@item The @command{quit} command (@pxref{quit command}). @strong{Caution:} this
does not save the modified database back to the disk. Only use it if you want
to discard all changes made in this tdl run.
@end itemize
@c }}}
@c {{{ Command line flags
@node Command line flags
@section Command line flags
@menu
* -q:: Be quiet
* -R:: Open the database read-only
* -u:: Forced unlock
@end menu
@c {{{ Quiet mode
@node -q
@subsection Quiet mode
If the @command{-q} flag is specified, various warning and informational
messages will be suppressed.
@example
% tdl -q list
@end example
@c }}}
@c {{{ Read-only mode
@node -R
@subsection Read-only mode
If the @command{-R} flag is specified, the database will be opened in read-only
mode. In this case, the database will not be locked, and all commands that
modify the database will be barred.
This flag can be used together with the @command{-q} flag if required.
@example
% tdl -R list
% tdl -qR list
@end example
@c }}}
@c {{{ Forced unlock
@node -u
@subsection Forced unlock
If the @command{-u} flag is specified, the database's lockfile will be removed
if it is found. This is mainly intended for use when an earlier run has left
the database locked after a crash.
Care shoule be taken that the database is not currently being accessed by a
live process, otherwise updates could be lost by one or other of the processes.
@example
% tdl -u list
@end example
@c }}}
@c }}}
@c {{{ Node specification
@node Node specification
@section Node specification
Many commands in tdl require you to refer to an existing entry, for example
@itemize @bullet
@item to add a child entry to an existing entry
@item to mark an entry as being done
@item and so on
@end itemize
There are two ways you can refer to existing nodes
@itemize @bullet
@item by the numeric path (as shown by @command{tdl list}).
@item by negative numeric path (which is used to refer to a node counted from
the end of its parent)
@item by the start of the node's text, as long as enough is specified to
identify the node unambiguously amongst its peers. In this case, the node must
be preceded by a single '.' for many commands.
@end itemize
For example, if the database contains
@example
tdl> list
1 foo
1.1 aaa
1.2 bbb
2 fee
2.1 ccc
2.2 ddd
3 bar
3.1 eee
3.2 fff
@end example
then @samp{tdl list 1} will show
@example
tdl> list
1 foo
1.1 aaa
1.2 bbb
@end example
and @samp{tdl list .fe} will show
@example
.fe fee
.fe.1 ccc
.fe.2 ddd
@end example
@samp{tdl list .f} will fail since it is ambiguous which node (1 or 2) is being referenced.
@samp{tdl list -- -1} will show
@example
-1 bar
-1.1 eee
-1.2 fff
@end example
(note that @samp{tdl list -1} has a different meaning (show 1 level and summarise subordinate levels), and shows
@example
1 [2/2] foo
2 [2/2] fee
3 [2/2] bar
@end example
@c }}}
@c {{{ Command list
@node Command list
@section Alphabetical list of all commands
This section describes each of the tdl subcommands.
@menu
* above command:: Move entries above (before) another entry
* add command:: Add a new entry to the database
* after command:: Move entries after (below) another entry
* before command:: Move entries before (above) another entry
* below command:: Move entries below (after) another entry
* clone command:: Make a deep copy of one or more entries
* copyto command:: Insert a deep copy of one or more entries into an existing entry
* create command:: Create a new database in the current directory
* defer command:: Modify starting time of one or more entries
* delete command:: Remove 1 or more entries from the database
* done command:: Mark 1 or more entries as done
* edit command:: Change the text and/or start time of an entry
* exit command:: Exit program, saving database
* export command:: Export entries to another database
* help command:: Display help information
* ignore command:: Postpone/partially-remove 1 or more entries
* import command:: Import entries from another database
* into command:: Move entries to end of new parent
* list command:: List entries in database (default from top node)
* ls command:: List entries in database (default from top node)
* log command:: Add a new entry to the database, mark it done as well
* moveto command:: Move entries to end of new parent
* narrow command:: Restrict actions to part of the database
* open command:: Move 1 or more entries out of postponed state
* postpone command::Make 1 or more entries postponed
* priority command::Change the priority of 1 or more entries
* purge command:: Remove old done entries in subtrees
* quit command:: Exit program, NOT saving database
* remove command:: Remove 1 or more entries from the database
* report command:: Report completed tasks in interval
* revert command:: Discard changes and reload previous database from disc
* save command:: Save the database to disc and continue working
* undo command:: Mark 1 or more entries as not done (cancel effect of 'done')
* usage command:: Display help information
* version command:: Display program version
* which command:: Display filename of database being used
* widen command:: Widen the part of the database to which actions apply
@end menu
@c }}}
@c {{{ <--COMMANDS-->
@c {{{ above command
@node above command
@subsection above command
The @command{above} command is one of the commands used for re-ordering the
entries in the database. The @command{above} and @command{before} commands are
synonymous.
The arguments of the @command{above} comamnd are:
@example
tdl> above <index_to_insert_above> <index_to_move> ...
@end example
The first argument is the index of the entry above which the other entries are
to be moved. The entries corresponding the 2nd index onwards will be placed in
argument order above the first entry.
An example:
@example
tdl> list
1 Task A
2 Task B
3 Task C
4 Task D
tdl> above 1 2 4 3
tdl> list
1 Task B
2 Task D
3 Task C
4 Task A
tdl>
@end example
You can move entries between levels in the hierarchy, with the restriction that
you cannot move a node so that its new parent would be a descendent of itself.
If you want to move entries to the end of the list (i.e. above the bottom of
the list), you can use a zero as the index of the reference entry, for example
@example
tdl> list
1 Task A
1.1 Task A_A
1.2 Task A_B
2 Task B
3 Task C
tdl> above 1.0 3 2
tdl> list
1 Task A
1.1 Task A_A
1.2 Task A_A
1.3 Task C
1.4 Task B
tdl>
@end example
@c }}}
@c {{{ add command
@node add command
@subsection add command
The @command{add} command is run as follows
@example
tdl> add [@@datespec] [parent-index] [priority] "Text for node"
@end example
In the simplest case of adding a new top-level entry to the database, with
normal priority, starting now, this could be
@example
tdl> add "Wash the dog"
@end example
In a more complex case, to add a high priority entry underneath entry index 1,
with the new entry coming live at 11a.m. next Friday, this would be
@example
tdl> add @@+fri-11 1 hi "Wash the dog"
@end example
If you have several entries to add at once, you can go into an @emph{add} mode.
Enter a blank line to get back to the @t{tdl>} prompt.
@example
tdl> add
add> Wash the dog
add> Wash the car
add>
tdl>
@end example
To add an entry direct from your shell, there is an additional shortcut
(assuming the appropriate symbolic link was created during the installation
process):
@example
% tdla "Wash the dog"
%
@end example
@c }}}
@c {{{ after command
@node after command
@subsection after command
The @command{after} and @command{below} commands are synonymous. See the
description of @command{below} (@pxref{below command}).
@c }}}
@c {{{ before command
@node before command
@subsection before command
The @command{above} and @command{before} commands are synonymous. See the
description of @command{above} (@pxref{above command}).
@c }}}
@c {{{ below command
@node below command
@subsection below command
The @command{below} command is one of the commands used for re-ordering the
entries in the database. The @command{below} and @command{after} commands are
synonymous.
The arguments of the @command{below} command are:
@example
tdl> below <index_to_insert_below> <index_to_move> ...
@end example
The first argument is the index of the entry below which the other entries are
to be moved. The entries corresponding the 2nd index onwards will be placed in
argument order above the first entry.
An example:
@example
tdl> list
1 Task A
2 Task B
3 Task C
4 Task D
tdl> below 4 2 1 3
tdl> list
1 Task D
2 Task B
3 Task A
4 Task C
tdl>
@end example
You can move entries between levels in the hierarchy, with the restriction that
you cannot move a node so that its new parent would be a descendent of itself.
This is similar to the description for the @command{above} command
(@pxref{above command}).
@c }}}
@c {{{ clone command
@node clone command
@subsection clone command
The @command{clone} command can be used to make a deep copy of one or more
entries and add them as new top-level entries in the database. You might use
this if you have a task with a set of subtasks, and find that the same subtasks
apply to some new task. You could copy the first task, and edit the new
top-level task to change its text.
The arguments of the @command{clone} command are:
@example
tdl> clone <index_to_clone> ...
@end example
An example is:
@example
tdl> list
1 Wash things
1.1 Car
1.2 Dog
tdl> clone 1
tdl> edit 2 "Polish things"
tdl> list
1 Wash things
1.1 Car
1.2 Dog
2 Polish things
2.1 Car
2.2 Dog
@end example
If you want the cloned entries to be children of an existing entry, use the
@command{copyto} command (@pxref{copyto command}).
@c }}}
@c {{{ copyto command
@node copyto command
@subsection copyto command
The @command{copyto} command is very similar to the @command{clone} command
(@pxref{clone command}). The difference is that @command{copyto} inserts the
newly created entries as children of an existing entry, rather than making them
new top level entries.
The arguments of the @command{copyto} command are:
@example
tdl> copyto <new_parent_index> <index_to_clone> ...
@end example
An example is:
@example
tdl> list
1 Household jobs
1.1 Wash things
1.1.1 Car
1.1.2 Dog
tdl> copyto 1 1.1
tdl> edit 1.2 "Polish things"
@end example
@c }}}
@c {{{ create command
@node create command
@subsection create command
The @command{create} command can only be used direct from the shell command
line. It is @strong{not} supported when tdl is used in its interactive
mode.@footnote{This is to avoid confusion over which database file is being
accessed if @command{create} were used after other commands had already
been used in the same session.}
Usually, the @command{create} command will create a new @file{.tdldb} file in
the current directory. However, if the @var{TDL_DATABASE} environment
variable is set when tdl is run, the path specified by that variable
will be used instead and the database will be created there. In both
cases, the @command{create} command will refuse to over-write an
existing database; an error message will be generated if that is
attempted.
@example
% tdl create
@end example
@c }}}
@c {{{ defer command
@node defer command
@subsection defer command
The @command{defer} command is used to modify the start-time of one or more existing entries. Its argument structure is
@example
tdl> defer @@<datespec> <entry_index>[...] ...
@end example
where the @samp{@@} on the datespec is optional because the argument is
required, although the @samp{@@} can be included for consistency with other
commands where a datespec is optional.
An example of use is
@example
tdl> defer @@+fri 1 2.1... 5
@end example
which defers entries 1, 2.1 and all its children, and 5 until the following
Friday.
To list deferred entries, use @command{list -p}.
To defer entries indefinitely, see @ref{postpone command}.
To re-activate deferred or postponed entries, see @ref{open command}.
@c }}}
@c {{{ delete command
@node delete command
@subsection delete command
This command is synonymous with the @command{remove} command (@pxref{remove command}).
The argument structure is
@example
delete <entry_index>[...] ...
@end example
@c }}}
@c {{{ done command
@node done command
@subsection done command
The @command{done} command is run as follows
@example
done [@@<datespec>] <entry_index>[...] ...
@end example
The @command{done} command is used to mark one or more tasks as completed. Any
number of task indices may be specified.
The effects are as follows:
@itemize @bullet
@item
The entries no longer appear on the default listing (produced by the
@command{list} command without the @samp{-a} option).
@item
The entries are eligible to appear on the report list (@pxref{report command})
@item
The entries are eligible for removal by the purge command (@pxref{purge
command})
@end itemize
If the string "..." is appended to an index, it means that entry and all its
descendents. This provides a quick way to mark a whole sub-tree of tasks as
being completed.
No entry may be marked 'done' if it has any children that are still 'open'
(i.e. not marked 'done'). (The @samp{...} form of the command marks the
deepest entries first to bypass this.)
@c }}}
@c {{{ edit command
@node edit command
@subsection edit command
The @command{edit} command is used to modify the text of an existing entry.
Its argument structure is
@example
tdl> edit <entry_index> [<new_text>]
@end example
A single <entry-index> must be given. If <new-text> is provided, this replaces
the text describing the specified 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.)
An examples follows.
To change the text for the entry with index 1,
@example
tdl> edit 1 "New description"
@end example
@example
tdl> list
1 Wash the dog
tdl> edit 1
edit (1)> Wash the dog (edit 'dog' to 'cat')
tdl> list
1 Wash the cat
tdl>
@end example
(Note, in earlier versions, @command{edit} could be used to change the
start-time of one or more entries. This is now handled by the @command{defer}
command (@pxref{defer command}).)
@c }}}
@c {{{ exit command
@node exit command
@subsection exit command
The @command{exit} command is used to exit from tdl when it is used in
interactive mode. The @command{exit} command is not available in the command
line mode, where it would not make sense. An example:
@example
tdl> exit
%
@end example
The @command{exit} command writes any pending updates to the database before
exiting. (Compare the @command{quit} command (@pxref{quit command}), which
@strong{loses} all updates made during the current tdl run.)
@c }}}
@c {{{ export command
@node export command
@subsection export command
The @command{export} command is run as follows
@example
export <filename> <entry_index> ...
@end example
It is used to export one or more tasks (and their subtasks) to another tdl
database file. Perhaps you were keeping all your projects' to-do lists in one
combined file, and decide you want to separate the list for a particular
project.
An example would be
@example
tdl> list
1 Tasks for project X
2 Tasks for project Y
2.1 Write manual
2.2 Write release notes
tdl> export /home/foobar/project_y/.tdldb 2.1 2.2
tdl> remove 2...
tdl> exit
@end example
@c }}}
@c {{{ help command
@node help command
@subsection help command
The @command{help} command displays help information. When run without
arguments, a list of valid commands is produced. Note, this list is slightly
different depending on whether the @command{help} command is used through the
interactive readline interface or straight from the shell.
@example
tdl> help
tdl, Copyright (C) 2001-2004 Richard P. Curnow
tdl comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the GNU General Public License for details.
above : Move entries above (before) another entry
add : Add a new entry to the database
after : Move entries after (below) another entry
below : Move entries below (after) another entry
before : Move entries before (above) another entry
done : Mark 1 or more entries as done
edit : Change the text and/or start time of an entry
exit : Exit program, saving database
export : Export entries to another database
help : Display help information
import : Import entries from another database
into : Move entries to end of new parent
list : List entries in database (default from top node)
log : Add a new entry to the database, mark it done as well
priority : Change the priority of 1 or more entries
purge : Remove old done entries in subtrees
quit : Exit program, NOT saving database
remove : Remove 1 or more entries from the database
report : Report completed tasks in interval
undo : Mark 1 or more entries as not done (cancel effect of 'done')
usage : Display help information
version : Display program version
which : Display filename of database being used
Enter 'help <command-name>' for more help on a particular command
tdl>
@end example
If the @command{help} command is passed the name of a sub-command, it shows help for that command.
@example
tdl> help add
Description
Add a new entry to the database
Synopsis
add [@@<datespec>] [<parent_index>] [<priority>] <entry_text>
<index> : 1, 1.1 etc (see output of 'tdl list')
<priority> : urgent|high|normal|low|verylow
<datespec> : [-|+][0-9]+[shdwmy][-hh[mm[ss]]] OR
[-|+](sun|mon|tue|wed|thu|fri|sat)[-hh[mm[ss]]] OR
[[[cc]yy]mm]dd[-hh[mm[ss]]]
<text> : Any text (you'll need to quote it if >1 word)
tdl>
@end example
The @command{help} command is synonymous with the @command{usage} command.
@c }}}
@c {{{ ignore command
@node ignore command
@subsection ignore command
The @command{ignore} command puts one or more entries into an @emph{ignored}
state. It is actually implemented in the same way as marking them as
@emph{done}, but as though they were @emph{done} a very long time ago. Thus,
ignored entries will be deleted by any subsequent purge operation.
I added this feature because, when applying @command{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 @command{ignore} them and rely on a periodic
@command{purge} to clean up the database.
Another use for the @emph{ignore} command would be to move moribund entries
into a @emph{wastebasket} to stop them cluttering up the normal listing, but
without removing them entirely in case you need to reprieve them later.
The @command{ignore} command is run as follows
@example
ignore <entry_index>[...] ...
@end example
An example is
@example
ignore 20 21.6.3 25... 28.1
@end example
If you need to @emph{un-ignore} an entry, just @command{undo} it (@pxref{undo
command}).
@c }}}
@c {{{ import command
@node import command
@subsection import command
The @command{import} command is used as follows:
@example
import <filename>
@end example