Compare commits

...

815 Commits

Author SHA1 Message Date
Federico Hernandez
bcdcbeeea0 Preparing release
- Updating dist documentation
- Release date in man pages
2009-10-21 22:53:26 +02:00
Pietro Cerutti
469cafa053 Make run_all more portable.
- Changed shebang for portability
- Fix date command for FreeBSD

Signed-off-by: Federico Hernandez <ultrafredde@gmail.com>
2009-10-21 22:20:32 +02:00
Pietro Cerutti
fdb359c180 Fix confirm() to handle EOF
Signed-off-by: Federico Hernandez <ultrafredde@gmail.com>
2009-10-21 22:19:37 +02:00
Paul Beckingham
b3d40b2554 Portability - Haiku R1/alpha1
- Added necessary include files and edits in order to build task on
  Haiku R1/alpha1.
2009-09-27 17:02:20 -04:00
Federico Hernandez
fba076a0d0 Bumped version number to 1.8.3 2009-09-07 16:13:37 +02:00
Paul Beckingham
3ef844de5f Packaging
- Adding updated package files for OSX, from the 1.8.2 release.
2009-09-07 09:51:20 -04:00
Federico Hernandez
bb45d91ddb Added sha1 of 1.8.2 to ChangLog 2009-09-07 15:41:51 +02:00
Federico Hernandez
f243f0ed44 Release date in man pages 2009-09-07 10:18:44 +02:00
Federico Hernandez
b305cc0a60 Release date in ChangeLog 2009-09-07 09:57:09 +02:00
Paul Beckingham
53609b2837 Bug Fix - #288
- Fixed bug which failed to propagate rc overrides from the command
  line to the default command (thanks to Zach Frazier).
2009-09-06 16:27:28 -04:00
Federico Hernandez
bdaa0f89d9 Platform update 2009-09-02 12:50:43 +02:00
Federico Hernandez
2fd8d8aa83 Bug Fix #291
- Fixed bug #291 which generated a false warning about an unrecognized
  variable when enabling default.projects in .taskrc (thanks to Thomas@BIC)
2009-09-02 10:43:04 +02:00
Federico Hernandez
e69fb81b2b Documentation update in Changelog for #289 2009-09-01 21:12:49 +02:00
Federico Hernandez
d2aa0f31b0 Bug Fix - #289
- Fixed bug #289 which imported task from todo.sh
      without valid uuids (thanks to Ben Jackson).
2009-09-01 21:08:13 +02:00
Paul Beckingham
05f67db429 Bug Fix - #287
- Fixed bug #287 which caused color control codes to be written to
  the shadow file (thanks to Richard Querin).
2009-08-29 13:55:59 -04:00
Paul Beckingham
62be3f8acb Feature #282
- Applied large patch to make task return meaningful exit codes.
- Added unit tests to prove this.
- Thanks to Pietro Cerutti.
2009-08-29 09:14:26 -04:00
Federico Hernandez
cc5c99c0a1 Pushing version number to 1.8.2 2009-08-21 01:09:41 +02:00
Federico Hernandez
35792e7874 Added release date for 1.8.1 to ChangeLog 2009-08-20 22:48:22 +02:00
Federico Hernandez
083407f789 Pushing package build scripts for fedora, ubuntu and cygwin to 1.8.1 2009-08-19 23:50:47 +02:00
Federico Hernandez
e1146cdd20 Changed epoch to be 12/22 for UTC 2009-08-18 13:46:19 +02:00
Paul Beckingham
f04205be4c Documentation Update
- Added a load of missing ChangeLog entries, by running the timesheet
  report and comparing.
2009-08-16 23:10:21 -04:00
Paul Beckingham
07da2396fc Bug Fix - #251
- Fixed bug #251 that caused the .hasnt attribute modifier to fail
  when annotations were present.  Thanks to John Florian.
2009-08-16 22:38:33 -04:00
Paul Beckingham
ec7f7cc939 Bug Fix - #260
- Fixed bug whereby the start, stop and delete commands were not
  complaining when filter arguments were specified, even though they
  were ignored.  Thanks to Charles T. Yun.
2009-08-16 18:39:35 -04:00
Paul Beckingham
1b28d8714b Bug Fix - #249
- Fixed bug that caused two annotations with the same date to be parsed
  identically, and therefore were not considered unique annotations after
  the "edit" command.
2009-08-16 17:22:17 -04:00
Paul Beckingham
79f59f12ae Bug Fix - #252
- Fixed bug that prevented using end.after: and end.before: together
  to effect a range.
- Required differentiation between positive and negative attribute
  modifiers, and special handling.
2009-08-16 13:01:28 -04:00
Paul Beckingham
f595bc4731 Bug Fix - #259
- Fixed broken build on Snow Leopard - missing include.
2009-08-15 14:20:20 -04:00
Federico Hernandez
972efc58f4 Pushing man pages to 1.8.1 2009-08-12 14:43:05 +02:00
Paul Beckingham
dc9ba6d6b8 Bug Fix - #250
- Fixed bug #250 whereby rc.dateformat was not observed when parsing the
  creation date of an annotation (thanks to Federico Hernandez).
2009-08-07 16:53:25 -06:00
Paul Beckingham
a7196ca181 Bug Fix - #257
- Fixed bug #257 where an extant ~/.taskrc file prevented the override and
  automatic creation of an alternate rc file (thanks to Zach Frazier).
2009-08-07 16:11:09 -06:00
Paul Beckingham
1355571876 Bug Fix - #252
- Fixed bug that prevented the chaining of two attributes with
  different modifiers to effect a date range, such as:
    task ls due.after:8/1/2009 due.before:8/31/2009
  Thanks to John Florian.
2009-08-05 10:15:33 -06:00
Paul Beckingham
d3fcd40279 Bug Fix - Bug #248
- Fixed bug where both single and double quotes are stored as
  ampersand-quote-semi-colon, leading to the gradual conversion of
  one to the other.  Fix is backward compatible.  Thanks to John
  Florian.
2009-08-05 07:24:00 -06:00
Paul Beckingham
c4dcdbff0f Unit Tests - range
- Added unit tests to check the behavior when a data range is created
  with "task list due.before:... due.after:...".
2009-08-04 17:24:06 -06:00
Paul Beckingham
d39e45841d Bug Fix - Bug #241
- Fixed bug #241 that caused redirected output to retain color control codes
  for colored header and footnotes (thanks to John Florian).
2009-08-04 16:59:52 -06:00
Paul Beckingham
b28575625e Bug Fix - Bug #243
- Fixed bug that caused due dates and recurrence periods to be quoted on
  export, which then caused confusion on a subsequent import (thanks to
  John Florian).
2009-08-04 16:47:49 -06:00
Paul Beckingham
fc8f8957c4 Bug Fix - recurring task with no due date
- A recurring task may not be added without a due date.  Previously,
  this restriction only applied to modified tasks.
2009-08-04 16:26:23 -06:00
Paul Beckingham
0499bfff49 Bug Fix - Bug #242
-  Fixed bug that caused the reported ID after an add to be incorrect.
2009-08-04 16:08:56 -06:00
Paul Beckingham
af49ccf508 Bug Fix - wrong .taskrc file in message
- When a .taskrc file is overridden (with rc:...) task still refers to
  the default file name in output.
2009-08-04 16:01:20 -06:00
Paul Beckingham
7b0edfdeba Unit Test - recurring task with no due date
- Should generate error, but doesn't.
2009-08-03 07:38:22 -06:00
Federico Hernandez
e5d56e3075 Enhancement:
* Remove trailing whitespace from completions.
	* Complete rc.<variable> with ":'.
2009-08-01 01:24:46 +02:00
John Florian
ede746ba16 Fixed bug #241
Completion behavior has changed from bash-3 to bash-4.  Even the colon
character appears in COMP_WORDBREAKS of both versions, only bash-4 seems to
honor it.  This appears to be a bug in bash-3.  Changes made here work around
the problem so that completion of project names works for either version of
bash.
2009-07-30 23:19:10 -04:00
Paul Beckingham
0bad0277fe Documentation Update
- Added bug fix info to ChangeLog.  This is now ready to release, if
  necessary.
2009-07-26 16:31:40 -04:00
Paul Beckingham
8488cbd1a6 Bug Fix - #231 time_t/int collision on 32-bit systems
- Fixed bug #231 by removing the operator int () cast from the Duration
  class.  On a 32-bit system, "time_t" may be defined as "int", in
  which case the int cast and time_t cast are essentially duplicates.
  Thanks to Pietro Cerutti, who also provided a patch.
2009-07-26 16:11:14 -04:00
Paul Beckingham
6f9356da64 Updated version to 1.8.1
- Changed program version number.
- Changed NEWS file to refer only to 1.8, not 1.8.1.  This means we now only
  need to update the NEWS file on major releases, not patches.  This is the
  right thing to do now that we have only "whats new" in the NEWS file.
2009-07-26 16:06:14 -04:00
Paul Beckingham
90d53245c3 Merge branch '1.8.0'
Conflicts:
	.gitignore
	AUTHORS
	ChangeLog
	DEVELOPERS
	Makefile.am
	NEWS
	README
	configure.ac
	doc/man/task.1
	doc/man/taskrc.5
	src/T.cpp
	src/T.h
	src/TDB.cpp
	src/TDB.h
	src/command.cpp
	src/edit.cpp
	src/import.cpp
	src/parse.cpp
	src/report.cpp
	src/rules.cpp
	src/task.cpp
	src/task.h
	task_completion.sh
2009-07-21 19:15:54 -04:00
Paul Beckingham
14977ef317 Packaging
- Updated Mac OS X package files.
2009-07-21 18:36:40 -04:00
Paul Beckingham
bb5458fd6b Documentation Update
- Bumper version to 1.8.0, for release.
2009-07-21 16:59:43 -04:00
Paul Beckingham
8c692593b4 Documentation Update
- Added correct 1.8.0 release date.
2009-07-21 16:44:26 -04:00
Paul Beckingham
e8fc210ab0 Bug Fix - #206
- Fixed bug that prevented "task list start.after:1/1/2009" from
  working.  Big, nasty bug.
2009-07-18 00:49:04 -04:00
Paul Beckingham
e5f2b0c7d1 Bug Fix - #219
- Missed a spot.
2009-07-17 08:49:34 -04:00
Paul Beckingham
6c2fc108b4 Bug Fix - #219
- Fixed bug in timesheet report.  It was using color without regard
  to whether the output was to a TTY or not.  Thanks to John Florian.
2009-07-16 22:14:50 -04:00
Paul Beckingham
9100217da0 Bug Fix - #213
- Fixed bug that ignored the fact that std:cin was closed by a Ctrl-D
  in the "shell" command.  Thanks to Ian Mortimer.
2009-07-16 22:03:11 -04:00
Paul Beckingham
c5809b6b8d Bug Fix - #209
- Not a fix, but working towards a fix.  When a recurring task is edited,
  the other sibling tasks are not modified.  This is difficult to do.
  Perhaps we can skip for 1.8.
2009-07-14 21:20:43 -04:00
Paul Beckingham
3fce45baa4 Documentation Update
- Added the new complete.all.projects and complete.all.tags configuration
  variables to the man page.
2009-07-12 23:15:30 -04:00
Paul Beckingham
67debb93f7 Enhancement - complete.all.*
- Now supports "rc:complete.all.projects" to show all historical
  project names.
- Now supports "rc:complete.all.tags" to show all historical tags names.
2009-07-12 22:59:13 -04:00
Paul Beckingham
9718fa6924 Beta3
- Bumped version to beta3.
2009-07-12 22:54:36 -04:00
Paul Beckingham
5489cc5a0c Enhancement - task_completion.sh
- Applied Fredde's patch.
2009-07-12 22:54:02 -04:00
Paul Beckingham
8bf0f1176b Enhancement - _config
- Merged Fredde's _config command with prior bug fix.
2009-07-12 22:48:38 -04:00
Paul Beckingham
e2da1d0a9a Bug Fix - #205
- Fixed bug in modify and append that was erroneously reporting "No
  changes" when a bulk update occurred.
- Added bug.bulk.t unit tests to cover this example.
2009-07-12 18:38:57 -04:00
Paul Beckingham
b02c11be0e Bug Fix - #203
- Zero-length command line project was being compared to a zero-length
  truncated task project, and always matching.  Thanks to John Florian.
2009-07-12 14:27:26 -04:00
Paul Beckingham
ab3de212bf Bug Fix
- Conditional compilation (via FEATURE_NCURSES_COLS) to either use
  ncurses COLS and LINES global variables, or determine these from
  the WINDOW structure.
2009-07-12 14:01:36 -04:00
Paul Beckingham
9fb5b34759 Code Cleanup
- Removed parse.t from .gitignore.
2009-07-12 13:49:24 -04:00
Paul Beckingham
1aa856d078 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-07-12 13:10:45 -04:00
Paul Beckingham
81df2f2b19 Bug Fix
- ncurses failed to build on Snow Leopard without this change.
2009-07-12 13:09:52 -04:00
Federico Hernandez
4511d87bc0 Added missing wait: attribute. 2009-07-10 23:43:23 +02:00
Paul Beckingham
4439c07516 Bug Fix - #196
- Fixed bug that caused an unexpected number of tasks to be displayed
  by the next command.
2009-07-09 23:07:50 -04:00
Paul Beckingham
f790d52f62 Bug Fix - #194
- Fixed bug that causes tasks awaking from their waiting state to not
  be written back to the pending file.
2009-07-09 22:16:58 -04:00
Paul Beckingham
c275ded443 Bug Fix - #195
- Fixed problem where the date 7/31/2009, when interpreted with
  rc.dateformat:m/d/y, is truncated to 7/31/20.
2009-07-09 21:58:19 -04:00
Paul Beckingham
1900ee93f7 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-07-08 23:18:33 -04:00
Paul Beckingham
9095934bc0 Bug Fix - #171
- Fixed bug that caused redundant information to be displayed when the
  "done" command was run.  Thanks to John Florian.
2009-07-08 23:17:33 -04:00
Federico Hernandez
2d79e59647 From: John Florian <jflorian@doubledog.org>
Improved VIM Support
 - added vim support for undo.data
 - eliminated misc. whitespace per Bram Moolenaar's request
 - added Updated time stamp per Bram Moolenaar's request
2009-07-09 02:29:58 +02:00
Paul Beckingham
84f48fd056 Bug Fix
- Updated the version number.
2009-07-08 08:55:41 -04:00
Paul Beckingham
bf3e69add6 Bug Fix #191
- Fixed bug that failed to anchor to end of string when searching for
  "cal" or "itask", but instead matched on elements of the path,
  like /usr/local/bin.  Thanks to Eric Farris.
2009-07-08 08:41:29 -04:00
Paul Beckingham
844dd473e6 Bug Fix
- Unescaped - in file.
2009-07-06 20:41:10 -04:00
Federico Hernandez
6ca39b51b6 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-07-07 01:15:19 +02:00
Federico Hernandez
466cc4c362 Spell checking on man pages 2009-07-07 01:14:41 +02:00
Paul Beckingham
56a0997ecf Bug Fix
- Next report once again shows up in the help output.
2009-07-06 19:06:04 -04:00
Federico Hernandez
d45ce09ccc Added license information required for distributions 2009-07-07 00:59:51 +02:00
Paul Beckingham
98553e0196 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-07-06 18:52:19 -04:00
Paul Beckingham
75054617c4 Bug Fix
- Fixed bug found by John Florian that fails to delete all recurring
  tasks, after task has confirmed that is what is wanted.
2009-07-06 18:51:18 -04:00
Federico Hernandez
3e5355bc39 Updated man pages for new release 2009-07-07 00:46:45 +02:00
Paul Beckingham
e8716e68ae Bug Fix
- t.t.cpp was throwing an error because UUID is no longer set in Task::Task
  and so the sample task t3 was 'empty', which doesn't sit well with the
  round trip testing.
2009-07-06 01:24:35 -04:00
Paul Beckingham
cb1313779b Bug Fix
- Fixed bug that caused '--' arguments to be swallowed during processing
  for rc. parameters.
2009-07-06 00:58:05 -04:00
Paul Beckingham
8af0953b63 Vim Syntax Files (John Florian)
- Added the files on behalf of John Florian.
2009-07-06 00:34:47 -04:00
Paul Beckingham
51ad77e952 Bug Fix
- Fixed bug that was causing more non-unique UUIDs.  Here are the
  changes made:
    - Task.cpp, tasks are no longer provided with a UUID in Task::Task.
      This prevents the global context.task from being constructed before
      srandom/srand is called.
    - main.cpp, instead of srandom/srand (time (NULL)), it now uses
      struct timeval tv_usec member, which has a micro-second granularity,
      instead of time (NULL) which has a second granularity.  When
      "task add ..." is called in a unit test, several calls are made per
      second, this the random number generator is seeded with the same
      value.
    - Modified the unit test to cover all 6 tasks created, instead of
      5.
2009-07-05 23:59:11 -04:00
Federico Hernandez
28ab9e36cd Vim syntax highlighting (thanks to John Florian) 2009-07-06 03:31:58 +02:00
Federico Hernandez
b5d8045eb3 Updated man pages and task help documentation 2009-07-06 03:08:41 +02:00
Paul Beckingham
4c6d58549d Code Cleanup
- Working toward a clean build on Ubuntu.
2009-07-05 19:09:43 -04:00
Paul Beckingham
ebff1f48c2 Code Cleanup
- Working toward a clean build on Ubuntu.
2009-07-05 19:01:24 -04:00
Paul Beckingham
6e87e05e15 Enhancement
- Info report now includes number of undo transactions.
2009-07-05 13:51:30 -04:00
Paul Beckingham
fbeadfa313 Code Cleanup
- Removed unnecessary #include <iostream>
2009-07-05 13:48:09 -04:00
Paul Beckingham
e20e05ab54 Bug Fix
- Now allows abbreviations of aliases.
- No longer truncates commands after --.
2009-07-05 13:26:53 -04:00
Paul Beckingham
f2af6cc2dd Bug Fix
- Improved the misleading confirmation for bulk changes.  Now displays
  the task id and description before enumerating differences.
2009-07-05 12:43:03 -04:00
Paul Beckingham
9d85a0e0e2 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-07-05 11:33:45 -04:00
Paul Beckingham
519ee9a7a9 Code Cleanup
- Bumped version to 1.8.0.beta1.
- Fixed compiler warning on Ubuntu.
2009-07-05 11:33:02 -04:00
Federico Hernandez
d5d4de403f Added information about cygwin packaging 2009-07-05 17:29:40 +02:00
Paul Beckingham
6a55549588 Unit Tests - export
- Corrected unit tests after a change was made to the export format,
  to accomodate 1.8.0 -> 1.7.1 export/import downgrade.
2009-07-05 00:58:27 -04:00
Paul Beckingham
d63d396386 Unit Tests - alias
- Implemented unit tests to verify alias -> command, and alias ->
  alias -> command functionality.
2009-07-05 00:46:31 -04:00
Paul Beckingham
f7f8b1aee5 Bug Fix
- Fixed bug that generated an export file that was incompatible with
  task 1.7.1 import.  Now there is a smooth migration path back to
  1.7.1 in case 1.8.0 proves unacceptable.
2009-07-05 00:07:24 -04:00
Paul Beckingham
605eb397fc Bug Fix
- Fixed bug whereby rc: and rc. processing ignored the -- argument.
2009-07-05 00:06:41 -04:00
Paul Beckingham
6f318ecdcf Documentation Update
- ChangeLog is now completely up to date.
2009-07-04 23:19:20 -04:00
Federico Hernandez
0d349bab92 Added information about cal arguments 2009-07-05 02:18:00 +02:00
Federico Hernandez
131f6687ea Enhancement:
- Completion list for commands is now compiled dynamicaly using a task command.
  - Completion now also works for direct task manipulations with IDs
    eg task 3 -FOO pro:ERNIE or task 2 done
2009-07-05 00:43:34 +02:00
Paul Beckingham
6612f3e276 Enhancement - aliases
- Implemented command aliases.
2009-07-04 14:33:44 -04:00
Paul Beckingham
4af2b2dc13 Unit Tests - color.t
- Implemented tests for round-trip color name <--> code testing.
2009-07-04 14:11:10 -04:00
Paul Beckingham
69e839724d Documentation Update
- Removed a comment for 'ncurses' that looked a little too much like
  sarcasm.
2009-07-04 12:32:45 -04:00
Paul Beckingham
abcec98bef Unit Tests - fontunderline
- Implemented unit tests to verify the interaction between fontunderline,
  color, _forcecolor and :isatty.
2009-07-04 12:22:02 -04:00
Paul Beckingham
ca4bae558d Enhancement
- Added new _ids command to support tab completion scripts.
2009-07-04 10:28:55 -04:00
Federico Hernandez
02c7d7607c Fixed include statement for Linux 2009-07-04 14:40:54 +02:00
Paul Beckingham
f633e42597 Enhancement - _commands
- Added undocumented _commands command to support completion scripts.
2009-07-04 00:35:50 -04:00
Paul Beckingham
a6e9e6cdfb Unit Tests - rc
- Now tests whether the default rc and data.location are created
  from scratch.
2009-07-03 23:51:13 -04:00
Paul Beckingham
8473227f52 Enhancement
- When a .taskrc file is automatically generated, it is now nicely
  formatted, and filled with comments.
2009-07-03 23:32:00 -04:00
Paul Beckingham
a23a350b8b Enhancement
- Rewrote the code that checks for and creates ~/.taskrc and ~/.task
  if necessary.
- Takes into consideration the following:
    - rc:<file>
    - <file>:data.location
    - <~/.taskrc>:data.location
    - rc.data.location:<dir>
2009-07-03 20:46:19 -04:00
Paul Beckingham
3072476e53 Enhancement
- Added missing (new) commands to the completion script, and removed
  the newly obsolete undelete command.
2009-07-03 14:13:33 -04:00
Paul Beckingham
66e5c7fd64 Bug Fix
- Code doesn't compile when HAVE_LIBNCURSES is not defined (thanks to
  John Florian).
2009-07-03 12:38:49 -04:00
Federico Hernandez
8312dc1f1d - Support for project names (thanks to John Florian)
- Completes tags and project names for any command,
    not just list variants (thanks to John Florian)
  - bash-completion now completes tags for removal using '-'
  - internal completion list compiled by using underscore
    variants of corresponding commands
2009-07-03 16:10:03 +02:00
Federico Hernandez
03c9cc6005 Fixed bug in single digit day highliting unit test 2009-07-03 14:34:58 +02:00
Paul Beckingham
543fc1727d Bug Fix
- Fixed bug in annotations that caused it to echo back the original
  description, instead of the new annotation, when adding a new
  annotation.
2009-07-03 01:30:58 -04:00
Paul Beckingham
bd89287f05 Documentation Update
- More ChangeLog updates.
- Corrected supported platforms in NEWS file, accirding to Fredde's
  latest update on the Wiki.
2009-07-03 01:21:29 -04:00
Paul Beckingham
ef7c5dc4eb Unit Tests
- The unit tests needed a little love after "undelete" went away, and
  "undo" changed.
- Fixed a few tests that were broken.
2009-07-03 00:51:25 -04:00
Paul Beckingham
367214c57a Documentation Update
- Filled in more blanks in the ChangeLog file.
2009-07-02 23:36:15 -04:00
Paul Beckingham
5726926449 Enhancement - debug mode
- Added terminal width determination in debug mode.
2009-07-02 23:09:18 -04:00
Paul Beckingham
32b951dcc9 Bug Fix
- Allows 'bulk' as a valid configuration variable.
2009-07-02 22:37:48 -04:00
Paul Beckingham
65595220f2 Enhancment - undo
- Now presents a side-by-side table for comparison during undo.
2009-07-02 22:15:10 -04:00
Paul Beckingham
5a1191300c Enhancement - file locking
- While waiting for a lock, display a message to that effect,
  otherwise it looks like task is hung (thanks to John Florian).
2009-07-02 21:16:24 -04:00
Paul Beckingham
73378dd67e Enhancement - completion
- Implemented _projects and _tags reports to assist with tab
  completion scripts.
2009-07-02 20:10:36 -04:00
Paul Beckingham
8145b7b28e Build Change
- Now builds optimized by default.  Can be overridden with:
  ./configure --enable-debug=on
2009-07-02 18:39:18 -04:00
Paul Beckingham
c00e5138e0 Bug Fix
- Fixed compiler warnings on Solaris with --enable-debug=off.
2009-07-02 18:35:00 -04:00
Paul Beckingham
c89a0bbbd8 Bug Fix
- Fixed bug in TDB::loadCompleted that failed to provide a nice value
  for Task::id, and folks not using a Mac saw unitialized int values
  as task IDs.
2009-07-02 18:30:47 -04:00
Paul Beckingham
b692ae3b25 Unit Tests
- Added unit tests to ensure that UUIDs are unique, using the three
  different ways of generating them (add, duplicate, recurring).
2009-07-02 09:09:29 -04:00
Paul Beckingham
a41f0a0256 Bug Fix - uuids not unique
- Fixed bug that caused code to use a combination of srandom and rand,
  or srand and random.  Should be srandom/random, srand/rand, not a
  mix.
- Fixed bug that failed to set uuid in handleAdd, such that the uuid
  already assigned in context.task was used, which was generated before
  srand/srandom was is called.
2009-07-02 01:28:42 -04:00
Paul Beckingham
9f4a9d1325 Enhancement
- When a report displays completed or deleted tasks, there is no ID,
  so display "-" instead of "0".
2009-07-01 21:19:22 -04:00
Paul Beckingham
89e1eeacd2 Bug fix - edit
- Fixed problem with temp file template.
2009-07-01 21:08:39 -04:00
Paul Beckingham
d68b86fe56 Enhancement - projects
- Added priority subtotals to projects report.
2009-07-01 21:04:03 -04:00
Paul Beckingham
edcb719d94 Bug Fix
- Added include, according to random website which claims it makes the
  difference.
2009-07-01 19:59:46 -04:00
Paul Beckingham
389fa400a6 Bug Fix
- Added missing stdlib.h include file.
2009-07-01 19:42:52 -04:00
Paul Beckingham
7fec8a5c9b Enhancement - edit
- The edit command now uses the .task file extension for temporary
  files during editing, so that syntax coloring can be invoked.
2009-07-01 19:32:19 -04:00
Paul Beckingham
10fe3d6b28 Bug Fix - random broken
- Moved srandom/srand call back to where it was in 1.7.1.
2009-07-01 19:24:43 -04:00
Paul Beckingham
f588055b31 Enhancement - tags
- Added usage count to the tags report.
- Filled in some missing details in ChangeLog.
- Removed extraneous "srandom" call.
2009-07-01 18:56:12 -04:00
Paul Beckingham
21c3a0ef48 Code Cleanup - undo
- Improved description of most recent change.
- Added timestamp of most recent change.
2009-07-01 01:00:25 -04:00
Paul Beckingham
e7ba2ab76d Code Cleanup
- Converted std::cout diagnostics to context.debug calls.
2009-07-01 00:52:42 -04:00
Paul Beckingham
569d31da7a Bug Fix - undo
- Fixed bug that didn't properly pop_back off the undo stack.
- Fixed bug that caused an attempt to call taskDifferences when one of
  the tasks was "".
2009-07-01 00:46:15 -04:00
Paul Beckingham
0891d3ea63 Enhancement - undo
- Implemented new undo command.
- Removed old undelete command.
- Does not work yet.
2009-07-01 00:15:32 -04:00
Paul Beckingham
b7a0883212 Unit Tests - Task::validate
- Implemented first (of many) Task::validate tests.
2009-06-30 23:57:27 -04:00
Paul Beckingham
652f9b3c0a Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0
Conflicts:
	i18n/strings.sv-SE
2009-06-30 18:36:11 -04:00
Paul Beckingham
ed49546eac I18N
- Removed obsolete 'undelete' string.
2009-06-30 18:35:06 -04:00
Federico Hernandez
4c65fa1291 Fixed problems with double word strings where single word strings are required. 2009-06-30 22:37:18 +02:00
Paul Beckingham
af7803ea27 Enhancement - undo
- Removed obsolete undelete command.
- Removed obsolete undo command.
- Implemented new undo command as a call to the stubbed TDB::undo call.
2009-06-28 21:51:43 -04:00
Paul Beckingham
dc2bac1b5e Unit Tests
- All unit tests most now clean up a residual undo.data file, so the
  number of tests increased, but with no benefit.
2009-06-28 17:07:25 -04:00
Paul Beckingham
5d8c28f72f Enhancement - undo
- Added logging of both new tasks, and modified tasks.
- Added size of undo.data file to the statistics report.
2009-06-28 14:17:07 -04:00
Paul Beckingham
c29682b91f Enhancement - undo
- Now creates/opens/closes undo.data file.
- All new tasks are logged in undo.data file.
2009-06-28 12:23:46 -04:00
Paul Beckingham
58d7de8478 Enhancement
- Implemented Task::validate.
2009-06-28 11:10:51 -04:00
Paul Beckingham
b9e1bdc145 Documentation Update
- Addressed concerns in issue #85.
2009-06-28 10:44:50 -04:00
Paul Beckingham
ce4f26bdf3 Unit Tests
- Fixed a series of bugs to improve the test suite results.
2009-06-28 01:04:23 -04:00
Paul Beckingham
f3d3126839 Bug Fix
- Fixed bug that caused asserts in Table.cpp when a column had a blank
  heading and value.
2009-06-27 23:42:49 -04:00
Paul Beckingham
3dcda73e0c Enhancement
- Implemented tri-state confirmation for done command.
2009-06-27 21:51:24 -04:00
Paul Beckingham
8d76eaca88 Enhancement
- Implemented tri-state confirmation in the annotate command.
2009-06-27 21:31:11 -04:00
Paul Beckingham
a2cc75d2c7 Enhancement - confirmation
- Added tri-state confirmation to append command.
2009-06-27 21:23:45 -04:00
Paul Beckingham
1f3092469e Code Cleanup
- Eliminated valid.cpp by relocating functions to more sensible locations.
2009-06-27 20:49:28 -04:00
Paul Beckingham
52052f91f9 Bug Fix - formatBytes
- Corrected code and tests regarding floating point rounding.
2009-06-27 20:39:33 -04:00
Paul Beckingham
029b2d1182 Bug Fix - timesheet end date
- Fixed display of timesheet end date.  It was one day off.
2009-06-27 18:08:09 -04:00
Paul Beckingham
6e4f60c4fe Enhancement - confirmation on big changes
- Implemented confirmation on big changes.  That means if the description is
  changed, or more than 2 tasks are modified in a single command.
- Implemented taskDiff to detect differences between two tasks.
- Implemented taskDifferences to describe differences between two tasks.
2009-06-27 17:09:29 -04:00
Paul Beckingham
8e8f5935b3 Documentation Update
- Added 'bulk' variable to man page and Config.cpp.
2009-06-27 16:46:26 -04:00
Paul Beckingham
facb4dcb41 Bug Fix - Att::match
- Fixed bug in Att::match that causes blank dates to be interpreted
  as 12/31/1969, and therefore pass "xxx.before:" tests.
- Added the "cal" symlink trick to ChangeLog.
- Removed incorrect i18n tags from Config.cpp.
- Allowed .taskrc:confirmation=no to bypass Permission checking.
2009-06-27 16:00:41 -04:00
Paul Beckingham
7e0a1759f9 Enhancement - cal symlink
- Automatically runs "task calendar ..." if "task" is symlinked to "cal".
- Allows task to run as a replacement to Unix cal.
2009-06-27 12:39:05 -04:00
Paul Beckingham
518aea870f Enhancement - Permission
- Implemented new Permission object to manage tri-state confirmation
  of changes to multiple tasks.
2009-06-27 10:07:00 -04:00
Paul Beckingham
6d3df6922b Unit Tests - Att
- Added unit tests to verify functionality of Att::type,
  Att::validInternalName and Att::validModifiableName.
2009-06-27 10:04:38 -04:00
Paul Beckingham
c787e67d9c Bug Fix - 'max' date
- Changed the max date from Jan 19 2038 to Dec 31 2038.  This still
  serves the purpose, but avoids the UTC/EST/CEST timezon problems
  we have seen (thanks to Federico Hernandez).
2009-06-27 10:02:48 -04:00
Federico Hernandez
9aed6ec228 Unit tests for new 'task cal' functionality 2009-06-27 02:02:48 +02:00
Paul Beckingham
bb78f61d2a Unit Tests
- Fixed obsolete test in basic.t
2009-06-26 00:31:30 -04:00
Paul Beckingham
0440189b1d Bug Fix
- Fixed bug that caused Att::match to assume a Date was not already
  converted to an epoch.
2009-06-26 00:05:33 -04:00
Paul Beckingham
53155fcc34 Bug Fix - parsing
- Now properly enumerates ambiguous commands.
- Now properly enumerates ambiguous colors.
- Now displays suitable error when a command like "task x" is entered.
2009-06-25 22:21:43 -04:00
Paul Beckingham
d6168ff6a6 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-06-25 19:32:48 -04:00
Federico Hernandez
f3659cf709 New functionality for "task cal"
- 'task cal'        or 'task cal y'
    Prints a calendar starting from the current month/year
  - 'task cal due'    or 'task cal due y'
    Prints a calendar starting from the month with
    the oldest active due task
  - 'task cal 2010'
    Prints a yearly 12-month calendar
  - 'task cal 4 2010' or 'task cal 4 2010 y'
    Prints a calendar starting from the given month/year

  Calendars are either printed as 12 month calendars (y) or
  printed with the number of months that fits into the terminal width
2009-06-25 23:24:33 +02:00
Paul Beckingham
1cfe879409 Enhancement - Task::operator==
- Implemented Task::operator==.
- Implemented unit tests.
2009-06-25 17:08:39 -04:00
Paul Beckingham
a56eeb9ec2 Enhancements - task diff
- Implemented util.cpp/taskDiff to generate a proxy description of the
  difference between two tasks.
- Implemented unit tests for taskDiff.
2009-06-25 16:58:58 -04:00
Paul Beckingham
c5d7b41d98 Code Cleanup
- Migrated from Context::message to Context::footnote.  This more clear
  to the developer where the messages will be shown.
2009-06-25 15:00:32 -04:00
Federico Hernandez
8bcf459a52 Merge branch '1.8.0' of git@github.com:pbeckingham/task into cal 2009-06-25 12:52:57 +02:00
Paul Beckingham
104ad5a5b5 Enhancement - timer
- Now displays " sec" after timing display.
2009-06-25 01:24:48 -04:00
Paul Beckingham
a32263e7ea Enhancement - next
- The next report is now a custom report.  There is also a nasty
  piece of logic that lets the next report exist as a custom report,
  and also with it's own handleReportNext function to prep and filter
  the tasks, then hand off to runCustomReport.
2009-06-25 00:47:07 -04:00
Paul Beckingham
f31f068322 Code Cleanup
- Broke out the guts of handleCustomReport into runCustomReport, so
  that the next report can generate it's own task list, then allow the
  custom report handling to render it.  This means the next report is
  essentially (but not quite) a custom report.
2009-06-24 21:56:31 -04:00
Paul Beckingham
5632c49945 Code Cleanup
- Removed references to ::strcmp.  Thanks Fredde.
2009-06-24 21:55:44 -04:00
Federico Hernandez
b67b64ea00 task cal modifications 2009-06-25 03:03:08 +02:00
Paul Beckingham
5cb009bc0a Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-06-23 19:53:31 -04:00
Federico Hernandez
ed7a9273d0 Introduced longversion configuration variable.
- When off just a short version msg is displayed.
  - When on the current values for the configuration
    variables are also displayed. Default is on.
2009-06-24 00:32:45 +02:00
Paul Beckingham
78afa4e110 Enhancement - Aliases
- Moved alias mapping to Context.
- Added Context::canonicalize to resolve aliases.
- Added Context::loadAliases to reload on config file change.
- Removed old alias processing from Cmd.
- Doesn't work yet, but the data is loaded.
2009-06-23 17:38:58 -04:00
Paul Beckingham
b6bc72c449 Enhancement - confirm3
- Added a tri-state confirmation function for confirming bulk operations
  allowing the user to answer yes/no/all to and optionally allow,
  disallow or bulk-allow big changes.
2009-06-23 14:56:15 -04:00
Paul Beckingham
acb6e3cfdc Enhancement - timers
- Timers now only use fixed precision for even very small numbers.
2009-06-23 09:56:31 -04:00
Federico Hernandez
b31cc639a4 Fixed bug due to incompatible 'date' commands on OS X and Linux
to display runtime of all unit tests
2009-06-23 10:49:55 +02:00
Paul Beckingham
f7c91d6db7 Unit Tests
- Fixed a series of broken tests.
2009-06-23 01:54:16 -04:00
Paul Beckingham
f7d40e8d8d Unit Tests
- Fixed unit test build problem.
2009-06-23 01:32:24 -04:00
Paul Beckingham
50f000988b Debugging
- Added timers to measure performance.
2009-06-23 01:23:46 -04:00
Paul Beckingham
e59e35ae29 Code Cleanup
- Added declared but unimplemented copy constructors and assignment
  operators.
2009-06-23 00:00:50 -04:00
Paul Beckingham
c6a56d444e Bug Fix, Tweaks
- .taskrc debug= now defaults to 'off', which will reduce clutter
  and won't surprise beta testers.
- interactive.cpp did not compile when ncurses was not detected by
  autoconf.  That code branch obviously never got executed.
- The interactive shell now instructs the user to type 'quit' to
  leave the shell.
2009-06-22 22:33:09 -04:00
Paul Beckingham
62449d8b3e Bug Fix - Calendar
- Fixed bug in calendar that failed to consider only pending tasks
  when coloring in the calendar display, and when calculating the
  most overdue task to be displayed.
- Modified util.cpp/formatSeconds to stop displaying fractional days,
  because having a task age represented as 5.1 days is silly.
2009-06-22 16:59:51 -04:00
Federico Hernandez
a4f9493ce7 Added output of runtime 2009-06-22 09:19:10 +02:00
Federico Hernandez
dd3b651767 Fixed include statement for Linux 2009-06-22 08:32:52 +02:00
Federico Hernandez
39da7bddfd Added dummy tips file for German and Swedish 2009-06-22 08:23:01 +02:00
Federico Hernandez
94e4c7b9da Ignore temp data in tests dir 2009-06-22 08:21:17 +02:00
Paul Beckingham
329a78039a Enhancement - wait status
- Supports the new Task::waiting status.
- Supports: task <id> wait:<date>
- Supports: task <id> wait:
- Supports: task waiting
2009-06-21 22:42:32 -04:00
Paul Beckingham
40bde9e765 Enhancement - shadow files
- Properly clears out the context, so shadow files can work.
2009-06-21 15:37:36 -04:00
Paul Beckingham
52fb6abb9b Enhancement - tips
- Added new tips file, in the correct format (unix fortune), with
  dummy entries.  If we are to support a "task tip" command in future
  versions, we need to start gathering the tips now.
2009-06-21 12:01:30 -04:00
Paul Beckingham
343c43a010 Enhancement - filter on annotation
- Description filters now automatically apply to annotations.
2009-06-21 11:31:03 -04:00
Paul Beckingham
245339e7fc Documentation Update
- Added attribute modifiers to the help report.
2009-06-21 09:08:32 -04:00
Paul Beckingham
fab37d3383 Enhancment - interactive shell
- At the request of several, and the great example of John Florian,
  task has an interactive shell.
2009-06-21 08:39:53 -04:00
Federico Hernandez
93a68361a7 Changed dates for epoch conversion due to TZ variations 2009-06-20 23:03:06 +02:00
Federico Hernandez
aae4cbac8b Fixed include statement for Linux 2009-06-20 21:56:54 +02:00
Paul Beckingham
cbecec263a Enhancement - all attribute modifiers working
- Implemented before, below, under, after, above, over.
2009-06-20 15:37:01 -04:00
Paul Beckingham
3bed6bb573 Enhancements - config variables, debug
- "debug" now considered a valid configuration variable.
- "alias.*" now considered a valid configuration variable.
- Moved some messages over to use Context::debug.
2009-06-20 14:14:51 -04:00
Paul Beckingham
344b1aba58 Enhancement - nag
- Improved nagging with respect to multiple tasks.
2009-06-20 13:55:11 -04:00
Paul Beckingham
f5e0f8b7a6 Enhancement - echo ID on add
- When a task is added, the new ID is echoed back, for convenience.
  This requires a scan of the pending file, so there is a performance
  hit, and the feature is controlled by the FEATURE_NEW_ID define.
2009-06-20 13:06:53 -04:00
Paul Beckingham
02518e0223 Enhancement - debug support
- Added debug=on support.
- Added color.debug= support.
2009-06-20 10:54:01 -04:00
Federico Hernandez
173b3f6828 Fixed include statement for Linux 2009-06-19 08:51:44 +02:00
Paul Beckingham
dcb4ae5497 Bug Fix - durations
- Fixed bug where durations (recur:x) were not properly parsed and
  validated.
- Fixed bug where the list output was being improperly parsed.
2009-06-19 00:52:48 -04:00
Paul Beckingham
8dab95e200 Bug Fix - recurrence
- Fixed bug whereby handleRecurrence was being called after the tasks
  were loaded and filtered, and thus handleRecurrence operated on a
  filtered set, and failed.  The fix is to move the call to before the
  TDB::load call, and to add another TDB::loadPending call inside
  handleRecurrence.  This means TDB::load needs to be reentrant without
  re-reading the file, and can therefore be called twice, with the
  likelihood of there being a different filter for each call.  This in
  turn led to the problem whereby handleRecurrence would generate the
  synthetic tasks, which then sat uncommitted in TDB::mNew.  The fix
  for this is that every call to TDB::loadPending gets the contents of
  TDB::mNew appended (with correct IDs).  This bug is what you might
  call a good one.
2009-06-19 00:15:38 -04:00
Paul Beckingham
20bd2cf594 Unit Tests - oldest, tag
- Fixed oldest.t unit tests that relied on "task oldest 3" instead of
  the new "task oldest limit:3".
- Fixed tag.t so that it uses example tags +one +two instead of the
  original +1 +2, because when it comes time to remove those tags
  with -1 -2, the tags are interpreted as a malformed sequence.
2009-06-18 23:23:07 -04:00
Paul Beckingham
3ffb855956 Bug Fixes - Att, Subst
- Fixed but that required all known attributes to be listed by name
  in order to be recognized by creating new Att::validInternalName
  method.
- Fixed bug in non-global Subst that failed to save a modified
  annotation.
2009-06-18 23:14:26 -04:00
Paul Beckingham
cea84b3d3b Bug Fix - export
- Fixed export bug that was emitting quoted blank strings, instead of
  blank strings.
- Fixed undo.t unit tests.
2009-06-18 22:52:27 -04:00
Paul Beckingham
456a493ab5 Bug Fix - Att
- The "due" date was not being parsed according to the desired dateformat,
  but in the default "m/d/Y".
2009-06-18 22:13:05 -04:00
Paul Beckingham
9c2e70b73a Bug Fixes, Unit Tests
- Fixed bug where "foo:bar" was not recognized as an attribute, and
  generated an error rather than demoting is to part of the description.
- Fixed bug where en-passant deltas were applied only to the first task
  in a sequence.
- Fixed various unit test.
2009-06-18 22:01:43 -04:00
Paul Beckingham
1511c1fcfd Enhancments - aliases
- Began implementation of aliases.  All commented out for now.
2009-06-18 20:42:12 -04:00
Paul Beckingham
315c70c503 Enhancement - custom report name collisions
- Task now emits an error if a custom report name collides with
  that of a built-in command.
2009-06-18 20:13:12 -04:00
Paul Beckingham
aeaf443f67 Enhancement - statistics
- Added total data file size to statistics report.
- Implemented util.cpp/formatBytes.
2009-06-18 19:47:57 -04:00
Paul Beckingham
ec17eaaa43 Documentation Update - help
- Added 'limit' to help output.
- Combined /from/to/ and /from/to/g into one help line.
- Added example of -- argument in use.
2009-06-18 18:49:47 -04:00
Paul Beckingham
ae3257b623 Bug Fix - tags report using std::cout
- The tags report was writing directly to std::cout, therefore
  bypassing the header/footer control.
2009-06-18 18:37:53 -04:00
Paul Beckingham
b9a1993692 Bug Fix - limit:
- The limit: attribute can now be specified on the command line, to
  override any custom report filter.
2009-06-18 18:34:40 -04:00
Paul Beckingham
af606598fa Bug Fix - recur.t
- Fixed bug that causes recur.t to fail.  The "recur:" duration was
  being converted to days, whereas it should have been kept as a
  literal.
2009-06-18 17:45:27 -04:00
Federico Hernandez
96be49b78d Replaced nested if statement with boolean logic expression 2009-06-18 09:48:46 +02:00
Federico Hernandez
8cf7888fd5 * Wrong unit test and algorithm for leapyears (year 1900) 2009-06-18 09:18:13 +02:00
Federico Hernandez
0ae76d3bf2 Fixed include statement for Linux 2009-06-18 09:11:59 +02:00
Paul Beckingham
5eb4d23685 Bug Fix - nag
- TDB::gc now displays a header message.
- nag function now piggy-backs on existing locked TDB.
2009-06-18 01:55:04 -04:00
Paul Beckingham
b932d9b9b7 Bug Fix - custom report filters
- Added support for using parent in a filter.
- Fixed bug that ignored custom report filters.
- Made Context::parse and Context::autoFilter reentrant.
2009-06-18 01:41:15 -04:00
Paul Beckingham
4d43b77441 Enhancement - recurring tasks
- Implemented handleRecurringTasks.
- Implemented TDB::nextId.
2009-06-18 00:02:12 -04:00
Paul Beckingham
840c61cbbf Enhancement - nag
- Implemented nag feature.
2009-06-17 23:39:39 -04:00
Paul Beckingham
7e2da42f40 Bug Fix - due date, colorization
- Fixed bug that caused colorization to be way, way off.  Silly
  mistake.
- Fixed bug whereby due dates and durations were stored as-is, but
  should have been converted.
- On a related note, added Date::toEpochString,
  Duration::operator (std::string).
2009-06-17 22:52:04 -04:00
Federico Hernandez
f701f10234 * Files needed for cygwin packaging
- usr <- binary tarball
  - CYGWIN-PATCHES <- source tarball
  - patch to create CYGWIN PATCHES inside source tarball
2009-06-17 22:53:09 +02:00
Paul Beckingham
61cedc3ad1 Enhancement - import command
- Implemented import command
- Implemented Context::clearMessages to remove all accumulated
  messages.  This is needed because parts of the import process are
  recursive and we don't want Context to dump messages for every
  import record on completion.
2009-06-17 00:59:31 -04:00
Paul Beckingham
07cf8d6ee8 Enhancements - edit command
- Implemented edit command.
2009-06-17 00:03:09 -04:00
Paul Beckingham
b2c76f6123 Enhancement - modify command
- Implemented modify command
2009-06-16 23:25:35 -04:00
Paul Beckingham
051720a279 Enhancement - annotate
- Implemented annotation command.
2009-06-16 22:55:05 -04:00
Paul Beckingham
23f0a9658e Enhancement - duplicate
- Implemented duplicate command.
- Now allows duplication (and demotion) of recurring tasks.
2009-06-16 22:40:59 -04:00
Paul Beckingham
8a22ac7cf2 Enhancement - header, footer, message
- Added header, footer and message sinks.
- Added individual colorization of headers, footers and messages.
- Added new configuration variables to Config.cpp, taskrc.5.
- Added colorization functions to rules.cpp
2009-06-16 21:55:30 -04:00
Paul Beckingham
e7a0a20d55 Optimization
- TDB::load can entirely skip the loading of completed.data if the
  specified filter is just so.
- Added FEATURE_TDB_OPT definition to allow disabling of this.
2009-06-16 18:35:02 -04:00
Paul Beckingham
7a77cd6d4a Unit Tests - export.t
- Corrected export unit test to account for the new syntax of the export
  command, which no longer accepts a file name argument, and send the report to
  stdout instead.
2009-06-16 16:34:46 -04:00
Paul Beckingham
78ec411067 Enhancements
- Added text.cpp/ucFirst function to capitalize words, so that "pending"
  can now appear as "Pending" on the info report.  This helps task pass
  many more test cases.
2009-06-16 13:32:11 -04:00
Paul Beckingham
7a2c40626e Unit tests - add.t
- Reduced verbiage in tests.
2009-06-16 12:51:13 -04:00
Paul Beckingham
027b343e49 Bug Fixes - autofilter
- Auto filter now only creates a filter for read-only commands.
- Fixed bug whereby ambiguities were reported twice:
    "could be one of a, b, a, b".
2009-06-16 12:05:04 -04:00
Paul Beckingham
97d732e5f7 Enhancements - filters
- The project attribute is now automatically filtered with
    project.startswith:<value>
  to provide leftmost matching (ie subprojects).
- Unmodifiable attributes (uuid, start ...) are now prevented from
  being updated if the command is designated as a "write" command.
2009-06-16 10:42:53 -04:00
Paul Beckingham
5691ed0588 Bug Fix - custom reports
- Fixed bug that applied an empty sequence as a filter, which passed
  no tasks.
2009-06-16 01:31:49 -04:00
Paul Beckingham
cdd07be331 Enhancement - Att::type
- Implemented Att::type to discern attribute types to assist with
  type-specific modifier evaluation.
- Fixed bug that required attributes to have specified values, whereas
  stating "name:" means no value for name.
2009-06-16 00:51:11 -04:00
Paul Beckingham
db0d85f5e7 Bug Fix - description in filter
- The description attribute may now be used in a filter.
2009-06-16 00:30:56 -04:00
Paul Beckingham
6a77d61faa Enhancements - undo command
- Implemented the undo command.
2009-06-16 00:16:43 -04:00
Paul Beckingham
71b320b361 Enhancement - undelete command
- Implemented undelete command.
2009-06-16 00:08:02 -04:00
Paul Beckingham
41e137a92c Enhancements - stop command
- Implemented stop command
- Fixed bug in TDB that failed to truncate the pending file on
  update.
2009-06-15 23:59:56 -04:00
Paul Beckingham
1551362d1e Enhancements - delete, start
- Implemented delete command.
- Implemented start command.
2009-06-15 23:47:42 -04:00
Paul Beckingham
6e6f86783f Unit Tests - rc override
- Unit tests to make sure rc.name:value is working.
2009-06-15 21:10:57 -04:00
Paul Beckingham
858f34cf95 Bug Fix - std::vector::erase
- Fixed bug whereby code called std::vector::erase, but then continued
  as though the iterator was still good.
2009-06-15 20:15:40 -04:00
Paul Beckingham
108b486ac1 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-06-15 19:28:01 -04:00
Federico Hernandez
0fe4a850df Initial german localization 2009-06-16 00:55:15 +02:00
Federico Hernandez
bc65d7292f * INSTALL file is now jsut include in dist tarball
but no longer "installed" together with the binary
  package documentation.
2009-06-16 00:08:07 +02:00
Paul Beckingham
00c5e61d49 Bug Fix - rc:alternate
- Fixed handling of rc: alternate rc file.
- Reorganized Config.cpp regarding defaults.  More work needed.
2009-06-15 17:31:29 -04:00
Federico Hernandez
717e0f6329 * rpm now installs bash completion
* changes for doc (scripts) and man pages
2009-06-15 23:26:59 +02:00
Paul Beckingham
4470c3b88c Bug Fix - Task::determineVersion
- Fixed determineVersion details.
- Strips \n from  EOL before attempting parse.
2009-06-15 14:22:34 -04:00
Paul Beckingham
62f240aad4 Bug Fix - composeF4 -> parse -> composeF4
- Fixed bug that meant Task::composeF4 added a newline, but Task::parse
  did not expect a newline.  This caused Task::determineVersion to
  detect a format 1 encoding and throw.  Changed TDB::load to not remove
  any \n characters, and Task::parse to accept lines either with or
  without.
2009-06-15 12:37:35 -04:00
Paul Beckingham
b742712bb1 Bug Fix - Cmd
- The two load* methods were conflicting - if loadCustomReports was
  called first, it stomped on the commands list and prevented
  loadCommands from running.  Now there is only one method.
- Rewrote util.cpp/autoComplete to use STL over libc.  Might reduce
  code size.
2009-06-15 12:18:04 -04:00
Paul Beckingham
9f1880e050 Enhancement - done command
- Implemented done command.
2009-06-15 11:27:50 -04:00
Paul Beckingham
c65b6e9f48 Portability - util.cpp #warning
- Removed useless warning pragma - it only confuses people.
2009-06-15 10:37:32 -04:00
Paul Beckingham
91da9440c5 Portability
- Fixed compiler warnings on Fedora/Ubuntu.
- Fixed bug found by compiler warnings.  Woohoo!
2009-06-15 10:00:06 -04:00
Paul Beckingham
98316f7ab1 Enhancement - append
- Implemented append command.
2009-06-15 01:44:42 -04:00
Paul Beckingham
3d9ec60153 Unit Tests - tdb.t
- Now cleans up it's temporary files.
2009-06-15 00:54:25 -04:00
Paul Beckingham
7ff178cecc Integration - TDB write operations
- TDB::gc rewritten.
- TDB::commit fixed.
- Corrected usage of handleRecurringTasks wrt TDB.
- Unit tests for TDB.
2009-06-15 00:52:24 -04:00
Federico Hernandez
314ce572e1 Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-06-15 00:44:14 +02:00
Federico Hernandez
f98abbe036 Intitial swedish localization. 2009-06-15 00:43:39 +02:00
Paul Beckingham
80bb9f0a18 Integration - TDB
- Renamed TDB2 to TDB.
- Integration of new code complete.
2009-06-14 18:19:00 -04:00
Paul Beckingham
53d0d1cbac Integration - TDB*
- Obsoleted TDB.h, TDB.cpp
- Implemented missing functionality in TDB2.cpp
2009-06-14 17:58:37 -04:00
Paul Beckingham
1560463f9e Integration - Obsolete T removed
- Removed the obsolete T object (the old Task object), that is no
  longer needed since the Task object is now complete, and there is
  nothing in T to refer to.  This is a big milestone.
2009-06-14 16:14:10 -04:00
Paul Beckingham
ffd887747f Enhancement - calendar report
- Implemented calendar report.
2009-06-14 15:49:58 -04:00
Paul Beckingham
9004b65956 Enhancement - next report
- Implemented next report.
2009-06-14 14:53:22 -04:00
Paul Beckingham
f470acadaa Enhancements - export
- Implemented Task::composeCSV.
- Implemented export command, but removed filename support.  This
  needs to be documented.
2009-06-14 14:26:39 -04:00
Paul Beckingham
efe0b86708 Integration - report helper functions
- Added getDueDate helper function.
- Added getFullDescription (description + annotations) helper function.
2009-06-14 14:02:14 -04:00
Paul Beckingham
8529daaf28 Enhancements - timesheet report
- Implemented timesheet report.
2009-06-14 13:32:53 -04:00
Paul Beckingham
819c33e491 Enhancements - summary report
- Implemented summary report.
2009-06-14 12:46:01 -04:00
Paul Beckingham
a09246fd71 Enhancement - ghistory report
- Implemented the ghistory report.
2009-06-14 12:31:19 -04:00
Paul Beckingham
9f6b112003 Enhancement - history report
- Implemented history report.
- Improved (not to the point of them working) filters.
- Improved automatic filter construction.
- Removed obsolete members from Task.
- Added tag support to the "add" command.
2009-06-14 12:09:57 -04:00
Paul Beckingham
85e38e67d3 Integration - fully eliminated T.cpp, T.h 2009-06-13 19:09:00 -04:00
Paul Beckingham
113c15ef2f Integration - removed T
- T.cpp no longer compiled and linked.  Kept for reference, but no
  longer part of task.
2009-06-13 19:03:35 -04:00
Paul Beckingham
c89a222c7c Integration - removing T
- Removed linkage to T.o in unit tests.  The first step towards
  eliminating T.cpp.
2009-06-13 18:53:01 -04:00
Paul Beckingham
841958d889 Unit Tests - decommission t.t.cpp
- Eliminated obsolete t.t.cpp.
2009-06-13 17:59:54 -04:00
Paul Beckingham
a04bfc468b Integration - mod
- Now handles blank modifiers.  Like it should.
2009-06-13 17:56:48 -04:00
Paul Beckingham
25d27bec93 Integration - attribute validation
- Implemented digitsOnly primitive.
- Implemented noSpaces primitive.
- Added unit tests for above.
- Att now manages the lists of valid attributes and modifier names.
- validName migrated to Att.
- validModifiableName migrated to Att.
- New Att::validNameValue.
- Removed obsolete validDescription.
- Removed obsolete validPriority.
- Removed obsolete valid.cpp/guess.
- Implemented text.cpp/noVerticalSpace.
- Added unit tests for text.cpp/noVerticalSpace.
- Removed final static lists from valid.cpp.
2009-06-13 16:27:13 -04:00
Paul Beckingham
eda17772c9 Enhancement - color
- Color routines are now table driven and much smaller.
- Implemented Text::guessColor.
2009-06-13 14:18:49 -04:00
Paul Beckingham
0665caae55 Enhancements - date
- Relocated valid.cpp/dataValid to Date::valid.
- Added new unit tests in date.t.cpp.
2009-06-13 12:51:51 -04:00
Paul Beckingham
d99dec5556 Enhancements - info report
- Implemented info report.
- Removed odd Subst and Sequence objects from Task - are they just
  vestigial limbs, or did I add them for a good reason?  They are
  gone now.
- Added Filter::applySequence to replace old filterSequence.
- Removed obsolete report.cpp filter function.
2009-06-13 00:50:48 -04:00
Paul Beckingham
5288e167d0 Enhancement - gc/shadow
- shadow file update is now triggered by the type of command, not
  explicitly by name.
- Context::inShadow now keeps track of whether it is running a shadow
  file update to prevent recursion.
2009-06-12 22:45:42 -04:00
Paul Beckingham
788e264378 Enhancements - custom reports
- Converted active, overdue and completed reports to custom reports.
- Added new recurring report.
- Added support for new 'end' column, which is the completion date.
2009-06-12 22:12:35 -04:00
Paul Beckingham
c9807f4636 Unit Tests - parse
- Eliminated parse.t.
- Fixed t.t.cpp tests.
2009-06-12 21:34:42 -04:00
Paul Beckingham
6ac8bdc5ca Enhancements - modifier cleanup
- Removed obsolete modifiers
- Added above/below
2009-06-12 21:23:15 -04:00
Paul Beckingham
bd0309b4ff Enhancements - modifiers
- Now only allows one modifier.
- Removed "not", "synth", "next", "first", "last" modifiers.
- Modified match logic.
2009-06-12 21:11:33 -04:00
Paul Beckingham
5a0535c9b5 Enhancment - Record::has
- Used new Record::has method for efficiency.
2009-06-12 01:54:53 -04:00
Paul Beckingham
0b14efbb76 Enhancements - validation
- Implemented Cmd::isReadOnlyCommand.
- Implemented Cmd::isWriteCommand.
- Added unit tests for above.
2009-06-12 01:45:42 -04:00
Paul Beckingham
bc8aba26a9 Enhancement - limit
- Allow command line limit overrides.
2009-06-12 00:05:19 -04:00
Paul Beckingham
d898f3f509 Enhancement - Annotations
- Annotations are now being parsed properly from FF3.
2009-06-11 22:58:38 -04:00
Paul Beckingham
5836430cc1 Code Cleanup
- Removed obsolete code from main.cpp.
2009-06-11 21:34:40 -04:00
Paul Beckingham
37e08df8ba Enhancements - TDB2::gc
- Stubbed TDB2::gc.
- Fixed broken tests Makefile
- Added handleCustomReport call to Context dispatch.
2009-06-11 21:17:30 -04:00
Paul Beckingham
edd065d80e Code Cleanup
- Renamed parse.cpp -> valid.cpp to reflect its new role of housing
  all the validation routines that don't belong to objects.
- Split report.cpp into report.cpp and custom.cpp.
2009-06-11 21:02:02 -04:00
Paul Beckingham
66011acbf8 Enhancements - rules.cpp
- Converted rules.cpp to work under 1.8.0.
- Relocated validReportColumns, validSortColumns to parse.cpp.
2009-06-11 20:35:58 -04:00
Paul Beckingham
ac9dae9af8 Enhancements - TDB::mId
- Implemented ID assignment.
- Removed unnecessary constructors.
2009-06-11 20:34:55 -04:00
Paul Beckingham
754b79afb2 Enhancement - Record::has
- Implemented Record::has which guarantees no autovivification of
  attributes.
2009-06-11 20:29:53 -04:00
Paul Beckingham
1ff3e73ebc Documentation Update
- Fixed typo in README.
2009-06-11 19:40:59 -04:00
Federico Hernandez
48683370c0 * Reorganize man pages for easier handling
* Install i18n files
2009-06-12 00:44:56 +02:00
Federico Hernandez
c3309cfb54 Small reorg of top level project dir 2009-06-11 23:49:43 +02:00
Federico Hernandez
cebe220344 * Bumping ubuntu build configuration files partly to 1.8.0 2009-06-11 23:12:17 +02:00
Federico Hernandez
9b4262bfc0 * Bumoing version to 1.8.0 in rpm spec file
* Changes to description
2009-06-11 23:00:41 +02:00
Federico Hernandez
41be5fd66a Added information about package build config files 2009-06-11 22:58:39 +02:00
Federico Hernandez
94d8702666 Change of task.cpp should have been to main.cpp and not Task.cpp 2009-06-11 15:42:05 +02:00
Federico Hernandez
e39619e4ce Rename of src/task.cpp to src/Task.cpp 2009-06-11 13:41:18 +02:00
Federico Hernandez
78c770afe6 Initial commit of package build config files 2009-06-11 13:16:51 +02:00
Paul Beckingham
1cac0d6647 Bug Fix - FF4 newline
- Oops - FF4 did not include a newline at EOL.
2009-06-11 02:00:05 -04:00
Paul Beckingham
6066fa51ba Code Cleanup
- Eliminated several parse.cpp functions.
- Implemented missing Cmd::allCustomReports.
2009-06-11 01:49:51 -04:00
Paul Beckingham
9a94ea963c Enhancement - locale variant stripping
- If a locale (locale=en-US) contains variant (locale=en-US.UTF8),
  then task ignores the variant.  For now.
2009-06-11 01:37:13 -04:00
Paul Beckingham
ed2ed7c2e2 Enhancements - shadow file
- Implemented (bug not debugged) the shadow file update.
- Added oddly missing (and bypassed) Context::message and Context::footnote
  methods.
2009-06-11 01:30:14 -04:00
Paul Beckingham
a58aa948b8 Enhancement - default.command
- Implemented default.command handling.
2009-06-11 01:10:53 -04:00
Paul Beckingham
d4a9a387af Bug Fix - add with no status
- Tasks were not assigned a default status of Task::pending when added.
2009-06-11 00:46:04 -04:00
Paul Beckingham
d961dfda59 Enhancement - stats
- Implemented stats report.
- Removed more obsolete code.
2009-06-11 00:44:31 -04:00
Paul Beckingham
7b9cb12308 Enhancement - add
- Modified Record::get* methods to be const.
- Implemented TDB2::add.
- Renamed Task::valid to Task::validate.
- Implemented Task::setEntry to default creation time.
- Fixed bug where TDB2 was opening files "rw" instead of "r+".
2009-06-11 00:11:11 -04:00
Paul Beckingham
8728312da6 Optimization - TDB2 access
- Broke TDB2::load into TDB2::load, TDB2::loadPending and
  TDB2::loadCompleted.
- Converted "projects" and "tags" reports to use this.
2009-06-10 23:12:11 -04:00
Paul Beckingham
9776495286 Code Cleanup - TDB removal
- TDB removed from all code, but source kept for further reference.
2009-06-10 22:54:56 -04:00
Paul Beckingham
fc7b344a8b Enhancement - Context::filter
- Automatic filter should not include "uuid".
2009-06-10 22:21:33 -04:00
Paul Beckingham
8bef5a90cd Enhancement - Context::constructFilter
- After parsing the command line, a filter is now constructed.
2009-06-10 22:11:38 -04:00
Paul Beckingham
df38d5aaa0 Code Cleanup
- Relocated longUsage and shortUsage to report.cpp, where they belong,
  which has the positive side effect of allowing all the compiled unit
  tests to link.
2009-06-10 21:51:01 -04:00
Paul Beckingham
d7da182450 Code Cleanup
- Renamed T2.h -> Task.h, T2.cpp -> Task.cpp.  This permanently avoids
  the problem where g++ on OpenBSD 4.5 fails because of the T class,
  which probably conflicts with C++ templates.  Who knows.
2009-06-10 21:35:07 -04:00
Paul Beckingham
71f4749d56 Code Cleanup
- Renamed files task.h -> main.h, task.cpp -> main.cpp.  This is to
  prepare for the next rename, which addresses the OpenBSD bug.
- Removed utf8.h, utf8.cpp from Makefile.am, which were inadvertantly
  added.
2009-06-10 21:20:00 -04:00
Paul Beckingham
41bcdc2875 Documentation Update
- Delete checklist.txt, because it is (a) out of date, and (b)
  superceded by a much better document Fredde wrote.
2009-06-10 20:02:53 -04:00
Paul Beckingham
2da4f8ba7a Enhancements - Context::getWidth
- Added help function to reduce general code size.
2009-06-10 00:35:37 -04:00
Paul Beckingham
8dfe4bd30a Enhancement - usage and help commands
- Implemented usage and help commands.
2009-06-10 00:18:02 -04:00
Paul Beckingham
0449f9e0a2 Enhancements - version command
- Implemented version command.
- Corrected config handling in version command.
2009-06-09 23:58:05 -04:00
Paul Beckingham
f3f77a4c78 Enhancement - report stubs
- Stubbed all non-1.8.0 reports.
- Updated all handler signatures.
2009-06-09 22:48:03 -04:00
Paul Beckingham
a694ac05b1 Enhancement - colors report
- Implemented colors report.
- Commented out all other commands and reports.
- Eliminated obsolete findT function.
2009-06-09 22:21:56 -04:00
Paul Beckingham
940f4a85a4 Documentation Update
- Incorporated 1.7.1 ChangeLog details.
2009-06-09 19:55:44 -04:00
Paul Beckingham
1422a15cbc Merge branch '1.7.1'
Conflicts:
	doc/man5/taskrc.5
2009-06-09 19:49:36 -04:00
Paul Beckingham
9c15457d7f Merge branch '1.7.1' 2009-06-09 19:35:24 -04:00
Federico Hernandez
f209e4aa93 Added new support email address 2009-06-09 17:34:27 +02:00
Federico Hernandez
20d8124a1d Fixed documentation for 1.7.1 2009-06-09 17:30:09 +02:00
Federico Hernandez
db6de54ccc * Updated project homepage reference and license text 2009-06-09 09:32:23 +02:00
Federico Hernandez
eb864820cf * Removed hard-coded version number 2009-06-09 09:31:44 +02:00
Federico Hernandez
0291e4c72e Changed some more references from beckingham.net to taskwarrior.org 2009-06-09 08:56:59 +02:00
Paul Beckingham
6e27feb8a3 Code Cleanup
- Removed Makefile.in from repository.  This was done in 1.8.0, but
  wasn't in 1.7.0.  It's time.
- Added Makefile.in to the .gitignore files.
2009-06-08 23:24:09 -04:00
Paul Beckingham
1dcba4619e Documentation Update
- Bumped version to 1.7.1.
- Changed references to email addresses, URLs.
2009-06-08 23:14:38 -04:00
Paul Beckingham
7538b43c68 Bug Fix - Build failure on OpenBSD
- Fixed build failure on OpenBSD (thanks to Mike Adonay).
2009-06-08 23:03:30 -04:00
Paul Beckingham
aff828c51b Integration - "tags" report
- The "tags" report is now working under 1.8.0.
2009-06-08 01:24:33 -04:00
Paul Beckingham
fb5fe5f5b4 Integration - "projects" report
- "projects" report converted to 1.8.0.
- Relocated code from task.cpp to recur.cpp to allow unit tests to link
  without includign task.cpp and therefore main.
- Removed obsolete sandbox directory.
- Fixed bug where Config::load deleted the pre-loaded custom reports.
- Fixed bug where Cmd::valid failed to include custom reports properly.
2009-06-08 00:54:49 -04:00
Paul Beckingham
cf67e0142c Bug Fix - Att::match
- Fixed Att::match bug that succeeded when no modifiers were present.
2009-06-07 22:57:14 -04:00
Paul Beckingham
9d48faa759 Enhancements - T2::legacyParse
- T2 can now parse all supported legacy formats (ff2, ff3) as well as
  ff4.
- Added tag and attribute support to T2.
- Added T2 unit tests for all formats.
2009-06-07 22:17:11 -04:00
Paul Beckingham
72e3f76ed9 Integration - tag parsing
- Added +tag, -tag support to Context.
- Unit tests still broken.
- Task is still broken.
2009-06-07 17:27:08 -04:00
Paul Beckingham
bf4cf8e786 Unit Tests - Duration
- Added tests to cover Duration::valid
- Added negative test
2009-06-07 17:14:06 -04:00
Paul Beckingham
ed39b88719 Integration - Context::parse
- Integrated Att parsing.
- Unit tests are broken right now.
- Stubbed Context::shadow.
- Implemented Duration::valid.
- Task is broken right now.
2009-06-07 17:07:49 -04:00
Paul Beckingham
7a219c999e Unit Tests - Config
- Added unit tests for Config.  Why didn't I do this a year ago?
- Shut off old 1.7.0 code (gulp).
- Task now thoroughly broken, and only 1.8.0 can help.
2009-06-07 16:31:10 -04:00
Paul Beckingham
d702ba8f24 Enhancement - Integration
- Integrated Cmd object.
- Enhanced Context object with dispatch and shadow methods.
- Fixed bug in Context::parse.
- Implemented command parsing.
- Fixed Sequence bug, and unit tests.
2009-06-07 16:00:22 -04:00
Paul Beckingham
190c6b53fc Enhancements - Config
- Added processing for context.config overrides, and associated
  argc,argv handling.
- Bug fix in filt.t.cpp, but three tests still fail.  Too big a
  distraction to fix right now.
- Warning: build is not broken, but task is broken.
2009-06-07 14:58:32 -04:00
Paul Beckingham
24f31eeb00 Enhancements - Cmd object
- New Cmd object to handle localized commands, customReports and general
  command parsing.
- Localized new Subst methods.
- Relocate guess method from parse.cpp to text.cpp.
- Converted Att object to use new valid/parse scheme.
- Unit tests for Cmd object.
- Fixed att.t.cpp unit tests.
2009-06-07 14:00:14 -04:00
Paul Beckingham
ffa0c6e758 I18N L10N - Subst
- Localized strings in Subst.
2009-06-07 00:46:58 -04:00
Paul Beckingham
049767484f Enhancement - Integrated Subst
- Subst is now part of Context.
2009-06-07 00:39:50 -04:00
Paul Beckingham
a2a9fa7f35 Enhancement - Subst parsing
- Corrected Subst parsing.
- Added more unit tests.
2009-06-07 00:28:21 -04:00
Paul Beckingham
9b78631e6f Enhancement - Sequence integration
- Sequence object fully integrated.
2009-06-06 23:55:36 -04:00
Paul Beckingham
7965bd5b4f I18N - color.cpp
- Localized color.cpp, fingers ache.
- Made a couple of parse.cpp functions non-static.
2009-06-06 23:31:04 -04:00
Paul Beckingham
db52cf7327 I18N - Record
- Localized Record object.
- Remove copy ctor, operator= from Duration - unnecessary.
2009-06-06 22:06:02 -04:00
Paul Beckingham
36d4ecab43 Code Cleanup
- Broke out all the interactive stuff into it's own source file.
2009-06-06 19:50:22 -04:00
Paul Beckingham
bc13f0be48 Interactive - stub
- Added stub code for the interactive version of task.
2009-06-06 17:41:24 -04:00
Paul Beckingham
e9c45aab85 Documentation Update - man page
- Documented the rc.<name>:<value> configuration file override syntax.
2009-06-06 16:11:44 -04:00
Paul Beckingham
82f94a6999 Enhancement - rc.name:value
- Supports 'rc.name:value' for a command line override to .taskrc data
  (thanks to Federico Hernandez).
2009-06-06 16:09:11 -04:00
Paul Beckingham
37dd592110 I18N - Att, text
- Added localization messages.
- Changed wording in ChangeLog.
2009-06-06 15:30:58 -04:00
Paul Beckingham
f43e47a739 I18N L10N - Sequence
- Sequence object localized.
- StringTable changed to inherit from std::map.
- StringTable copy constructor, assignment operator removed.
- Various source files tagged for further l10n work.
2009-06-06 14:11:18 -04:00
Paul Beckingham
76aa3c535e Aesthetics - stats report
- Widened the gap between columns for readability.
2009-06-06 14:09:34 -04:00
Paul Beckingham
60f3da15a7 Bug Fix - configure.ac
- Fixed a syntax error I introduced into configure.ac moments ago, and
  obviously didn't test it.
2009-06-06 12:48:27 -04:00
Paul Beckingham
292ef5248c Documentation Update
- Changed all email addressed to support@taskwarrior.org.
- Changed task@beckingham.net to paul@beckingham.net.
2009-06-06 12:34:32 -04:00
Paul Beckingham
748e2ea00d Merge branch 'switch' into 1.8.0 2009-06-06 12:28:04 -04:00
Paul Beckingham
c2a386b913 Enhancements
- Context implementation snapshot
2009-06-06 12:13:13 -04:00
Paul Beckingham
0ec3b4b6af Enhancement - Attribute modifiers
- Implemented half the modifiers.  The easy half.
- Implemented unit tests that don't all pass yet, and are incomplete.
2009-06-05 01:49:53 -04:00
Paul Beckingham
2aa43fe4fe Documentation Update
- Removed references to old websites and online groups.
- Removed references to the github issue tracker.
- Added references to http://taskwarrior.org.
2009-06-05 01:01:17 -04:00
Paul Beckingham
32e99b3ed6 Documentation update
- Removed DEVELOPERS file.  Not only does it contain obsolete content,
  it doesn't really provide much help.  Hopefully developers will hit
  the online forums for this kind of help.
2009-06-05 00:35:40 -04:00
Paul Beckingham
a60d54be61 Enhancement - Filters
- Filter implemented.
- Unit tests started, need more as Att::match matures.
2009-06-05 00:15:00 -04:00
Paul Beckingham
531cffdc7f I18N - L10N
- Localized first strings in Context.
2009-06-04 23:13:17 -04:00
Paul Beckingham
da88dfe15a Build Fix
- Removed the now-obsolete Mod from the Makefiles.
2009-06-04 22:20:26 -04:00
Paul Beckingham
54f155f439 Enhancements - Context integration
- Context now gathers messages and footnotes.
- task now calls into the new 1.8.0 code (via Context), then calls
  into the old 1.7.0 code.  Two for the price of one.
2009-06-04 22:14:03 -04:00
Paul Beckingham
f85fc2d8c9 Documentation Removal
- Removed all online docs, which are no longer needed in the repository.
2009-06-04 21:02:08 -04:00
Federico Hernandez
024986fe88 Added include statement for compilation on linux 2009-06-04 08:44:57 +02:00
Paul Beckingham
b887f7267b Unit Tests - Record, T2
- Added Record::get, ::set, ::get_int tests.
- Added T2 tests.
- Fixed Record::composeF4 bug
2009-06-04 00:37:23 -04:00
Paul Beckingham
25450b4a7c Enhancement - T2 implementation
- Improved Att/Mod implementation.
- Implemented more T2 methods.
2009-06-03 22:58:24 -04:00
Paul Beckingham
f295fdf78f Unit Tests - Att
- Merged all old Mod tests into Att.
- Fixed broken tests.
2009-06-03 21:20:09 -04:00
Paul Beckingham
55771cc999 Code Cleanup
- Mod object is no longer necessary, and is removed.
2009-06-03 21:10:12 -04:00
Paul Beckingham
ac871d9e8d Enhancement - new age_compact column
- Added support for a new custom report column called "age_compact",
  which is a more compact version of "age" (thanks to T. Charles Yun).
2009-06-03 02:19:25 -04:00
Paul Beckingham
66bd5fc3c0 Code Cleanup
- Integrated Context.config.
- Eliminated Config& as a function argument.
- Added extern references to Context where needed.
2009-06-03 02:03:49 -04:00
Paul Beckingham
98978c7c00 Code Cleanup
- Consolidated two forms of guess ().
2009-06-03 01:22:02 -04:00
Paul Beckingham
4ede817ead Code Cleanup - removed formatTimeDeltaDays
- Removed util.cpp/formatTimeDeltaDays, as it was a replica of
  util.cpp/formatSeconds with a different signature.  Worthless.
2009-06-03 00:58:49 -04:00
Paul Beckingham
9eb68881af Unit Tests - Att
- Added modifier parsing unit tests.
2009-06-02 22:32:22 -04:00
Paul Beckingham
948380ce96 Enhancement - Context
- Context is now a global variable, otherwise it will end up being
  passed to every function, which is essentially the same as global,
  and will create a horrible coupling problem.
2009-06-02 22:26:02 -04:00
Paul Beckingham
2faa256a55 Enhancements - i18n
- Added attribute modifiers.
- Tagged all Mod strings for processing.
2009-06-01 21:38:59 -04:00
Federico Hernandez
0dab0384ea Halfway through task-tutorial(5) 2009-06-01 23:08:26 +02:00
Federico Hernandez
ddfbfea715 Include statements to compile on Linux 2009-06-01 21:20:56 +02:00
Paul Beckingham
a98951a8c3 Enhancements - Complete Record parsing
- Enhanced Record unit tests
- Fixed broken Att unit tests
- Fixed broken Att
2009-06-01 01:25:07 -04:00
Paul Beckingham
75c220c352 Enhancements - i18n & Subst
- Created initial, empty strings files.
- Converted Subst to use Nibbler.
2009-06-01 00:15:08 -04:00
Paul Beckingham
7248267a72 Enhancements - T2 & Subst
- Implemented more helper functions in T2, prior to integration.
- Completed Subst.
- Completed Subst unit tests.
- Eliminated T::getAnnotationCount.
2009-05-31 23:43:11 -04:00
Paul Beckingham
ccff27b535 Merge branch 'master' of git@github.com:pbeckingham/task into 1.8.0 2009-05-31 20:01:57 -04:00
Paul Beckingham
3274f1f0a6 I18N - Sample strings files, header
- Began proposed format for strings file.
- Began corresponding header file for string IDs.
2009-05-31 19:45:25 -04:00
Paul Beckingham
4ed6dc3cce Enhancements - Prep for T2 integration
- Added all T methods as reference to begin T2 integration.  No
  change in functionality.
2009-05-31 11:56:34 -04:00
Paul Beckingham
97145fbb07 Enhancement - Object integration
- Began the big integration festival by moving all objects out of
  the sandbox.
- Hooked up one error message to context.stringtable, just to make
  a point.
2009-05-31 01:49:24 -04:00
Paul Beckingham
fe4c8f3a9d Enhancement - Object rename prior to integration
- T -> T2
- TDB -> TDB2
2009-05-31 01:10:39 -04:00
Paul Beckingham
766c2d3620 Unit Tests - Complete Att unit tests
- Covers parsing, composition.
2009-05-31 00:10:35 -04:00
Paul Beckingham
ed685a55ce Patch - Fixed wrong reference to task-tutorial
From 0e39a1b71874d8ac6e34e94f5b7932d41bc49b5c Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Sat, 30 May 2009 23:25:47 +0200
Subject: [PATCH] Fixed wrong reference to task-tutorial
2009-05-30 18:33:48 -04:00
Paul Beckingham
a57552f8bc Patch - Corrected missing line break
From 88311e6941804f5c697967ce82e6935d07941d02 Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Sat, 30 May 2009 23:00:32 +0200
Subject: [PATCH] iCorrected missing line break.
2009-05-30 17:17:54 -04:00
Paul Beckingham
2ac2aafbe7 Patch - Pushed man pages to version 1.8.0
From eb1beb066956f95521298fc699359a20b9aa4ed9 Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Sat, 30 May 2009 22:47:45 +0200
Subject: [PATCH 2/2] Pushed man pages to version 1.8.0

Changed references for documentation to taskwarrior.org

Added stub for new man page task-tutorial.5
2009-05-30 17:14:00 -04:00
Paul Beckingham
963574e298 Patch - Added license information (GPLv2+) to shell completion scripts
From 1d182d7260776edb7543cb49ccf7c59fbb95d81e Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Sat, 30 May 2009 20:51:24 +0200
Subject: [PATCH 1/2] Added license information (GPLv2+) to shell completion scripts.
2009-05-30 17:07:52 -04:00
Paul Beckingham
cebacc7273 Unit Tests - Nibbler
- Complete rewrite of all Nibbler tests, this time including all
  boundary conditions.
2009-05-30 17:04:20 -04:00
Paul Beckingham
dde044c3d7 Enhancements - Nibbler upgrades.
- Enhancements to ensure that EOS conditions don't break calls.
2009-05-30 14:23:22 -04:00
Paul Beckingham
87ed7dad6c Enhancements - config variables
- Added 'locale' and 'displayweeknumber' as valid configuration variables.
2009-05-30 14:21:21 -04:00
Paul Beckingham
5263147c83 Enhancements - Nibbler + parsing
- New Nibbler object greatly assists in FF4 parsing.
- Unit tests for Nibbler.
- Record now parses itself.
- Att now parses itself.
2009-05-29 01:47:39 -04:00
Paul Beckingham
7c0aee4a5f Enhancement - Record object
- Added Record::Record (const std::string&)
- Added basic unit test for Record, which currently throws.
2009-05-28 21:31:48 -04:00
Paul Beckingham
4fda101f28 Unit tests - subst
- Implemented basic subst tests, awaiting Record/T integration before
  this can be expanded.
2009-05-28 18:23:21 -04:00
Paul Beckingham
54789082c9 Enhancement - StringTable integration
- StringTable now integrated into Context.
- Docs updated for new "locale" configuration variable.
- StringTable unit tests implemented.
2009-05-28 17:59:55 -04:00
Paul Beckingham
8627a924f7 Merge branch 'master' into 1.8.0 2009-05-28 11:49:00 -04:00
Paul Beckingham
64a891e8b1 Documentation Update - ran a spellchecker
- Caught a couple of typos in the man pages.
2009-05-28 11:47:44 -04:00
Paul Beckingham
a7424f90b3 Documentation Update - ready for OS X package
- The README.txt was out of date.
2009-05-28 11:40:03 -04:00
Paul Beckingham
dc52e096ba Merge branch 'master' into 1.8.0
Conflicts:
	html/task.html
2009-05-28 11:36:21 -04:00
Paul Beckingham
7aace1b3db Patch - Support tag exclusion filtering
- Now supports "-tag" in filters to filter out tasks that do not
  have the specified tag (thanks to Chris Pride).
- Added unit tests to prevent regression.
- Updated the filter docs to include examples.
2009-05-28 11:30:30 -04:00
Paul Beckingham
73ecb0480f Patch - "Bug" discovered while creating Ubuntu deb package using lintian tool.
From 6b0bd9f9be642a8f08ea27c937a1c1eb2253565e Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Thu, 28 May 2009 08:58:28 +0200
Subject: [PATCH] Fixing line breaks.

"Bug" discovered while creating Ubuntu deb package using lintian tool.
2009-05-28 09:21:01 -04:00
Paul Beckingham
0fcaf85652 Bug Fix - blank annotations now disallowed
- Prevented blank annotations from being added, and the description
  being echoed as though it were the annotation applied (thanks to
  Bruce Dillahunty).
- Added bug.annotate.t unit test to prevent regression.
2009-05-27 01:01:25 -04:00
Paul Beckingham
8dd9690a65 Enhancement - Subst and Keymap
- Implemented Subst object and mored it into place ready for integration.
- Moved skeleton Keymap into place.  Not implemented yet.
2009-05-27 00:35:13 -04:00
Paul Beckingham
2083dc4175 Enhancement - Subst object
- Implemented most of Subst object, except Subst::apply
2009-05-27 00:30:42 -04:00
Paul Beckingham
de08c1d32e Enhancement - Location object
- Moved Location object into place, ready for integration.
2009-05-27 00:00:54 -04:00
Paul Beckingham
2dc566a726 Enhancement - Record::composeF4
- Implemented Record::composeF4.
2009-05-26 23:17:49 -04:00
Paul Beckingham
4cbc67b30b Enhancement - Location object
- Implemented Location object to link a path with the data files
  found in that path.
- Integrated into TDB.
2009-05-26 22:32:18 -04:00
Paul Beckingham
7ff41a222a Enhancement - Removed obsolete file format 1
- Removed support for (but not recognition of) file format 1, which
  was never released.
2009-05-26 20:51:09 -04:00
Paul Beckingham
3b4390a446 Documentation Update - slackware version
- Corrected Slackware version.
2009-05-25 20:06:55 -04:00
Paul Beckingham
09c88baeaf Patch - Added include file for stdlib
From 5fd187d590abd87f65a773d7294daa8eed582f97 Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Mon, 25 May 2009 21:27:56 +0200
Subject: [PATCH] Added include file for stdlib
2009-05-25 15:41:53 -04:00
Paul Beckingham
5ff44e2f33 Patch - Display week number in calendar report
From 9eec77085dd07940c02d9071bf2a374c9a9b54c8 Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Mon, 25 May 2009 09:28:38 +0200
Subject: [PATCH 2/3] Display dummy week of year number

From e2fc5d537863672c53ede96607508270f02aabaf Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Mon, 25 May 2009 13:43:14 +0200
Subject: [PATCH 3/3] Display weeknumbers in 'task cal' output
2009-05-25 10:56:24 -04:00
Paul Beckingham
6af093126e Platform Testing - clean builds
- Added include files (thanks to Federico Hernandez)
2009-05-25 09:32:32 -04:00
Paul Beckingham
4532727a32 Unit Tests - args.t
- Implemented unit tests verifying '--' functionality.
2009-05-24 22:48:55 -04:00
Paul Beckingham
c223d38872 Enhancement - Supports '--' on the command line
- Using '--' on the command line separates the left hand side, where
  task is free to interpret arguments in the usual way, and the right
  hand side, which is then assumed to be part of the task description,
  and is not interpreted by task.
2009-05-24 22:32:36 -04:00
Paul Beckingham
020604334e Patch - Configurable week start day.
- Added ChangeLog entry.
- Modified timesheet report error message on incorrect weekstart
  value to match that of calendar.
2009-05-24 20:28:07 -04:00
Paul Beckingham
d09630a3a0 Patch - Configurable week start day.
From 78fef7b934f6bcac7662c1646e2dd1f8ce4f3eca Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Mon, 25 May 2009 01:14:06 +0200
Subject: [PATCH] Configurable weekstart for task cal display
2009-05-24 20:14:49 -04:00
Paul Beckingham
41a6cdea22 Enhancement - Mod/Att interaction
- New unit tests for Mod object.
- Added new constructors to Mod object for ease of use.
- Added Mod handling in Att object.
- Added more Att unit tests.
2009-05-24 14:45:50 -04:00
Paul Beckingham
c860d58641 Enhancement - Att object
- Improved new Att object.
- Added new constructor to accommodate integer attribute values.
- Implemented unit tests.
2009-05-24 12:25:20 -04:00
Paul Beckingham
6600f9bac4 Code Cleanup - reorg
- Renamed 'objects' to 'sandbox', for clarity.
2009-05-23 23:41:00 -04:00
Paul Beckingham
2aa2a4e257 Enhancement - Filter object
- Almost implemented the Filter object.
2009-05-23 23:39:33 -04:00
Paul Beckingham
b7866b7434 Enhancement - FF4 Parsing
- Implemented TDB::load
- Changed Record to inherit from std::map <std::string, Att>
- Changed Filter to inherit from std::vector <Att>
2009-05-23 23:29:47 -04:00
Paul Beckingham
2e5e20e3e5 Enhancement - Record accessors
- Implemented a variety of get/set routines for Record.
2009-05-23 18:51:37 -04:00
Paul Beckingham
0eff6fa2b1 Code Cleanup - obsolete code
- Removed obsolete T::removeAttributes.
- Removed obsolete T::sequenceContains.
- Modified handleInfo so it no longer uses T::sequenceContains, and
  instead uses filterSequence.
2009-05-23 18:30:51 -04:00
Paul Beckingham
8fa38fc4c3 Enhancement - Sequence range limiting
- Prevents overly large ranges.  A bug was reported from a user
  who tried this:

    % task annotate 1 1-987654321

  The 1-987654321 was assumed to be a valid range, and caused task
  to consume all available memory.  The workaround was:

    % task 1 annotate 1-987654321

  But it seems a good idea to range-limit sequences.  Currently
  it is 1000.  Perhaps this should be configurable.
2009-05-23 17:59:45 -04:00
Paul Beckingham
f3724aa714 Enhancement - Sequence object
- Implemented sequence object to encapsulate the worries of parsing
  sequences.
- Implemented unit tests.
2009-05-23 16:10:42 -04:00
Paul Beckingham
3cdfb733de Enhancement - Sequence implemented
- Implemented a sequence object to handle ID sequences.
2009-05-23 12:26:34 -04:00
Paul Beckingham
fbea29e27c Documentation Update - FAQ
- Updated the FAQ with links to the donwload page, rather than mention
  the versions page, which no longer has links to packages.
2009-05-23 12:10:28 -04:00
Paul Beckingham
17979e10f0 Enhancement - attributes and stringtable
- Modified Att to contain a vector of Mods, not std::strings, even
  though a Mod is a std::string.
- Added a StringTable object to Context, to start getting the I18N
  infrastructure in place before it is needed.  Only a few strings
  are expected to be migrated.
2009-05-23 10:32:07 -04:00
Paul Beckingham
627d0a7ae9 Documentation Update - downloads
- Cleaned up task.html regarding pre-built packages.
- Commented download.html.
2009-05-23 09:50:33 -04:00
Paul Beckingham
df3fc9b723 Merge branch 'ff4' into 1.8.0 2009-05-23 09:46:13 -04:00
Paul Beckingham
dd8b181081 FF4 - Renamed directory to 'objects'
- Better name for new object directory.
2009-05-23 09:42:52 -04:00
Paul Beckingham
a9d46a0714 FF4 - Moved new objects into place
- Moved Mod, Att, Record, StringTable into place, ready for unit tests.
2009-05-23 09:38:31 -04:00
Paul Beckingham
1ad23c7bdc FF4 - Mod object to handle attribute modifiers
- New Mod object responsible for evaluating a chain of attribute
  modifiers.
2009-05-23 09:30:52 -04:00
Paul Beckingham
78e9b00a63 Snapshot 2009-05-23 00:49:31 -04:00
Paul Beckingham
5ac3f0c47e FF4 - snapshot 2009-05-23 00:35:47 -04:00
Paul Beckingham
886f8e252e Patch - Added link download page in "Latest stable release" section
From 489260e8c83c2255a8b92e89ffbe8e8c26ef721b Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Fri, 22 May 2009 13:54:41 +0200
Subject: [PATCH] * Added link download page in "Latest stable release" section

* On download page: corrected names for distributions and packages
2009-05-22 21:16:33 -04:00
Paul Beckingham
419ab2ad51 Documentation Update - synch with web site
- This commit synchronizes the web site and the master branch.
  Edits have been made on the site but not in the master branch,
  which is wrong.
2009-05-22 20:15:01 -04:00
Paul Beckingham
eb5bd63459 FF4 - Snapshot 2009-05-22 20:12:21 -04:00
Paul Beckingham
cce755e5da Documentation Update - clarification
- Added note about the lack of a need to escape shell metacharacters
  when they are used in a custom report filter (thanks to Bruce
  Dillahunty).
- Corrected wrong header tag.
2009-05-20 20:46:45 -04:00
Paul Beckingham
b194f37f11 Documentation Update - online docs
- Added new download.html page to list current and prior binary
  packages only.
- Removed old binary packages.
- Reduced versions.html to a concatenation of ChangeLog entries.
2009-05-20 20:30:08 -04:00
Paul Beckingham
3156e1c085 Documentation Update - AUTHORS file
- Added Thomas@BIC to the AUTHORS file, for his contribution and
  bug report.
2009-05-19 23:28:16 -04:00
Paul Beckingham
8b17bdc037 Bug Fix - documentation
- Typo in documentation fixed (thanks to Thomas@BIC).
- Added zsh tab completion script to ChangeLog (thanks to P.C. Shyamshankar).
2009-05-19 22:04:58 -04:00
Paul Beckingham
b9448c3a2c Documentation Update - snapshot 2009-05-19 20:32:52 -04:00
Paul Beckingham
179f60ed8d Bug Fix - _forcecolor considered obsolete
- Fixed bug that considered the _forcecolor configuration variable
  to be obsolete.  Thanks to Bruce Dillahunty.
2009-05-19 19:31:26 -04:00
Paul Beckingham
e754fa6eac FF4 - Snapshot
- Sketched out Filter
- Implemented part of TDB
2009-05-19 01:38:05 -04:00
Paul Beckingham
f97dff0125 FF4 - Snapshot
- Implemented TDB::lock, TDB::unlock.
2009-05-18 22:26:51 -04:00
Paul Beckingham
81e96e0ec4 Code Cleanup - removed Makefile.in from git
- Makefile.in is a generated file, and there is no need to track it
  in git (thanks to Federico Hernandez).
2009-05-18 21:08:54 -04:00
Paul Beckingham
f37d39d4ce Merge branch 'fredde' into 1.8.0 2009-05-18 09:11:03 -04:00
Paul Beckingham
124dc75861 Patch - Simplified structure with dist and nobase usage
From 6f8080c6761a35811de5f3870b6ef7887b1a9414 Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Mon, 18 May 2009 13:23:09 +0200
Subject: [PATCH] Simplified structure with dist and nobase usage
2009-05-18 09:10:18 -04:00
Paul Beckingham
f933067a09 Merge branch 'fredde' into 1.8.0 2009-05-18 09:06:32 -04:00
Paul Beckingham
c754e35b5b Patch - Changed directory structure for scripts and their installation.
From b6ec4af427c5c5d37f16b80236ccea34e4d8de5a Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Mon, 18 May 2009 12:32:55 +0200
Subject: [PATCH] Changed directory structure for scripts and their installation.

$(docdir) now depends on ${VERSION} variable defined from configure.ac

Made EXTRA_DIST variable modular.
2009-05-18 09:05:21 -04:00
Paul Beckingham
3a9c98d342 FF4 - snapshot 2009-05-17 23:31:25 -04:00
Paul Beckingham
04f60a4d8c FF4 - header file reorg
- Added new util.h and text.h header files.
- Corresponding edits.
2009-05-17 23:29:53 -04:00
Paul Beckingham
5d275188e9 Portability - Added Slackware
- Added Slackware 12-12.2 as a supported platform (thanks to
  Mateusz Almannai).
2009-05-17 19:44:33 -04:00
Paul Beckingham
32d89560d5 Patch - completion scripts
From 950acdf2990269a6d054e9608a1fed1dddf020a0 Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Sun, 17 May 2009 22:34:28 +0200
Subject: [PATCH] Re-arranged shell completion scipts into more suitable directory structure.
2009-05-17 17:15:46 -04:00
Paul Beckingham
58e1f3691c FF4 - Snapshot
- Added encode/decode Att methods.  Necessary if description is to be an
  attribute, which will be quoted.
2009-05-17 17:11:35 -04:00
Paul Beckingham
fdd43a9619 FF4 - Snapshot
- Added more Context responsibilities.
2009-05-16 22:22:56 -04:00
Paul Beckingham
2e39929d71 FF4 - util.cpp:convertDuration -> Duration
- Replaced util.cpp convertDuration function with Duration object.
2009-05-16 22:14:32 -04:00
Paul Beckingham
5ba1fd6aeb FF4 - New Duration object
- Replaces convertDuration.
2009-05-16 21:56:54 -04:00
Paul Beckingham
fa76326aba FF4 - Duration object complete
- Replaces util.cpp:convertDuration
2009-05-16 21:50:04 -04:00
Paul Beckingham
7a03d819a0 FF4 - Snapshot
- Objects ready for implementation.
- Removed template X.h X.cpp.
2009-05-16 17:50:30 -04:00
Paul Beckingham
69ed1e0ebb FF4 - Skeleton code for 2.0
- Created new objects for the 2.0.0 code base, needed in 1.8.0.
- Sketched out basic interfaces.
2009-05-16 17:38:54 -04:00
Paul Beckingham
833fac3c13 FF4 - Skeleton objects
Created skeleton objects for all new 1.8.0 code.
2009-05-16 15:45:31 -04:00
Paul Beckingham
6bef54cdae Merge branch '1.8.0' of git@github.com:pbeckingham/task into 1.8.0 2009-05-15 21:04:09 -04:00
Paul Beckingham
dbc98c1230 Patch
From a08f3f919f2f4b06503004ca764339918ee5d000 Mon Sep 17 00:00:00 2001
From: Johan Friis <johanfriis@gmail.com>
Date: Fri, 15 May 2009 16:14:26 +0100
Subject: [PATCH] fontunderline boolean config option

Added an option to turn on/off the drawing of table headers with
underlined font. If off, the default asciidashes will be used.
It defaults to on.
2009-05-15 21:02:06 -04:00
P.C. Shyamshankar
59bd54fd37 Moved completion file to its own zsh subdirectory.
Signed-off-by: Paul Beckingham <paul@beckingham.net>
2009-05-16 07:14:10 +08:00
P.C. Shyamshankar
9d2b2de494 Updated completion for 1.7.0, dynamically getting subcommands from task.
Signed-off-by: Paul Beckingham <paul@beckingham.net>
2009-05-16 07:13:59 +08:00
P.C. Shyamshankar
f974e33fa4 Initial commit of zsh completion, completes only subcommands right now.
Signed-off-by: Paul Beckingham <paul@beckingham.net>
2009-05-16 07:13:38 +08:00
Paul Beckingham
a120b4bd89 Documentation Update - corrected mistakes
- Wrong year
- Failed to mention taskrc man page
2009-05-15 18:45:23 -04:00
Paul Beckingham
13aeff1389 New Version - 1.8.0 begins... 2009-05-14 23:22:31 -04:00
Paul Beckingham
f6b8b39d8b Task 1.7.0 2009-05-14 22:38:16 -04:00
Paul Beckingham
11ee827a0d Platform Testing - clean builds
- on Ubuntu 9.04
- on Fedora Core 10
- on Crunchbang Linux
- on Windows XP/Cygwin
2009-05-14 22:20:09 -04:00
Federico Hernandez
89bbce8661 Documentation Update - install newly added taskrc.5 man page 2009-05-14 20:58:58 -04:00
Federico Hernandez
e1a7f61fb1 Added new man page doc/man5/taskrc.5
Added reference for taskrc(5) into task(1) man page

Fixed typo/missing word in html documentation
2009-05-14 20:57:53 -04:00
Federico Hernandez
f310924675 Added 2 include files to compile under Linux 2009-05-14 20:55:12 -04:00
Paul Beckingham
2fd7f6d681 Documentation Update - Referenced edit command
- Added new edit command references to docs.
- Added "#editor=vi" default .taskrc entry.
2009-05-14 00:54:02 -04:00
Paul Beckingham
612b872ed4 Silver Bullet - Complete
- Entry works
- Start works
- End works
2009-05-14 00:46:52 -04:00
Paul Beckingham
f97955ded8 Silver Bullet - Snapshot
- until working
- due working
- Also allows editing of recurring parent tasks
2009-05-14 00:29:08 -04:00
Paul Beckingham
38907ac6d7 Silver Bullet - Snapshot
- Annotations working
- recur working
- parent working
- fg working
- bg working
2009-05-14 00:10:54 -04:00
Paul Beckingham
1da111ad6e Enhancement - info missing color
- Fixed bug whereby the info report was not reporting fg and bg
  color attributes.
2009-05-13 23:59:22 -04:00
Paul Beckingham
c7d0b1c21b Silver Bullet - snapshot
- Project working
- Priority working
- Tags working
- Description working
2009-05-13 23:36:04 -04:00
Paul Beckingham
0c775f7998 Silver Bullet - code complete
- Now it's debug time.
2009-05-13 20:39:56 -04:00
Paul Beckingham
c872e30ef5 Silver Bullet - more fields
- Added more fields, none of which work right now.
2009-05-13 18:24:12 -04:00
Paul Beckingham
2c826b6213 Silver Bullet - snapshot
- Project and priority are properly and completely handled.
2009-05-13 15:52:09 -04:00
Paul Beckingham
9d8777ec7d Silver Bullet - file formatting
- 'before' file formatting completed.  Now the hard part.
2009-05-13 15:03:06 -04:00
Paul Beckingham
ee06280808 Code Reorganization - Silver Bullet
- Broke out Silver Bullet feature into separate edit.cpp file.
  Because it is big.
2009-05-13 12:35:54 -04:00
Paul Beckingham
da8c3c1a16 Documentation Update
- Corrected discussion of the edit command.
2009-05-13 12:14:41 -04:00
Paul Beckingham
4346f83f6e Merge branch 'silver-bullet' into 1.7.0
Conflicts:
	src/command.cpp
2009-05-13 11:55:21 -04:00
Paul Beckingham
8b045156d0 Documentation update - man page patch
From 11b748fcecd0ea0bfa04157b59abb1977c1aae5c Mon Sep 17 00:00:00 2001
From: Federico Hernandez <ultrafredde@gmail.com>
Date: Wed, 13 May 2009 16:52:54 +0200
Subject: [PATCH] Punctuation error in Frequencies section

---
 doc/man1/task.1 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/man1/task.1 b/doc/man1/task.1
index da8270a..8a1a671 100644
--- a/doc/man1/task.1
+++ b/doc/man1/task.1
@@ -257,7 +257,7 @@ task ... due:fri
 .RE

 .SS FREQUENCIES
-Recurrence periods Task supports several ways of specifying the
+Recurrence periods. Task supports several ways of specifying the
 .I frequency
 of recurring tasks.

--
1.6.3.1
2009-05-13 11:52:10 -04:00
Paul Beckingham
c4e459e8d7 Silver Bullet - added more fields.
- Added (presumable) all other fields.  Now looking for a better
  format, and a nice way to parse it all back.
2009-05-13 11:39:07 -04:00
Paul Beckingham
77475136b9 Bug Fix - weekstart is not an obsolete
- The new 'weekstart' configuration variable was being tagged as
  obsolete by handleVersion.
2009-05-13 10:46:51 -04:00
Paul Beckingham
362b4a5bc9 Bug Fix - .taskrc/.task
- Fixed bug whereby task created the default ~/.task directory,
  even if an extant .taskrc:data.location specified otherwise
  (thanks to Federico Hernandez).
2009-05-13 00:43:00 -04:00
Paul Beckingham
ff14f0a28a Documentation Update - install docs
- Makefile.am now installs various docs to <prefix>/share/doc/task-1.7.0
  (thanks to Federico Hernandez).
2009-05-13 00:26:54 -04:00
Paul Beckingham
a6637db232 Documentation Update - man page installation
- The task.1 man page is properly installed in
  <prefix>/share/man/man1/task.1
2009-05-12 23:56:57 -04:00
Paul Beckingham
95f07cf363 Bug Fix - UUID corruption on Solaris 8
- Fixed a bug with an unterminated buffer in uuid() (thanks to
  Steven de Brouwer).
- Added Solaris 8 as another supported platform (thanks to Steven
  de Brouwer).
2009-05-12 23:19:26 -04:00
Paul Beckingham
f9035eec70 Bug Fix - C syntax error in parse.cpp
- Fixed bug where variable instantiation inside a case statement
  was not scoped, but somehow builds on Leopard, but fails on
  Fedora Core 10.  Thanks to Federico Hernandez.
2009-05-12 22:58:59 -04:00
Paul Beckingham
cc5d44ee9d Documentation Update - git usage doc
- Added a page that describes how to use git to contribute to task.
2009-05-12 22:28:42 -04:00
P.C. Shyamshankar
3f97bb0663 Added Federico's changes, other updates. Moved to section 1.
Signed-off-by: Paul Beckingham <paul@beckingham.net>
2009-05-13 05:51:12 +08:00
Paul Beckingham
e268b7f71c Enhancement - latest tab completion script
- Installed the latest script from Federico Hernandez.
- Renamed script to task_completion.sh, to avoid conflict with others.
2009-05-12 08:59:18 -04:00
Paul Beckingham
753305a262 Documentation Update - man page
- Added the man page to the distribution (thanks to P.C. Shyamshankar).
2009-05-12 01:05:25 -04:00
Paul Beckingham
cec42bb2c4 Enhancement - tab completion
- Added the new 1.7.0 commands.
2009-05-12 00:09:12 -04:00
Paul Beckingham
de7f70ad3e Documentation Update - tab completion
- Added a first cut at the tab completion web page.  It needs to
  be tightened up.
2009-05-11 23:55:49 -04:00
Paul Beckingham
046f511d66 Bug fix - task now builds on Arch Linux
- Applied patch to allow task to build on Arch Linux (thanks to
  Johan Friis).
2009-05-11 23:44:17 -04:00
Paul Beckingham
e2e5b4884c Enhancement - tab completion script
- Added a new tab completion script (thanks to Federico Hernandez).
2009-05-11 23:36:57 -04:00
Paul Beckingham
05243c9e7a Merge branch '1.7.0' of git@github.com:pbeckingham/task into 1.7.0 2009-05-11 23:10:04 -04:00
Paul Beckingham
fd823871f0 Enhancement - timesheet report
- Version 1 of the timesheet report.  Displays a specified number
  of weeks tasks, both started and completed.
2009-05-11 23:07:50 -04:00
P.C. Shyamshankar
4087a82402 Wrote initial manpage, dump of information from `task help`.
Signed-off-by: Paul Beckingham <paul@beckingham.net>
2009-05-12 10:33:58 +08:00
Paul Beckingham
e8da71498d Documentation Update
- Corrected precedence list on editors.
2009-05-11 21:22:06 -04:00
Paul Beckingham
4ab665b876 Enhancement - timesheet report
- First pass at a timesheet report.  Needs details and formatting
  improvements.
2009-05-11 00:01:42 -04:00
Paul Beckingham
6762af8ffd Enhancement - Edit command
- Added more fields to the edit command.
- Added a more useful slurp implementation.
- Updated advanced.html with directions on use.
2009-05-10 16:26:48 -04:00
Paul Beckingham
407ef39c54 Enhancement - edit command
- Mere beginnings of the edit command.  No functionality yet.
2009-05-10 01:54:43 -04:00
Paul Beckingham
de4194479a Bug Fix - ghistory ignoring deletions
- Fixed bug that prevented months with only deletions from being
  included in the report.
2009-05-10 01:03:53 -04:00
Paul Beckingham
08188fb811 Enhancement - stats report
- Reimplemented the stats report so that it uses the Table object,
  and therefore has the same aesthetics as the other reports.
2009-05-10 00:40:56 -04:00
Paul Beckingham
cd89e10cfb Unit Tests - sequence
- Implemented unit tests to verify that sequences work properly on
  all relevant commands.
2009-05-09 23:35:32 -04:00
Paul Beckingham
1c736a319d Enhancement - Custom report limit override
- If a custom report has a specified limit to the number of tasks
  it shows, then that limit may be  overridden by specifying a new
  quantity on the command line.
- Added unit tests to verify expected behavior.
- Updated documentation to reflect new functionality.
- Removed obsolete documentation references to an "oldest" and
  "newest" configuration variable.
2009-05-09 22:32:40 -04:00
Paul Beckingham
72f84b3c3e Bug Fix - "done" tasks missing end date
- Tasks marked "done" were not assigned an end date before being
  written to the file.  Fortunately this only affects beta testers
  who, by definition, like to live on the edge.
- Added better text in the NEWS file regarding the github issue
  tracker.
- Cleaned up text a little in the "help" report output.
2009-05-09 21:30:53 -04:00
Paul Beckingham
e8443889bb Documentation Update - subscribe form on site
- Added a simple subscribe button and form to the web site.  Several
  people have stated that subscribing to the group is confusing, and
  maybe this will help.
2009-05-09 16:09:31 -04:00
Paul Beckingham
e81fdd1975 Unit Tests - improved logic in nag.t
- Used the correct builtin Test::More method.
2009-05-09 14:03:54 -04:00
Paul Beckingham
f9c3103264 Merge branch 'timesheet' into 1.7.0 2009-05-08 21:26:43 -04:00
Paul Beckingham
143666aca0 Unit Tests - en passant + sequence
- Added unit tests to ensure that the "done" command handles both
  sequences and en passant modifications.
2009-05-08 01:20:20 -04:00
Paul Beckingham
f7fc455b62 Bug Fix - extra line in ghistory report
- Fixed bug that added an extra line between header and graph in the
  ghistory report.
2009-05-08 01:09:55 -04:00
Paul Beckingham
5814432366 Enhancement - TDB API cleanup
- Removed obsolete TDB::deleteT method.
- Removed obsolete TDB::completeT method.
- Updated documentation.
2009-05-08 00:37:24 -04:00
Paul Beckingham
90c721295a Documentation Update
- Added docs reflecting the en passant feature for "done" and "append".
2009-05-08 00:29:14 -04:00
Paul Beckingham
5cf33105a3 Enhancement - en passant "done"
- When marking task(s) as done, it is now possible to modify them
  at the same time.
2009-05-08 00:25:30 -04:00
Paul Beckingham
b23bad9a5b Enhancement - duplicate command
- Added duplicate command that duplicates a task, and en passant
  applies and specified changes (thanks to David J Patrick).
2009-05-07 23:08:53 -04:00
Paul Beckingham
c61a295df7 Merge branch '1.7.0' into timesheet 2009-05-07 00:44:12 -04:00
Paul Beckingham
aec64afc5c Enhancements, Bug Fix
- Removed obsolete usage.html page.
- Added filterSequence helper function to subset tasks to the affected
  sequence of tasks.
- Added series of helper functions to facilitate applying modifications
  to tasks, allowing more commands the ability to modify tasks in all
  ways.
- Added calls to helper functions for append and modify commands.
- Fixed bug that would mistakenly validate the configuration variable
  "bcd" if there was a valid "abcd", "bcde" or "abcde" configuration
  variable.
- Made the messages generated by task after a command is complete
  more verbose and consistent across all commands.
- Fixed bug that caused the ghistory command to skip months where no
  tasks were added, but were deleted or done.  This is the same bug
  that was fixed in 1.6.0 for the history report.  So much for cut
  and paste.
- Allowed all commands that take an ID to now operate on a sequence.
2009-05-07 00:33:17 -04:00
Paul Beckingham
72ff15ea7a Enhancements
- Fixed word wrapping problem on "help" page.
- Writes errors to std::cout because std::cerr confuses tests.
  Presumably no users will care.  I don't.
- Added listDiff template function.
2009-05-07 00:30:20 -04:00
Paul Beckingham
fea19e036a Unit Tests - confirmation, delete, subst, undo
- Modified unit tests to accommodate changes in the verbose output
  of task.
- Added tests to verify /delete-me// substitutions.
- Fixed typos in test descriptions.
2009-05-07 00:26:49 -04:00
Paul Beckingham
98391a0c24 Enhancement - Command Line Parsing
- Fixed problem where a blank ID was considered valid.  For example,
  the command "task 1 -2" should use -2 as the description, but instead
  considered this to be the sequence 1,0,2.
- Replaced old validId calls with the new validSequence calls.
- A sequence has been redefined to be the first set of consecutive
  arguments that look like sequences.  Once broken by a non-sequence
  argument, all remaining args, even if they look like a sequence,
  are not considered part of the sequence.  This allows commands like
  "task append 1,3-5 Write 10 emails", where 10 is not part of the
  sequence because of the intervening "Write".
- Unit tests (parse.t.cpp) that exercise the parsing of sequences.
  Should probably be expanded to cover more.
2009-05-07 00:24:30 -04:00
Paul Beckingham
2975b9244a Enhancement - ID and sequences
- The first ID added as a sequence is accessible through the original
  T::getId and T::setId interface.
- An ID added via T::getId is accessible as the first ID in a sequence.
- Allows some commands to operate exclusively with sequences, and others
  with a single ID.
2009-05-07 00:13:31 -04:00
Paul Beckingham
c78be053cb Documentation Update - release checklist
- Create a release checklist document detailing release process.
2009-05-07 00:11:43 -04:00
Paul Beckingham
708995093b Documentation Update
- Removed unnecessary usage.html links from other pages.
- Added new sequence.html page to describe how to use ID sequences.
2009-05-06 23:58:21 -04:00
Paul Beckingham
7fea1f6a63 Merge branch 'sequences' into 1.7.0 2009-05-05 02:16:24 -04:00
Paul Beckingham
b67b27f5cd Enhancement - delete sequences
- Implemented sequences for delete command
- Renamed T::inSequence to T::sequenceContains, which makes the code
  read more naturally.
2009-05-05 02:14:43 -04:00
Paul Beckingham
07819a1885 Documentation Update - defaultwidth
- Defaultwidth is now included in the default .taskrc file.
2009-05-05 02:03:25 -04:00
Paul Beckingham
e03e1ec7b0 Bug Fix - missing defaultwidth in generated .taskrc
- The defaultwidth variable is now written to the default .taskrc
  file, but is commented out to allow ncurses to do it's thing.
2009-05-05 02:00:20 -04:00
Paul Beckingham
fb674a5626 Enhancement - parse sequence like 1,3,5-10 for IDs
- Now parses sequences as well as IDs.
- Sequences implemented for the info report.
2009-05-05 01:59:07 -04:00
Paul Beckingham
410a63fe14 Enhancement - info on recurring tasks
- Added recurrence information (parent, mask, imask, recur, until)
  to the info report when the task is either a recurring task or a
  synthetic task.
2009-05-05 01:03:07 -04:00
Paul Beckingham
2cc625f631 Documentation Update - Mentioned mailing list
- Added mention of the mailing list as a better alternative than
  sending email to PB.
2009-05-04 23:27:22 -04:00
Paul Beckingham
51a78ab996 Documentation Update - Mention new mailing list
- Added mention of new mailing list, as a place to discuss task
  features.
2009-05-04 23:22:34 -04:00
Paul Beckingham
d7f9b2165c Documentation Update - Correction
- Fixed sample commands, which were missing the "add" keyword (thanks
  to T. Charles Yun).
2009-05-04 22:31:14 -04:00
Paul Beckingham
d135dc2337 Enhancement - id sequences
- Recognizes id sequences on the command line.  Doesn't do anything
  with them yet.
2009-05-04 22:24:43 -04:00
Paul Beckingham
57a11a74e1 New Report - timesheet
- Added new timesheet report framework
- Began adding logic pseudo-code
- Added some documentation
2009-05-03 11:32:04 -04:00
Paul Beckingham
f73281ee30 Documentation Update
- Left an extraneous link behind.
2009-05-03 01:26:46 -04:00
Paul Beckingham
262e42d42b Documentation Update
- Merged the (now obsolete) troubleshooting page into the FAQ page.
2009-05-03 01:06:38 -04:00
Paul Beckingham
99174d66b6 Documentation Update
- Added David J Patrick as contributing author for the massive list
  of feature ideas he has provided, and the accompanying dialogue.
- Added mention of the Github issue tracker.
2009-05-03 00:27:11 -04:00
Paul Beckingham
a0838474c4 Diagnostics - Better parsing errors
- Improved the errors when parsing a corrupt or unrecognized pending.data
  or completed.data file.
2009-05-03 00:18:23 -04:00
Paul Beckingham
3235ac592f Documentation Update
- Added names to AUTHORS
- Added Ubuntu 9.04 ncurses tip to faq
2009-04-28 23:55:23 -04:00
Paul Beckingham
dcedbb3076 Unit Tests - bug.annual.t
- Fixed test count.  It was reporting more tests that it actually
  ran.
2009-04-26 18:35:12 -04:00
Paul Beckingham
e84c5c4a3c Merge branch 'master' into 1.7.0
Conflicts:
	ChangeLog
	NEWS
	configure.ac
2009-04-24 01:10:06 -04:00
Paul Beckingham
c4ec5989fe Documentation Update - wrong download file name
- Corrected the source file name.
2009-04-24 00:31:40 -04:00
Paul Beckingham
a737b0e0c8 Merge branch '1.6.1'
Conflicts:
	html/task.html
2009-04-24 00:24:54 -04:00
Paul Beckingham
f2b7780d6b Documentation Update
- Added 1.6.1 details.
2009-04-24 00:20:42 -04:00
Paul Beckingham
1b6faf57c9 Unit Tests - correction to T::compose tests
- Uses " instead of ' to quote annotations.
2009-04-24 00:09:59 -04:00
Paul Beckingham
76c66b8ab1 Documentation Update
- Added Ubuntu 9.04 (Jaunty Jackalope) to the docs.
2009-04-23 23:59:59 -04:00
Paul Beckingham
fe84ddcc98 Bug Fix - missing report labels in default .taskrc
- Added report labels to the .taskrc file that is created by default,
  when no .taskrc is found.  Thanks to P. C. Shyamshankar.
2009-04-23 23:54:21 -04:00
Paul Beckingham
0d832a6848 Documentation Update
- task.html was missing the release date.
2009-04-22 19:51:54 -04:00
Paul Beckingham
a77d4662f8 New Version - 1.6.1 2009-04-22 19:50:06 -04:00
Paul Beckingham
60915cefd4 Documentation Update
- Added 1.6.0 rpm download link.
2009-04-22 19:39:56 -04:00
Paul Beckingham
f896d3f160 Merge branch 'master' into 1.7.0
Conflicts:
	ChangeLog
2009-04-13 21:23:18 -04:00
Paul Beckingham
e23243e195 Bug Fix - missing ///g from usage
- Added text describing the ///g substitution feature.
- Updated ChangeLog.
2009-04-13 20:44:35 -04:00
Paul Beckingham
5b14fb63d8 Documentation Update
- Added a new 1.7.0 section to ChangeLog.
2009-04-13 20:39:41 -04:00
Paul Beckingham
081f8f5b3c Merge branch 'master' into 1.7.0 2009-04-12 23:45:45 -04:00
Paul Beckingham
06062a96eb Documentation Update - version 2009-04-12 23:41:05 -04:00
Paul Beckingham
2f18c512e0 Began 1.7.0 work 2009-04-12 23:39:47 -04:00
Paul Beckingham
7431f0cdd3 Bug Fix - use " not ' for annotation quoting
- Annotations were using ' to quote text, sanitizing ' -> " inside
  the text.  It would be better to quote with " and sanitize " -> '
  because ' is more common in the text (e.g. "Doesn't work") than ".
2009-04-12 22:53:20 -04:00
Paul Beckingham
22f0b1d9fb Documentation Update
- Added the global modifier of the substitution command to the
  command line grammar file.
2009-04-12 22:35:26 -04:00
Paul Beckingham
b8187e24ae Enhancement - file import
- Added support for configuration variables that override field
  mapping.
- Updated documentation.
2009-04-12 20:29:37 -04:00
Paul Beckingham
120593887b Code Cleanup - unit test warning
- Cleaned up Perl warning in unit test.
2009-04-12 02:17:12 -04:00
Paul Beckingham
01e5e773eb Enhancement - stats report
- Rearranged sequence of stats report to make more sense, with
  counts first and statistics (derived data) last.
2009-04-12 02:10:05 -04:00
Paul Beckingham
e0fd39db7b Enhancement - substitutions /from/to/g
- Added support for the "g" modifier to the substitution command,
  that replace every occurrence of "from" with "to", in the task
  description and any annotations.
2009-04-12 02:01:08 -04:00
Paul Beckingham
a39261f82d Unit tests - substitution
- Added unit tests to ensure that substitution works on the task
  description and annotations.
2009-04-12 01:03:52 -04:00
Paul Beckingham
a6b45af0a2 Enhancement - annotation substitution
- Annotations are now modifiable using the /from/to/ modification
  command.
2009-04-12 00:56:58 -04:00
Paul Beckingham
daea320564 Bug Fix - annual recurrence due-date creep
- Fixed bug where annual recurring tasks exhibit due-date creep
  (thanks to T. Charles Yun).
2009-04-12 00:05:21 -04:00
Paul Beckingham
1cbec205f1 Bug Fix - concatenation of colons in description
- When a task description contained a colon, the two words preceding
  the colon were concatenated.  For example, "aa bb:cc dd" gets
  concatenated to "aabb:cc dd".
- Added unit to test to prevent regression.
- Updated documentation.
2009-04-11 23:02:48 -04:00
Paul Beckingham
579232b7ea Documentation Update
- Cygwin doesn't support all color combinations, which include bold,
  underline and bright background colors.  Added a troubleshooting
  item that describes this problem, and suggests running "task colors"
  to determine just which colors are supported.
2009-04-11 22:39:37 -04:00
Paul Beckingham
cee8fda236 Documentation Update
- added Federico Hernandez to the AUTHORS file for his contribution of
  Red Hat RPM packages.
- Added RPM download links.
2009-04-11 22:18:12 -04:00
Paul Beckingham
4dda1f0c27 Documentation Update
- Added Ubuntu Jaunty Jackalope 9.04 (beta) to the list of supported
  platforms.
2009-04-05 12:26:11 -04:00
Paul Beckingham
0571412da0 Documentation Update
- Added Ubuntu 9.04 (Jaunty Jackalope) to the list of supported systems
  (thanks to Federico Hernandez).
2009-03-30 19:51:13 -04:00
Paul Beckingham
b4f031e4a7 New report columns
- Added support for tag_indicator column.
- Added support for recurrence_indicator column.
2009-03-30 00:29:28 -04:00
Paul Beckingham
5b1d64960d Documentation Update
- Added faq question/answer.
- Clarified file format upgrade via backup warning.
2009-03-29 23:50:00 -04:00
Paul Beckingham
a5fef2cc6b Autoconf
- Removed double check for ncurses, causing the library to be listed
  twice on the link line.
2009-03-29 22:17:14 -04:00
Paul Beckingham
8ab3c1cc3c Bug Fix
- Fixed bug whereby if no columns labels were specified, it was
  considered a column count mismatch.
- Fixed unit tests to use m/d/Y not M/D/Y dateformat.
2009-03-29 21:27:48 -04:00
Paul Beckingham
2700713c03 Merge branch 'import' into 1.6.0
Conflicts:
	ChangeLog
	html/task.html
2009-03-29 18:51:27 -04:00
Paul Beckingham
567bdd98a4 Code Cleanup
- Removed temporary file import samples
2009-03-29 17:43:21 -04:00
Paul Beckingham
25425614b1 File Import
- Implemented all remaining import functionality.
2009-03-29 17:42:11 -04:00
Paul Beckingham
3b65051e9e Unit Tests - labels
- Added unit tests to verify that custom report labels are properly used.
2009-03-29 15:41:09 -04:00
Paul Beckingham
5f4563af2f File Import
- Implemented import from task 1.4.3, 1.5.0, 1.6.0, plain text,
  todo.sh and task command line files.
- Implemented unit tests to cover the above.
2009-03-29 15:34:35 -04:00
Paul Beckingham
7e2bd166fa Code Cleanup
- Guaranteed the correct Config::get call via cast.  There is some
  doubt as to the correct call being made otherwise.  This is not a
  very likely fix, but does eliminate one possibility.
2009-03-29 11:08:32 -04:00
Paul Beckingham
41b60f88d3 Custom Report Labels
- Added the ability to override the labels of custom reports (thanks
  to T. Charles Yun).
2009-03-27 23:51:20 -04:00
Paul Beckingham
93ec320555 Updated FAQ 2009-03-27 22:32:40 -04:00
Paul Beckingham
c1291dc587 Updated Documentation
- Added description of import process.
2009-03-27 22:02:13 -04:00
Paul Beckingham
57deb83b25 Documentation Update
- Added a faq.html file, although it is not so much a set of frequently
  asked questions, but of repeatedly asked questions.  Questions from
  the mail bag, if they apply to a general audience might be shown
  here.
2009-03-27 21:25:34 -04:00
Paul Beckingham
e4f5d6579c File Import
- Updated documentation.
- Added another recognized format - task command line.
2009-03-26 00:52:51 -04:00
Paul Beckingham
99dc72f26f File Import
- Added format identifier code for task 1.4.3, task 1.5.0, todo.sh
  2.0 and CSV.
- Implemented import for type text.
- Implemented util.cpp:slurp function.
- Gathered sample input files for import testing, and later, unit
  tests.
2009-03-26 00:41:15 -04:00
Paul Beckingham
406e648d58 Code Cleanup
- The new 'echo.command' configuration variable was incorrectly
  flagged as obsolete by report.cpp:handleVersion.
2009-03-25 17:49:22 -04:00
Paul Beckingham
db7b2dd9fe File Import
- Implemented scaffolding for new import command.
2009-03-25 02:05:50 -04:00
Paul Beckingham
c31ec6b6a6 Unit Tests - all file formats
- Added unit tests to verify correct parsing of file formats 1, 2
  and 3.
2009-03-25 01:29:59 -04:00
Paul Beckingham
1a656f0f60 Recurring Tasks - upgrades and bug fixes
- Improved (fixed) logical consistency checks that prevent the
  addition of a recurrence frequency without a due date.
- Improved (fixed) logical consistency checks that prevent the
  addition of an until date with a recurrence frequency.
- When a recurring task is modified, all sibling instances, as well
  as the parent task now get modified.
- When a recurring task is appended, all sibling instances, as well
  as the parent task now get modified.
- Updated documentation.
- It is now possible to upgrade a regular task to a recurring task,
  which is triggered by the "recur" attribute.
2009-03-25 01:08:13 -04:00
Paul Beckingham
5ec0d569a9 Enhancement - annotations
- Added annotated description to the active, overdue and next reports.
2009-03-24 23:15:55 -04:00
Paul Beckingham
3979c3283e Enhancement - annotations
- Added support for "annotate" command to annotate existing tasks.
- Bumped file format to version 3, due to the annotations.
- Added unit tests to verify that annotations work.
- Changed 'description' column everywhere to include annotations.
- Added 'description_only' column to exclude the annotations.
- Fixed bug in Table.cpp that calculated the width of multi-line
  columns by using the cell length, instead of the length of the
  longest individual line.
- Updated documentation with new feature.
- Updated documentation with new column.
- Enhanced t.t unit tests to cover format 43
2009-03-24 01:57:12 -04:00
Paul Beckingham
ca795ea281 Bug Fix - confirmation was broken
- Fixed inverted condition that broke confirmation.
2009-03-23 21:55:02 -04:00
Paul Beckingham
d10e9be500 Bug fix - assumed "yes" value, instead of Bool
- Fixed bug where only a value of "yes" would enable confirmation,
  instead of any Boolean true value.
2009-03-22 23:50:42 -04:00
Paul Beckingham
f790df24c5 Enhancement - added echo of id, description
- Added an echo of the ID and description of the task for the start,
  stop, do, undo, delete and undelete commands.  Thanks to Bruce
  Dillahunty.
- Updated documentation.
- Added "echo.command=no" to delete.t, undo.t because the default
  value is "yes", which breaks tests.
- Fixed syntax errors in utf8.t
- Corrected expected number of tests in recur.t
2009-03-22 23:34:17 -04:00
Paul Beckingham
ca933d7f39 Unit Tests - duration
- Corrected unit tests that were mistakenly using 'week' instead of
  'weekly'.
2009-03-20 20:02:59 -04:00
Paul Beckingham
827bc6204b Unit Tests - autocomplete
- Implemented unit test to verify the functionality of the
  util.cpp:autoComplete function.
2009-03-20 20:01:44 -04:00
Paul Beckingham
4537d5048e Unit Tests - confirmation
- Implemented unit tests to very that "confirmation=yes" works.
- Implemented unit tests to very that \n causes a re-prompt.
- Updated docs with regard to this fix, thanks to Bruce Dillahunty.
2009-03-20 18:12:11 -04:00
Paul Beckingham
74ea5b4ef6 Bug Fix - confirmation not processing newline
- Fixed bug where util.cpp:confirm was eating newlines, and not
  rewriting the prompt.  Consequently, after confirm asked the
  question, and the user hit <Enter>, nothing was displayed but
  the newline.  Now uses std::getline.
2009-03-20 16:56:25 -04:00
Paul Beckingham
cc2220b406 Unit Tests - text
- Added unit tests to verify correct functioning of the text utility
  code.
2009-03-19 20:48:02 -04:00
Paul Beckingham
7389ce617a i18n - utf8 support
- Added more unit tests to verify that utf8 projects and tags are
  supported.
2009-03-19 19:46:41 -04:00
Paul Beckingham
165001acac i18n - unit tests
- Added more utf8.t unit tests.
- Removed text.cpp:extractParagraphs, which is not used.
2009-03-19 19:14:01 -04:00
Paul Beckingham
3d3d788961 Recurring Tasks - new "weekdays" frequency
- Added support for "weekdays" as a recurrence frequency, which skips
  Saturday and Sunday, but is otherwise a daily recurrence.  Thanks
  to Chris Pride.
2009-03-18 23:29:25 -04:00
Paul Beckingham
3c196230dd Autoconf
- Added the "-Wall and -pedantic" compiler flags for the non-debug
  build.  The should have been there anyway.
2009-03-18 22:54:59 -04:00
Paul Beckingham
9a350a7dcd Documentation Update
- Updated docs that referenced 1.4.1, failed to include new 1.5.0
  and 1.6.0 commands.
2009-03-17 23:54:56 -04:00
Paul Beckingham
92579e5531 Unit Test - oldest/newest
- Added unit tests to verify oldest and newest reports both work when
  less than 10 tasks are added, and have the correct sort order.
2009-03-17 23:36:00 -04:00
Paul Beckingham
40a538a769 Unit Tests - utf8.t
- Implemented unit tests (more of a demo) that add a bunch of UTF-8
  encoded tasks, as a starting point to updating task to be aware of
  encodings, Unicode etc.
2009-03-17 22:45:53 -04:00
Paul Beckingham
b6e4bc966f Merge branch 'master' of git@github.com:pbeckingham/task into 1.6.0 2009-03-16 22:27:40 -04:00
Paul Beckingham
03815967d2 Documentation Update - task.html
- Added reference to github to allow direct download, clone, fork etc.
2009-03-16 22:26:27 -04:00
Andy Lester
7049bf19d9 Ignore backup files, too
Signed-off-by: Paul Beckingham <paul@beckingham.net>
2009-03-17 10:19:07 +08:00
Paul Beckingham
c69c3bb090 New Command - append
- New "append" command concatenates additional text onto an existing
  task description.
- Added unit tests to append command.
2009-03-16 08:29:09 -04:00
Paul Beckingham
7238d1f1c9 Began 1.6.0 Development 2009-03-16 08:27:24 -04:00
Paul Beckingham
9f82c55c5b Merge branch '1.5.0'
Conflicts:
	html/task.html
2009-03-15 22:26:50 -04:00
Paul Beckingham
87be68e2e8 Bug Fix
- Shebang in tests/run_all was backwards.
2009-03-15 22:12:18 -04:00
Paul Beckingham
7b1dec0d77 Bug Fix - abbreviation.t
- abbreviation.t contains unit tests that fail to specify an alternate
  rc file (rc:abbrev.rc), and so instead rely on ~/.taskrc.  For a new
  installation, there is no .taskrc, so task offers to create one.
  When done in the context of a unit test, task hangs waiting for input.
2009-03-15 19:15:35 -04:00
Paul Beckingham
f8af5d999a Unit Tests - run_all
- Added script to run all unit tests and capture output.
2009-03-15 17:38:54 -04:00
Paul Beckingham
8efd8620c8 Portability - Ubuntu 8.10
- When creating a new .taskrc file, no newlines were included at EOL.
  This needs a 1.5.1 regression test.
2009-03-15 17:21:54 -04:00
Paul Beckingham
e8a795befb Unit Tests - due, export
- due.t was incorrectly reporting the number of tests it intended to
  run.
- export.t was not updated when the export command was updated to include
  recurrence information.
2009-03-15 17:01:22 -04:00
Paul Beckingham
b5690f00e2 Portabiliy - Fedora 9, Ubuntu 8
- The custom report limit "report.x.limit" was being used to limit the
  rendered rows in the table.  Instead, there should be something like
  min (limit, actual_rows) used, in Table.cpp.
  The symptom was duplicate tasks in a "task oldest" report, when there
  were less than 10 tasks.
2009-03-15 16:39:41 -04:00
Paul Beckingham
65f74da7a4 Portability - Fedora 9
- Using size_t as a result for std::string::find causes a silent error,
  reported only on Ubuntu 8.  size_t is not large enough.  The proper
  result type is std::string::size_type.  This fixes a problem with
  the command "task old" responding with "Ambiguous commane 'old' -
  could be one of oldest, oldest.description, oldest.limit, oldest.sort".
2009-03-15 16:26:20 -04:00
Paul Beckingham
429d0f3071 Portability - Fedora 9
- Compiler pointed out an expression (a || b && c) that clearly needs
  parentheses around (a || b).  Gcc on other OSes don't mention this.
2009-03-15 16:14:16 -04:00
Paul Beckingham
4baf30cf9c Portability - Ubuntu 8
- Changed unsigned int to size_t for std::string::npos comparison.
- Removed validBuiltinCommand function that is not used.
2009-03-15 16:13:02 -04:00
Paul Beckingham
a3882160fa Documentation Update
- Updated docs to reflect the 1.5.0 release date.
2009-03-15 15:12:16 -04:00
Paul Beckingham
cd85a28e98 Unit Tests - due, overdue
- Unit tests to verify that the "overdue" report is properly
  displaying tasks.
- Unit tests to verify that "due" can be defined.
2009-03-15 15:04:52 -04:00
Paul Beckingham
e33a918c24 Bug Fix - summary report
- Fixed bug in summary report where recently completed (and therefore
  not yet in the completed.data file) tasks were not included in the
  report.
2009-03-15 11:37:05 -04:00
Paul Beckingham
df82fade2c Unit Tests - bug.summry, custom.columns, next
- Added unit tests to verify that the next report returns the correct
  tasks.
- Added unit test to verify that unrecognized columns in a custom
  report are flagged.
- Added unit tests to verify that only pending and completed tasks
  are included in the summary report.
2009-03-15 11:31:27 -04:00
Paul Beckingham
2d2bd47075 Bug Fix - summary report included deleted tasks
- Applied patch from Benjamin Tegarden to exclude deleted tasks from
  the summary report.
2009-03-14 13:47:48 -04:00
Paul Beckingham
bdd1b16ba0 Documentation Update
- Updated docs to reflect recent changes.
2009-03-14 13:38:39 -04:00
Paul Beckingham
5383943fa7 Enhanced export command
- Now sanitizes output by replacing ' with " in descriptions.
- Added 'recur' attribute to exported output.
- Removed recurring, deleted and complete tasks from the export.
2009-03-14 13:36:32 -04:00
Paul Beckingham
8ac3978222 Unit Tests - dateformat, shadow
- Improved dateformat.t tests to cover all acceptable date format
  characters.
- Unit tests for shadow file update notification.
- Unit tests for shadow file updates under certain circumstances.
- Unit tests for shadow file no updates under other circumstances.
2009-03-14 12:54:11 -04:00
Paul Beckingham
c9a6d2a750 Improved GC and Shadow File Handling
- Every command now returns an output string, or at least has an
  opportunity to do so.
- TDB::gc is only performed a) when allowed, and b) when the command
  will display line numbers.
- updateShadowFile is only performed when a) shadow updates are allowed,
  and either b) when a command is guaranteed to have modified a task or
  c) when TDB:gc has already made changes.
2009-03-14 12:05:32 -04:00
Paul Beckingham
64cfc26ff3 Enhanced Stats Report
- now reports number of unique tags (given filtering)
- now reports number of unique projects (given filtering)
2009-03-14 12:04:25 -04:00
Paul Beckingham
7c87bbc19a Unit Tests - dateformat
- Unit tests determine whether the dateformat configuration variable
  determines how dates are parsed, and how dates are rendered.
2009-03-14 12:02:33 -04:00
Paul Beckingham
4a524a220e Bug Fix - default command, default unit test
- Task runs the default command when no arguments are provided, but
  when an "rc:..." argument is provided, it does not run the default
  command.
- Implemented unit tests to verify the functioning of default commands,
  default project and default priority.
2009-03-14 00:21:42 -04:00
Paul Beckingham
2216eee678 Help Consistency
- Added note about frequent releases to the shortUsage output, so it
  is now consistent with that of "version".
2009-03-13 13:12:34 -04:00
Paul Beckingham
28c97f181a Grammar
- Changed wording of the help output.
2009-03-13 10:35:17 -04:00
Paul Beckingham
0cfc9c720e Compile Bug - missing <stdlib.h>
- Added stdlib.h to Grid.cpp, thanks to Benjamin Tegardin.
2009-03-13 09:06:23 -04:00
Paul Beckingham
05b5273136 Unit Tests - oldest
- Implemented unit tests to verify that the "oldest" report does
  indeed show the oldest 10 tasks.
- Implemented unit tests to verify that the "newest" report does
  indeed show the newest 10 tasks.
2009-03-12 22:56:22 -04:00
Paul Beckingham
c35a764019 Custom Reports - oldest, newest
- Added support for the "report.X.limit" configuration variable, to
  restrict the number of rows a report generates.
- Added support for Table::render (limit) to limit the number of rows
  that are rendered.
- Removed "oldest" and "newest" report code.
- Added "oldest" and "newest" custom report details to Config.cpp
- Updated various documentation.
2009-03-12 22:34:45 -04:00
Paul Beckingham
8c95e82a63 Unit Tests - start/stop/acive
- Added unit tests to test the start and stop commands via the active
  report.
2009-03-10 23:06:02 -04:00
Paul Beckingham
79d644c257 Unit Tests - custom
- Added unit tests to verify correct functioning of custom report
  filters.
2009-03-10 22:30:15 -04:00
Paul Beckingham
2d07b08260 Custom Reports - usage
- Added defined custom reports to the usage text.  This includes the
  new "report.X.description" configuration variable.
2009-03-10 22:21:23 -04:00
Paul Beckingham
1f45e47e36 Bug Fix - history/ghistory triggered only by add
- Fixed bug whereby if a new month rolls around, and no task is added,
  no row of data is shown in the history or ghistory reports, even
  though tasks may have been completed or deleted ni the new month.
2009-03-10 16:37:35 -04:00
Paul Beckingham
dac1942cad Bug Fix - calendar
- Task now displays as many calendars will fit across the window,
  unless a lower value is specified in the "monthsperline" configuration
  variable.
- Task now obeys the "color" configuration variable when determining
  whether to add a legend to the calendar output.
2009-03-10 16:12:59 -04:00
Paul Beckingham
6d8cb5181f Bug Fix - unit test tdb.t
- Fixed two failing unit tests in tdb.t.cpp, which were both due to
  incorrect test logic, rather than a TDB bug.
2009-03-10 15:40:48 -04:00
Paul Beckingham
d174bb1143 Bug Workaround - locking
- Added support for the "locking" configuration variable that disables
  file locking.  This can be helpful to folks who use task on Solaris,
  and store their task data files on an NFS mount.
2009-03-10 15:21:29 -04:00
Paul Beckingham
dc946e175e Unit Tests - completed, delete
- Added unit tests to verify that the completed.data file is not
  created until the first report is run after the task is marked
  as done.
- Added unit tests to verify that delete/undelete work as expected.
2009-03-10 14:32:32 -04:00
Paul Beckingham
9f278b1ffc Unit Tests - export
- Added unit tests to export tasks and compare.
2009-03-10 00:22:23 -04:00
Paul Beckingham
6fade84535 Unit Tests - color.*, abbreviation
- Added unit tests for all auto coloration configuration settings.
- Tweaked colorization rule precedence to allow color.due to override
  the built-in coloration of due tasks.
2009-03-10 00:08:40 -04:00
Paul Beckingham
0ff33d1c16 Version command changes
- Added color.recurring to the list of valid config values.
- Added message to "version" command hinting that folks should look
  periodically for updated versions of task.  Task does not "call home"
  and check for updates (and never will), and so it is easy to not
  realize that there may be newer versions of task with bug fixes and
  new features.
2009-03-09 23:02:01 -04:00
Paul Beckingham
1999e38ba5 Colorization - color.recurring
- Added support for "color.recurring" configuration variable to
  colorize recurring tasks.
- Updated docs.
2009-03-09 22:12:49 -04:00
Paul Beckingham
17de9fec9f New Column - recur
- Added new column 'recur' for use in custom reports.
- Implemented Table::ascendingPeriod, Table::descendingPeriod allowing
  sorting on the recur column.
- Added unit tests to both use the new column and test the sorting.
- Code cleanup.
2009-03-09 22:01:08 -04:00
Paul Beckingham
751094cffb Documentation Update
- Added recent bug fix details.
2009-03-09 03:09:43 -04:00
Paul Beckingham
012e47267f Bug Fix - concatenated description on modify
- When a task was modified, the new description was concatenated
  without spaces.
2009-03-09 03:06:41 -04:00
Paul Beckingham
bd5e91c31f Merge branch '1.5.0' of git@github.com:pbeckingham/task into 1.5.0 2009-03-09 02:54:10 -04:00
Paul Beckingham
9e7844796b Updated Documentation
- Added 'beta' download section to main web page.
2009-03-09 02:53:44 -04:00
Paul Beckingham
209f7ffb00 Updated Documentation
- Added new platforms to NEWS file.
2009-03-09 02:52:36 -04:00
Paul Beckingham
28e997691f Unit Tests - repair
- Added auto right trim to all table rows, which is a much more
  efficient way of doing what Table::optimize was doing.
- Table::optimize is now a nop.
2009-03-08 22:56:47 -04:00
Paul Beckingham
3f418c6fdc Performance
- Made Table::optimize a public method.
- Table::optimize called only from handleReportGHistory, where it's
  needed.
- Retaining benchmark.txt, to allow further improvements.
2009-03-08 21:29:55 -04:00
Paul Beckingham
0362b41f3b Performance
- Added Timer class to display high resolution timing information.
- Found terrible bug in Table::optimize that was taking up 99.7%,
  on average, of the Table::rendering time, including sorting.  This
  fix naturally causes a 187-fold speedup of rendering.
- Changed report.cpp in handleCustomReport to only load pending tasks,
  instead of all pending tasks.  Subtle, but important difference.
2009-03-08 20:49:33 -04:00
Paul Beckingham
4fa4c5f532 Unit Tests - t.benchmark.t
- Added benchmark to measure time taken to parse 1,000,000 T records.
2009-03-08 17:59:27 -04:00
Paul Beckingham
3088e1ebe1 Unit Tests - abbreviation, filter, benchmark
- Added tests for attribute abbreviation.
- Added tests for filter permutation testing.
- Added benchmark for ongoing performance measurement.
- Mentioned test suite in docs.  Why not?
2009-03-07 02:06:13 -05:00
Paul Beckingham
6a7c66aa05 Unit Tests - color.disable color.pri config.obsolete
- Added unit tests to cover automatic colorization by priority.
- Added unit tests to cover automatic disabling of color when !isatty.
- Added unit tests to cover display of unsupported configuration
  variable in the 'version' report.
- Added support the '_forcecolor' configuration variable to allow the
  possibility of unit tests that test color support, yet redirect
  output to a file.  This configuration variable will not be
  documented.
2009-03-07 00:14:58 -05:00
Paul Beckingham
3b1d396e0a Acknowledgement
- Michael Greb acknowledged for his help in reporting several bugs in
  sufficient detail, and narrowing down the cause.
2009-03-06 21:59:25 -05:00
Paul Beckingham
463c968cac Unit Tests - undo.t
- Added unit tests for the undo command, which verify that a task may
  only be undone if a TDB::gc has not occurred.
2009-03-06 00:39:28 -05:00
Paul Beckingham
41b8b207d4 Documentation Update
- Added examples to the grammar file.
- Added recent change to ChangeLog, html/task.html.
2009-03-05 10:13:10 -05:00
Paul Beckingham
9535121c1e Performance
- Removed the unnecessary sort in the 'completed' report.  The tasks
  are already sorted.
2009-03-05 10:08:25 -05:00
Paul Beckingham
9988ecec5e Portability
- Modified util.cpp to allow clean compilation on Solaris.
2009-03-04 09:37:00 -05:00
Paul Beckingham
d573599a7e Unit Tests - subproject
- Implemented unit test to verify that the project and subproject
  filtering is working properly.
2009-03-04 00:04:09 -05:00
Paul Beckingham
d831ab335a Report Column Header
- Added "Number" to the ghistory graph title.
2009-03-03 23:13:31 -05:00
Paul Beckingham
d7a9d06360 Unit Tests - add, bug_hang, bug_period, bug_sort, nag, tag
- Implemented unit tests to verify tag manipulation
- Implemented unit tests to verify nag functionality
- Implemented unit tests to verify bug fix for hang on shadow write
- Implemented unit tests to verify bug fix for unsupported recurrence periods
- Implemented unit tests to verify bug fix for hang on sort
- Corrected typo in add.t
2009-03-03 21:19:07 -05:00
Paul Beckingham
d69d658531 Unit Tests - tag
- Added unit tests to test the +tag and -tag task modification
  feature.
2009-03-03 17:15:40 -05:00
Paul Beckingham
5c89c0f1be Documentation Update
- Modified ChangeLog and task.html to reflect new bug fixes.
2009-03-03 00:53:32 -05:00
Paul Beckingham
964d04322c Bug Fix - nag
- Implemented new nag algorithm, and debugged why it then broke.
2009-03-03 00:46:02 -05:00
Paul Beckingham
8157c729d6 Unit Tests - bug_sort
- Added a unit test to cover the bug whereby certain combinations
  of adding tasks causes Table::sort to loop indefinitely.
2009-03-03 00:08:06 -05:00
Paul Beckingham
a1b7516cf8 Sort Algorithm Fix
- The sort algorithm (Combsort11) was broken because it didn't
  consider all the possible variations of present/missing, same/
  different combinations of data, when performing a compare.  This
  led to an unstable sort, which is an infinite loop in Combsort11.
2009-03-02 23:49:13 -05:00
Paul Beckingham
1e70400143 Shadow File Rewrite
- No longer writes shadow files based on TDB onChange trigger.
- Addressed bug whereby adding a recurring task trigger a shadow
  file rewrite, which in turn performs trigger another rewrite...
2009-03-02 23:47:41 -05:00
Paul Beckingham
6e956b45ad Code Cleanup
- Fixed typo in unit test
2009-03-02 00:44:28 -05:00
Paul Beckingham
59a014d866 Unit Tests - nag
- Added unit tests to exercise the nag option.
2009-03-01 23:52:28 -05:00
Paul Beckingham
76c9d3565c Documentation Update
- Added paragraph tags.  Don't know why, but the rendering was odd.
2009-02-24 22:27:51 -05:00
Paul Beckingham
8c484a333d Documentation Update
- Added folks to AUTHORS file.
- Added Fedora Core 10, Ubuntu 8.10 Intrepid Ibex to compatibility
  list.
2009-02-23 22:59:17 -05:00
Paul Beckingham
0605161236 Updated OS Compatibility List
- Fedora Core 10
- Ubuntu 8.10 Intrepid Ibex
2009-02-23 10:38:01 -05:00
Paul Beckingham
f9272773ac Credit
- Added Carlos Yoder to AUTHORS, for his contribution.
- Added Russell Friesenhahn to AUTHORS, for his contribution.
2009-02-21 17:24:07 -05:00
Paul Beckingham
e2fca47a27 Typo
- Added missing "http://" to "www.samurize.com", at the suggestion
  of Carlos Yoder.
2009-02-20 21:08:39 -05:00
Paul Beckingham
92ba36bdec Unit Tests - add, delete, info, ///
- Began set of high-level integration tests, in Perl.
2009-02-16 23:12:04 -05:00
Paul Beckingham
72efddc066 Sample .taskrc - update
- Added default config variables for new reports.
- Removed README.1.5.0.
- Removed messages configure.ac
2009-02-16 21:35:26 -05:00
Paul Beckingham
bcf512e529 Nag Rewrite
- Now uses a better escalating scale of "importance".
2009-02-16 21:09:00 -05:00
Paul Beckingham
6d551357ff Packaging
- Began modification of script.txt in preparation for next movie!
- Added README.1.5.0 warning to configure.ac.  Do you think people
  will see it?  And then read the file?  I may need to provide an
  automated solution.
2009-02-15 23:44:58 -05:00
Paul Beckingham
0219ed4fe3 Packaging
- Added README.1.5.0 detailing the new custom report configuration
  variables that must be added.
- Added README.1.5.0 to the distribution.
- Added new custom.html documentation.
- Added warning to task.html about the README.1.5.0 changes.
2009-02-15 23:26:15 -05:00
Paul Beckingham
cc7c1819ce Sample .taskrc - update
- Added recent .taskrc file changes to the default file that is created
  when task is run the first time.
2009-02-15 22:45:50 -05:00
Paul Beckingham
1a4469d388 Error handling
- Validates specified columns in custom reports against list of good
  column names.
- Validates list of sort columns in custom reports against list of
  specified column names.
- Minor fix to grammar file.
2009-02-15 22:33:18 -05:00
Paul Beckingham
4e63d93005 Documentation Update
- Added commit ids to ChangeLog
- Added tags to respective commit ids
2009-02-15 16:54:59 -05:00
Paul Beckingham
481a0aa1eb Custom Reports - old reports removed 2009-02-15 15:13:24 -05:00
Paul Beckingham
6764a6a7ec Custom Reports - basic implementation
- Custom reports can be defined and run.
- Custom columns included.
- Custom filter applied.
- Custom sorting applied.
2009-02-15 14:54:54 -05:00
Paul Beckingham
dae268a836 Merge branch '1.5.0' of git@github.com:pbeckingham/task into 1.5.0 2009-02-14 23:18:05 -05:00
Paul Beckingham
096a4b9bdb Bug Fix - split
- Fixed bug in split functions, which was causing empty strings to be
  split into a single element list consisting of one empty string.
  The symptom was that all tasks without tags appeared to have one
  zero-length tag and the task was colored according to color.tagged.
2009-02-14 23:17:35 -05:00
Paul Beckingham
e65a45ce17 Bug Fix
- Fixed bug in split functions, which was causing empty strings to be
  split into a single element list consisting of one empty string.
  The symptom was that all tasks without tags appeared to have one
  zero-length tag and the task was colored according to color.tagged.
2009-02-14 23:13:31 -05:00
Paul Beckingham
01b3cb190c Configuration Variable - due
- Added support for the "due" configuration variable that defines
  how many days into the future when a task is considered due.
2009-02-14 20:19:47 -05:00
Paul Beckingham
6faf1e44f5 Bug Fix - lower case priorities
- Changed a call to isupper to islower.  This was preventing the
  internal modification to upper case.
- Updated ChangeLog accordingly.
2009-02-14 20:04:34 -05:00
Paul Beckingham
2307dcab8a Copyright Update
- bumped the year, on the source copyright notices.
2009-02-14 17:50:38 -05:00
Paul Beckingham
eba05513f7 Unit Tests
- Converted unit tests to use a UnitTest object, with more methods and
  and exit summary.
- Removed "fail" tests in tdb.t.cpp, because it artificially reduces
  the number of passing tests - the comments in the code suffice.
2009-02-14 17:05:50 -05:00
Paul Beckingham
2f7060ce56 Unit Tests
- Fixed long-broken unit tests that were expecting wrong values.
2009-01-31 12:08:03 -05:00
Paul Beckingham
c28c698bbf Cleanup
- Converted grammar.bnf to the EBNF used by Parser.
2009-01-28 12:09:24 -05:00
Paul Beckingham
b55eaf8f16 Cleanup
- renamed grammar.txt to grammar.bnf
2009-01-28 11:51:29 -05:00
Paul Beckingham
3d4beaf41f - Enhanced split algorithm to be non-destrutive, and therefore faster
- Added autoconf testing to detect Solaris
- Added Solaris-specific flock implementation
2008-12-14 15:18:33 -05:00
Paul Beckingham
50ccb67185 - Added builtin command detection
- Now allows override of due/overdue coloration
2008-12-14 11:09:15 -05:00
Paul Beckingham
14d3abacf4 - Beginning to fill out processing of the generalized custom report. 2008-11-19 00:33:43 -05:00
Paul Beckingham
857f813a24 - Added the 1.4.3 debian package from Richard Querin. 2008-11-11 08:54:55 -05:00
Paul Beckingham
8639e92606 - Updated release date for 1.4.3. 2008-11-11 08:53:59 -05:00
Paul Beckingham
5498986e15 - Fixed typo. 2008-11-11 00:27:14 -05:00
Paul Beckingham
eb827603c3 - Final tidying up of 1.4.3 loose ends. 2008-11-11 00:10:14 -05:00
Paul Beckingham
6e1dbfb16e - Now handles the configuration variable recognition of the
new custom report variables.
2008-11-10 09:53:49 -05:00
Paul Beckingham
748300631a - Now parses the command line and can distinguish regular commands, as well as
custom reports.
2008-11-09 22:46:12 -05:00
Paul Beckingham
6d5309527c - Enabled "configure --enable-debug" to suppress optimization, therefore
allowing debugging without the debugger showing the unoptimized source
  while stepping through optimized code.
2008-11-09 01:42:30 -05:00
Paul Beckingham
aafcba436e - Clarified old statements in ChangeLog.
- Removed now obsolete ideas.txt file.
2008-11-09 00:17:45 -05:00
Paul Beckingham
28ceeac796 - Beginnings of the "task list pri:!H" inverse filtering capability.
Doesn't work, and is commented out for now.  Need a better approach
  because of the priority attribute validation of "!H" failing, and the
  Unix shell interpreting "!", thus requiring an escape, which makes the
  command ("task list pri:\!H") ugly.
2008-11-08 23:48:19 -05:00
Paul Beckingham
ecdfb31553 - "task version" command now reports unrecognized configuration variables,
which may be spelling mistakes or deprecated variables.
2008-11-08 23:32:29 -05:00
Paul Beckingham
8d920f9dc4 - Updated documentation to reflect removal of the "showage" configuration variable. 2008-11-08 22:45:27 -05:00
Paul Beckingham
5f85550664 - Removed support for the "showage" configuration variable. 2008-11-08 22:43:40 -05:00
Paul Beckingham
b548342acc - Modified docs to include "shadow.notify". 2008-11-02 23:21:41 -05:00
Paul Beckingham
ee961daef6 Merge branch 'master' into 1.5.0
Conflicts:
	ChangeLog
	NEWS
	configure.ac
	html/task.html
	src/task.cpp
	src/task.h
2008-11-02 22:29:38 -05:00
Paul Beckingham
ce42ae9622 Merge branch '1.4.3' of git@github.com:pbeckingham/task into 1.4.3
Conflicts:
	ChangeLog
	html/task.html
	src/task.cpp
2008-11-02 21:50:55 -05:00
Paul Beckingham
47ffc0babc - Deleted old test file. 2008-11-02 21:43:10 -05:00
Paul Beckingham
612a183776 - Major documentation update
- New filter page
- New shadow file page
2008-11-02 21:23:34 -05:00
Paul Beckingham
396d85cd53 - Removed "usage" command. 2008-11-01 16:48:28 -04:00
Paul Beckingham
038f432752 - ChangeLog update 2008-11-01 16:38:55 -04:00
Paul Beckingham
ef886dff53 Merge branch '1.4.3' 2008-11-01 16:32:08 -04:00
Paul Beckingham
2cae1df42f - Merged 1.4.3 to master 2008-11-01 16:31:30 -04:00
Paul Beckingham
82c0fea708 - Remove debugging code. 2008-11-01 16:14:15 -04:00
Paul Beckingham
d6b30466c1 - "task ghistory" now displays a differently aligned graph, allowing
easier comparison by month of tasks added versus completed and deleted.
2008-11-01 15:44:25 -04:00
Paul Beckingham
b0e18de1b6 - Fixed bug where the onChangeCallback was being called twice for "task list" after "task do xx". 2008-10-25 02:09:31 -04:00
Paul Beckingham
b7e889339d - Added support for shadow.notify to indicate when the shadow file is updated
- Fixed description validation bug that allowed \n, \r and \f in a description, then rendered the pending.data file unparseable
2008-10-25 02:03:21 -04:00
Paul Beckingham
2a5736b876 - TDB::gc now only calls overwritePending when something changed.
- Removed TDB::gc calls from report.cpp.
- Made TDB::gc calls from task.cpp whenever necessary.
- Disabled TDB::gc calls when running a report for the sake of the shadow file.
- Shadow file overwrite now implemented using ostream, instead of cout.rdbuf trickery, for the well-being of cygwin.
2008-10-24 23:15:52 -04:00
Paul Beckingham
b176591261 - Converted reports/command to return strings 2008-10-23 00:44:21 -04:00
Paul Beckingham
c44baf913d Merge branch '1.5.0' of git@github.com:pbeckingham/task into 1.5.0
Conflicts:
	html/task.html
	src/task.cpp
2008-10-19 11:50:14 -04:00
Paul Beckingham
0987171280 - Added support for "task stop <id>" command, that removes the start time from a task.
- Updated documentation accordingly.
2008-10-19 11:47:03 -04:00
Paul Beckingham
47c02965e9 Merge branch '1.4.3' into 1.5.0
Conflicts:
	NEWS
	TUTORIAL
	configure.ac
	html/advanced.html
	html/task.html
	html/versions.html
	src/task.cpp
2008-10-18 18:19:47 -04:00
Paul Beckingham
ce561a6c43 - Instrumented version for shadow file testing. 2008-10-15 10:16:46 -04:00
Paul Beckingham
b4b389c27e - Added checks to ensure that a shadow.file value doesn't collide with either the pending.data or completed.data files. 2008-10-09 21:24:12 -04:00
Paul Beckingham
437c85da39 Merge branch '1.4.3' into 1.5.0
Conflicts:
	NEWS
	TUTORIAL
	configure.ac
	html/advanced.html
	html/task.html
	html/versions.html
	src/task.cpp
2008-10-09 21:03:29 -04:00
Paul Beckingham
62115ea988 - Removed version number from HTML titles.
- New filter.html doc.
- New shadow.html doc.
2008-10-09 18:43:13 -04:00
Paul Beckingham
3ed1269753 - Added support for plain text shadow files. 2008-10-09 18:24:35 -04:00
Paul Beckingham
a5ec1e4b27 - Added support for shadow file, shadow file command
- Added support for TDB::onChange callback
2008-10-09 17:19:57 -04:00
Paul Beckingham
a815492111 - New links page referring to task links on the web. 2008-09-26 22:30:42 -04:00
Paul Beckingham
f3aa88cf83 Merge branch 'master' into 1.5.0 2008-09-26 22:27:03 -04:00
Paul Beckingham
f26a9c67be - Built 1.4.2 and packaged it as a Mac OS X Leopard Intel binary
- Modified incorrect Debian packages in versions.html
- Added Debian and Mac packages to task.html
2008-09-26 22:25:38 -04:00
Paul Beckingham
d837a25be7 - Removed support for the "command.logging" configuration variable and
the "task usage" command.
2008-09-20 20:46:20 -04:00
Paul Beckingham
78fae5195b - Converted 1.4.2 references to 1.5.0. 2008-09-20 20:24:58 -04:00
Paul Beckingham
e7304e86ce - Forgot to bump version number in page title. 2008-09-19 13:38:44 -04:00
Paul Beckingham
d7b95cb2e1 - Removed Mac binary package references. 2008-09-18 21:37:00 -04:00
Paul Beckingham
45ed7dcdaa - Updated release date. 2008-09-18 21:03:07 -04:00
Paul Beckingham
d809b6dae7 - Added most recent change to ChangeLog. 2008-09-13 23:40:09 -04:00
Paul Beckingham
a1cc4e5774 - Task supports modifying the existing description of a task, with the
following syntax: task <id> "new description ...".
2008-09-13 23:33:53 -04:00
Paul Beckingham
21c33f7030 - Improved "version" command. 2008-09-13 13:07:57 -04:00
Paul Beckingham
2e32457032 Merge branch '1.4.2' 2008-09-12 16:47:47 -04:00
Paul Beckingham
e4ed873d60 Merge branch 'master' of git@github.com:pbeckingham/task 2008-09-12 16:47:01 -04:00
Paul Beckingham
e35dcd0e42 - Minor doc edit. 2008-09-12 16:46:22 -04:00
Paul Beckingham
ec15dc9342 - Added "#include <string.h>" to task.cpp to ensure clean build under GCC 4.3 2008-09-12 16:22:51 -04:00
Paul Beckingham
fb87039d8c - Task now supports "default.command" configuration variable (for example
it could contain "list due:tomorrow") that is the command that is run
  whenever task is invoked with no arguments.
2008-09-12 16:07:50 -04:00
Paul Beckingham
e9a71b7db9 - Fixed bug where relative dates in filters (task list due:eom,
task list due:tomorrow, task list due:23rd ...) are now properly supported.
2008-09-12 15:25:38 -04:00
Paul Beckingham
df215f228d - Task supports improved word-wrapping to the terminal width. 2008-09-12 12:48:53 -04:00
Paul Beckingham
4f8f044644 - Task now supports a default project and priority for new tasks, via
the new "default.project" and "default.priority" configuration variables
  (thanks to Vincent Fleuranceau).
2008-09-12 12:14:26 -04:00
Paul Beckingham
4380c7c712 - Task now allows mixed case attributes names (pri:, PRI:, Pri: ...) and
commands (add, ADD, Ad ...) (thanks to Vincent Fleuranceau)
2008-09-12 11:40:46 -04:00
Paul Beckingham
4abc722eff - Task now uses dashes (-----) to underline column headings when color is
disabled (thanks for Vincent Fleuranceau).
2008-09-12 11:27:25 -04:00
Paul Beckingham
11225eb599 - Applied patch from Andy Lester to correct Table sorting to use the entire
string instead of just the initial characters.
2008-09-12 10:28:14 -04:00
Paul Beckingham
e16bd057d8 Merge branch 'master' into 1.4.2 2008-08-26 09:58:42 -04:00
Paul Beckingham
29a152edb0 - Migrated 1.5.0 changes thus far into 1.4.2. 2008-08-26 09:57:46 -04:00
Paul Beckingham
e99e6832f2 - Added Debian package for 1.4.1 to docs. 2008-07-23 22:41:25 -04:00
Paul Beckingham
ff4e8dbef1 Merge branch 'master' of git@github.com:pbeckingham/task 2008-07-20 22:26:38 -04:00
Paul Beckingham
d265ac6c2d - Implemented "task undo" to counteract "task do". 2008-07-19 22:12:01 -04:00
Paul Beckingham
dc1760769f - Bumped version number to 1.5.0 2008-07-19 14:56:36 -04:00
Paul Beckingham
c6eb09cd63 - SK reports that task builds fine under Feisty Fawn 2008-07-19 14:48:46 -04:00
Paul Beckingham
e080c3168c - Package Manager file. 2008-07-18 01:56:17 -04:00
Paul Beckingham
ea06565007 - Final 1.4.1 touches. 2008-07-18 01:53:54 -04:00
Paul Beckingham
4ae189f77d - Removed TUTORIAL references in README 2008-07-17 00:37:15 -04:00
Paul Beckingham
ebf4f3cb12 - Updated ChangeLog, task.html
- Removed contents of TUTORIAL file
2008-07-16 23:51:43 -04:00
Paul Beckingham
4d1cdf0270 - For "task calendar", the month names are now centered over the month. 2008-07-16 23:42:02 -04:00
Paul Beckingham
ceffdca8a2 Merge branches '1.4.1' and '1.4.1' of imac.local:task 2008-07-13 18:06:34 -04:00
Paul Beckingham
bb7f48496a - Bumberd version number to 1.4.1 2008-07-13 13:25:35 -04:00
Paul Beckingham
da7cda3c82 Merge branch 'master' into 1.4.1 2008-07-13 10:55:38 -04:00
Paul Beckingham
31a5816fb4 - Added link to task_1.4.0-1_i386.deb from Richard Querin. 2008-07-13 10:54:42 -04:00
Paul Beckingham
a443257aaa - Fixed bug whereby descriptions could not be altered. 2008-07-11 15:19:59 -04:00
233 changed files with 26276 additions and 10119 deletions

9
.gitignore vendored
View File

@@ -1,4 +1,3 @@
Makefile.in
aclocal.m4
autom4te.cache
auto.h*
@@ -6,8 +5,14 @@ config.h.in
config.status
src/.deps
src/Makefile
src/task
*/*task
stamp-h1
Makefile
Makefile.in
configure
config.log
www.xls
src/tests/all.log
src/tests/*.data
*~
.*.swp

39
AUTHORS
View File

@@ -1,18 +1,41 @@
Principal Author:
Paul Beckingham, paul@beckingham.net
The development of task was made possible by the significant contributions of the following people:
Paul Beckingham (Principal Author)
Federico Hernandez (Package Maintainer & Contributing Author)
David J Patrick (Designer)
John Florian (Contributing Author)
Contributing Authors:
The following submitted code, packages or analysis, and deserve special thanks:
Damian Glenny
Andy Lester
H. İbrahim Güngör
Stefan Dorn
Michael Greb
Benjamin Tegarden
Chris Pride
Richard Querin
T. Charles Yun
P.C. Shyamshankar
Johan Friis
Steven de Brouwer
Pietro Cerutti
With thanks to:
Thanks to the following, who submitted detailed bug reports and excellent suggestions:
Eugene Kramer
Srijith K
Richard Querin
Bruce Israel
Thomas Engel
Nishiishii
galvanizd
H. İbrahim Güngör
Stas Antons
Andy Lester
Vincent Fleuranceau
ArchiMark
Carlos Yoder
Russell Friesenhahn
Paolo Marsi
Eric Farris
Bruce Dillahunty
Askme Too
Mike Adonay
Thomas@BIC
Ian Mortimer
Zach Frazier

528
ChangeLog
View File

@@ -1,108 +1,394 @@
Version numbers are of the form:
X.Y.Z
where the X represents a major version number, or architecture. The Y
represents a feature release, and the Z represents a patch.
------ current release ---------------------------
1.4.0 (7/10/2008)
+ New recurring tasks feature
+ "task undelete" can now undelete erroneously deleted tasks, provided no
reports have been run (and therefore TDB::gc run)
+ Added averages to the "task history" report
+ Added ability to override ~/.taskrc with rc:<file>
+ Added bar chart history report "task ghistory"
+ Added task filtering on all reports
+ Automatically shuts off color, curses when output is not a tty
+ Supports relative due: dates (tomorrow, wednesday, 23rd, eom ...)
+ Supports the ~ character in .taskrc data.location
+ Allows colons on the description, provided what is to the left of the colon
is not a standard attribute name
+ Bug: Fixed where Esc[0m sequences were being emitted for no good reason
+ Bug: Fixed underlined table headers when color is turned off
+ Bug: Adding a blank priority resulted in an assigned garbage value
+ Bug: Fixed parsing of date "07/08/2008" when using dateformat "m/d/Y"
1.8.3 (10/21/2009)
+ Added support for Haiku R1/alpha1
------ old releases ------------------------------
1.3.1 (6/21/2008)
1.8.2 (9/7/2009) f243f0ed443ecd7dde779de8a6525222591024db
+ Added feature #282 that returns useful exit codes to the shell. Now a
script can detect whether no tasks were returned by a report (thanks to
Pietro Cerutti).
+ Fixed bug #287 that causes color control codes to be written to shadow
files (thanks to Richard Querin).
+ Fixed bug #289 which imported task from todo.sh without valid uuids
(thanks to Ben Jackson).
+ Fixed bug #291 which generated a false warning about an unrecognized
variable when enabling default.projects in .taskrc (thanks to Thomas@BIC).
+ Fixed bug #288 which failed to propagate rc file overrides on the command
line to the default command (thanks to Zach Frazier).
1.8.1 (8/20/2009) 35792e7874d2bb664abb1a0a67960b7fe7e0fccf
+ Fixed bug #231 that broke the build on OpenBSD 32-bit due to a time_t
and int collision (thanks to Pietro Cerutti).
+ Fixed bug #241 that prevented bash's tab-completion of projects in Fedora
11 and likely anything using bash-4 (thanks to John Florian).
+ Fixed bug #242 that sometimes causes the ID echoed after a task is added
to be incorrect (thanks to John Florian).
+ Fixed bug #245 that quoted date fields on export, that were subsequently
improperly parsed on import (thanks to John Florian).
+ Fixed bug #248 where single and double quotes are both stored as
ampersand-quot-semi (thanks to John Florian).
+ Fixed bug #249 that caused annotations with the same date to be lost after
a "task edit" command (thanks to Federico Hernandez).
+ Fixed bug #250 whereby rc.dateformat was not observed when parsing the
creation date of an annotation (thanks to Federico Hernandez).
+ Fixed bug #251 whereby the presence of annotations cause the .hasnt attribute
modifier to not work (thanks to John Florian).
+ Fixed bug #252 that prevented use of attribute modifiers on dates to effect
a range, such as "task ls due.after:eom due.before:eoy" (thanks to John
Florian).
+ Fixed bug #256 that allowed a recurring task with no due date.
+ Fixed bug #257 where an extant ~/.taskrc file prevented the override and
automatic creation of an alternate rc file (thanks to Zach Frazier).
+ Fixed bug #259 that cause a build failure on Snow Leopard 10a432.
+ Fixed bug #260 whereby the start, stop and delete commands did not complain
when filter arguments were specified, even though they were ignored
(thanks to T. Charles Yun).
+ Fixed bug that allowed a recurring task to be added without a due date.
+ Fixed bug that displays the wrong .taskrc file name on override (thanks to
Federico Hernandez).
+ Fixed bug that failed to suppress color control code in the header and footnote
when redirecting output to a file (thanks to John Florian).
1.8.0 (7/21/2009) 14977ef317bd004dae2f2c313e806af9f2a2140c
+ Added zsh tab completion script (thanks to P.C. Shyamshankar).
+ Fixed bug that cause the _forcecolor configuration variable to be
considered obsolete (thank to Bruce Dillahunty).
+ Fixed documentation errors (thanks to Thomas@BIC).
+ The 'weekstart' configuration variable now controls the 'calendar'
report (thanks to Federico Hernandez).
+ The 'displayweeknumber' configuration variable now controls the display
of week number in the 'calendar' report (thanks to Federico Hernandez).
+ Supports '--' argument to indicate that all subsequence arguments are
part of the description, despite what they otherwise might mean.
+ Removed support for the obsolete task file format 1 (never released).
+ Fixed bug that allowed blank annotations to be added (thanks to Bruce
Dillahunty).
+ Supports negative tag filters, so that (task list +foo -bar) now filters
tasks that have the "foo" tag, but do not have the "bar" tag (thanks to
Chris Pride).
+ Custom reports now support a more compact form of the "age" column,
called "age_compact" (thanks to T. Charles Yun).
+ Supports 'rc.name:value' for a command line override to .taskrc data
(thanks to Federico Hernandez).
+ Removed obsolete DEVELOPERS file. The online support forums at
http://taskwarrior.org will provide better information.
+ Fixed bug that kept some deleted tasks showing up on the calendar report
(thanks to Federico Hernandez).
+ Now asks the user to confirm large changes if configuration variable
'confirmation' is set to 'yes'. A large change is one that completely
replaces a task description, or operates on a large number of tasks,
which defaults to 4 but is configurable via the 'bulk' configuration
variable (thanks to John Florian).
+ Now echoes back the new task ID on 'add' (thanks to Bruce Dillahunty).
+ The new "shell" command provides an interactive shell for task. All
commands are supported (thanks to Bruce Dillahunty, Federico Hernandez,
and John Florian).
+ New "recurring" report to list all recurring tasks.
+ New, more flexible, more consistent, grep-able file format.
+ If task is renamed to "cal", or there is a symlink to task called "cal",
then task can act as a replacement for the Unix "cal" command.
+ Supports arguments to the cal command like "month year", "year", etc.
+ The "tags" report now shows the tag usage count.
+ The "projects" report now shows totals by project and priority.
+ Now supports attribute modifiers that allow much finer control over report
filtering, for example "task list due.before:friday", or "task list
pri.not:H" and many more.
+ Now supports new "age_compact" and "wait" custom report columns.
+ Now supports colorization of the header and footnote messages that are
printed before and after report output, with the 'color.header' and
'color.footnote' configuration variables.
+ Now supports the 'limit' attribute, to control the number of tasks that
are shown, for example: "task list limit:10".
+ Now supports a debug mode that can be used to generate helpful information
when reporting a problem. Just run the command with "task rc.debug:on ..."
and diagnostics will be generated that will help pinpoint a problem.
+ The new "undo" command replaces the old "undo" and "undelete" command
with a complete undo stack that can rollback all changes.
+ While waiting for a file lock, task states the reason for the delay.
+ Now supports a 'waiting' state that causes tasks to not appear until
a certain date, for example "task <ID> wait:<date>". The task
will then not show up on any report (except 'all') until that date.
+ The "active", "completed", "overdue" and "next" reports are now custom
reports, and therefore modifiable.
+ Now supports a 'waiting' custom report to list all waiting tasks.
+ Now supports a 'recurring' custom report to list all recurring tasks.
+ Now supports an 'all' report to list all tasks, including deleted
+ Supports command aliases - create an alias for any command by creating
a .taskrc entry like "alias.new_name=old_name".
and completed tasks.
+ Now over 1,600 unit tests, helping to maintain code quality.
1.7.1 (6/8/2009) 1422a15cbc470cff590bf06daad20d01fe1b05ef
+ Fixed build failure on OpenBSD (thanks to Mike Adonay).
+ Took the opportunity of a patch release to update the various email
addresses and URLs in the various documents.
1.7.0 (5/14/2009) f6b8b39d8b4a85c30a457e9e78b582b74531bfe4
+ Improved the errors when parsing a corrupt or unrecognized pending.data
or completed.data file (thanks to T. Charles Yun).
+ Added details to the "info" report about recurring tasks (thanks to T.
Charles Yun).
+ Now writes a sample "defaultwidth" configuration variable to the default
.taskrc file (thanks to T. Charles Yun).
+ Task allows commands that require an ID to now be given a sequence, which
is a set of IDs. This allows commands like "task delete 1 2 5-10,12".
+ Fixed bug in the ghistory report, which caused it to only show a new
month if a task was added during that month.
+ New command "duplicate" which allow existing task(s) to be duplicated,
and also have modifications applied (thanks to David J Patrick).
+ The "append", and "done" commands now allow modifications to be applied
to the task(s) (thanks to David J Patrick).
+ Improved word wrapping in various output.
+ Fixed bug that added an extra line between header and graph in the
ghistory report.
+ Added simple 'taskprogram' mailing list subscribe form to the web site.
+ For custom reports that define a "limit" to the number of rows of output
such as "oldest" and "newest", task allows an override value. For
example "task oldest 5" will display the 5 oldest tasks.
+ Modified the "stats" report so that it has the same aesthetics as the
other reports.
+ New "timesheet" command displays tasks completed and started, per week,
and can display multiple weeks.
+ New tab completion script, task_completion.sh, for bash users, is installed
to /usr/local/share/task (thanks to Federico Hernandez).
+ Applied patch to allow task to build on Arch Linux (thanks to Johan Friis).
+ Applied patch to fix a UUID bug on Solaris 8 (thanks to Steven de Brouwer).
+ The task and taskrc man pages are here. Try "man task", "man taskrc"
(thanks to Federico Hernandez and P.C. Shyamshankar).
+ Fixed bug that causes task to create a default .task directory, even if
data.location specified otherwise (thanks to Federico Hernandez).
+ New "edit" command that fires up a text editor (uses 'editor' configuration
variable, $VISUAL or $EDITOR environment variable) and allows direct
editing of all editable task details.
1.6.1 (4/24/2009) 1b6faf57c998617024d0348a87b941a5d2ab2249
+ Fixed bug that caused new, first-time .taskrc files to be written without
including the custom report labels (thanks to P.C. Shyamshankar).
1.6.0 (4/12/2009) 06062a96eb57d10dcd7fbe1edf968bb638a0b3a9
+ Added support for new "append" command that adds more description text to
an existing task.
+ Added support for the "weekdays" recurrence, which means a task can recur
five times a week, and not on weekends (thanks to Chris Pride).
+ UTF8 text is now supported in task project names, tags and descriptions.
+ Fixed bug that caused the y/n confirmation on task deletion to ignore the
Enter key and fail to re-prompt (thanks to Bruce Dillahunty).
+ When the "echo.command" configuration variable is set to "yes", it causes
commands that modify tasks to display which task was affected (thanks to
Bruce Dillahunty).
+ A task can now be annotated with the command "task <id> annotate ...", and
a timestamped annotation will appear in reports.
+ A 'description_only' column is now available for use in custom reports,
and it excludes annotations.
+ A task can now be upgraded to a recurring task by adding a recurrence
frequency, a due date, and an optional until date.
+ When a recurring task is modified, all other instances of the recurring
task are also modified.
+ Custom reports now support user-specified column labels (thanks to T.
Charles Yun).
+ Task can now import tasks from a variety of data formats, including task
export files from versions 1.4.3 and earlier, versions 1.5.0 and later,
todo.sh 2.x, CSV, plain text and task command line. See online docs for
full details.
+ Export was including 'id' in the column header even though it was not
included in the data.
+ The task file format has changed slightly. Please back up your task
data files before upgrading to 1.6.0.
+ Added new column 'recurrence_indicator' that displays an 'R' if the task
is a recurring task. This column can be added to any custom report.
+ Added new column 'tag_indicator' that displays a '+' if the task
has any tags. This column can be added to any custom report.
+ Fixed bug where sometimes a task description was concatenated oddly if
there was a colon somewhere in the description.
+ Fixed bug that caused recurring annual tasks to exhibit a creeping due
date, because of an assumption of 365 days per year, which failed to
consider leap years (thanks to T. Charles Yun).
+ Annotations can now be modified with the substitution commands /from/to/.
+ Substitutions can now be made global with /from/to/g and all occurrences
of "from" will be replaced with "to".
1.5.0 (3/15/2009) 87be68e2e83d7bb628be1e5679b16a49a26d3549
+ Removed deprecated TUTORIAL file.
+ Removed "showage" configuration variable.
+ "task stop" can now remove the start time from a started task.
+ "task ghistory" now displays a differently aligned graph, allowing
easier comparison by month of tasks added versus completed and deleted.
+ "task version" command now reports unrecognized configuration variables,
which may be spelling mistakes or deprecated variables.
+ "configure --enable-debug" now supported to suppress compiler optimization
to allow debugging.
+ Allow lower case priorities, and automatically upper case them.
+ Added support for "due" configuration variable which defines the number
of days in the future when a task is considered due.
+ Added support for custom reports, comprised of a set of column names and
sort order, with optional filtering in the configuration file. This
means user-defined reports can be written, and the reports currently
in the configuration file can be renamed. Several of task's built in
reports have been converted to user-defined reports.
+ New online documentation for custom reports.
+ New algorithm for determining when the "nag" message is displayed.
+ Fixed bug where task hangs with a certain combination of recurring tasks
and shadow files.
+ Fixed bug with the task sort algorithm, which led to an unstable sequence
when there were only a handful of tasks.
+ Performance enhanced by eliminating unnecessary sorting.
+ Task now has a large (and growing) test suite and bug regression tests
to help ensure higher quality releases.
+ Fixed bug that caused performance hit during table rendering.
+ Fixed bug that concatenated a modified description without spaces.
+ Added new column 'recur' that displays the recurrence period of any
recurring tasks. This column can be added to any custom report.
+ Added support for "color.recurring" configuration variable which
specifies the color of recurring tasks.
+ Added support for "locking" configuration variable that controls whether
file locking is used.
+ Task export feature now includes recurrence information, removes nested
quotes, and limits output to pending tasks.
+ Task no longer includes deleted tasks in the summary report (thanks to
Benjamin Tegarden).
+ Fixed bug that prevented the summary report from properly reporting
recently completed tasks.
1.4.3 (11/1/2008) 8639e9260646c8c9224e0fc47e5d2443b46eecfc
+ Fixed misleading task count at bottom on "info" report.
+ Added support for a shadow file that contains a plain text task report,
with the "shadow.file" and "shadow.command" configuration variables.
The shadow file is automatically updated whenever the task database
changes. Useful for integrating with "Samurize".
+ Task now displays a message whenever a shadow file is updated, if the
"shadow.notify" configuration variable is set "on".
+ Bug: adding a task with a \n, \r or \f in it now fails properly.
+ Removed "usage" command, and support for "command.logging" configuration
variable.
+ Added documentation for Shadow files.
+ Added documentation for task filters.
1.4.2 (9/18/2008) e7304e86ce9bb80978c7055fd2a9e999619a6fb8
+ "task undo" can now retract a "task done" command, provided no reports
have been run (and therefore TDB::gc run).
+ Task now correctly sorts on entire strings, instead of just the first
character (thanks to Andy Lester).
+ Task now uses dashes (-----) to column underlines when color is disabled
(thanks to Vincent Fleuranceau).
+ Task now allows mixed case attribute names (pri:, PRI:, Pri: ...) and
commands (add, ADD, Add ...) (thanks to Vincent Fleuranceau).
+ Task now supports a default project and priority for new tasks, via
the new "default.project" and "default.priority" configuration variables
(thanks to Vincent Fleuranceau).
+ Task supports improved word-wrapping to the terminal width.
+ Task now supports "default.command" configuration variable (for example
it could contain "list due:tomorrow") that is the command that is run
whenever task is invoked with no arguments.
+ Task supports modifying the existing description of a task, with the
following syntax: task <id> "new description ...".
+ Bug: Now properly supports relative dates in filters (task list due:eom,
task list due:tomorrow, task list due:23rd ...).
+ Bug: Source now properly includes <string.h> in order to build clean
using gcc 4.3 (thanks to H. İbrahim Güngör).
1.4.1 (7/18/2008) e080c3168c6064628ab85b21bd859d9875a3a9a7
+ Bug: Descriptions can not be altered with "task 123 New description".
+ Tweak: For "task calendar" month names are now centered over the month.
+ Removed TUTORIAL file contents in favor of online version.
+ Provided Mac .pkg binary.
1.4.0 (7/10/2008) 60b7d15a1d22e064acf0974c5d7eabbb57dd8071
+ New recurring tasks feature.
+ "task undelete" can now undelete erroneously deleted tasks, provided no
reports have been run (and therefore TDB::gc run).
+ Added averages to the "task history" report.
+ Added ability to override ~/.taskrc with rc:<file>.
+ Added bar chart history report "task ghistory".
+ Added task filtering on all reports.
+ Automatically shuts off color, curses when output is not a tty.
+ Supports relative due: dates (tomorrow, wednesday, 23rd, eom ...).
+ Supports the ~ character in .taskrc data.location.
+ Allows colons on the description, provided what is to the left of the colon
is not a standard attribute name.
+ Bug: Fixed where Esc[0m sequences were being emitted for no good reason.
+ Bug: Fixed underlined table headers when color is turned off.
+ Bug: Adding a blank priority resulted in an assigned garbage value.
+ Bug: Fixed parsing of date "07/08/2008" when using dateformat "m/d/Y".
1.3.1 (6/21/2008) 3a6de7d9402f2609a773a73b16eff97b14a32869
+ New configuration variable, "defaultwidth" that determines the width
of tables when ncurses support is not available
of tables when ncurses support is not available.
+ Bug: "showage" configuration variable should apply to all reports, not
just the ones based on "list"
just the ones based on "list".
+ Bug: Fixed segmentation faults on Ubuntu when the "dateformat"
configuration variables was missing. This was a code bug, and should
have affected more platforms
have affected more platforms.
+ Bug: Task now will recreate a missing ~/.taskrc file, OR a missing
~/.task directory
~/.task directory.
1.3.0 (6/18/2008)
1.3.0 (6/18/2008) 6673e408a223af98c38779c20b08524042c0edfa
+ "task calendar" now displays multiple months per line, adjustable by the
"monthsperline" configuration variable. Feature added by Damian Glenny
+ "task export" can now filter tasks like the reports
+ Factored out code to filter tasks
"monthsperline" configuration variable. Feature added by Damian Glenny.
+ "task export" can now filter tasks like the reports.
+ Factored out code to filter tasks.
+ Displays shorter message when a command is entered incorrectly, and the
full usage for "task help"
+ "task oldest" shows the oldest tasks
+ "task newest" shows the newest tasks
full usage for "task help".
+ "task oldest" shows the oldest tasks.
+ "task newest" shows the newest tasks.
+ Bug: Segmentation fault when no "dateformat" configuration variable
specified
specified.
+ Bug: Fixed bug whereby if you have more than one task with a due date, 7
days gets added to the entry date of task 2..n
+ Bug: Fixed bug whereby "1 wks" was being improperly pluralized
days gets added to the entry date of task 2..n.
+ Bug: Fixed bug whereby "1 wks" was being improperly pluralized.
1.2.0 (6/13/2008)
1.2.0 (6/13/2008) c393d47cdfe7e197a31e94f4bb764474fa05ad8d
+ Bug: "dateformat" configuration variable used to display dates, but
not parse them
not parse them.
+ "task list x" now performs a caseless comparison between "x" and the
description
+ Task sub projects supported
description.
+ Task sub projects supported.
+ "showage" confguration determines whether "Age" column appears on the
"list" and "next" reports
+ Improved TUTORIAL
"list" and "next" reports.
+ Improved TUTORIAL.
1.1.0 (6/7/2008)
1.1.0 (6/7/2008) 73286e86628725b346db2a25fbcd4bd68efb9b3a
+ "blanklines" configuration to stop displaying unnecessary white
space and thus work better on small-screen devices
+ "dateformat" configuration now determines how dates are formatted
+ Better formatting of "task tags" output
+ http://www.beckingham.net/task.html home page set up
+ Added tags to the "task long" report
space and thus work better on small-screen devices.
+ "dateformat" configuration now determines how dates are formatted.
+ Better formatting of "task tags" output.
+ http://www.beckingham.net/task.html home page set up.
+ Added tags to the "task long" report.
1.0.1 (6/4/2008)
1.0.1 (6/4/2008) d216d401217027d93581808fc8944ab7d6b85fb0
+ Bug: UUID generator not properly terminating string.
+ Bug: srandom/srand not called prior to UUID generation.
1.0.0 (6/3/2008)
+ New movie made, uploaded
+ Bug: assertion fails on mobile for t v
+ Bug: configure.ac does not properly determine ncurses availability
+ Bug: Cannot seem to use the percent character in a task description
+ Bug: New installation "task stats" reports newest task 12/31/1969
+ Bug: New installation task projects displays header but no data - should short-circuit
+ Bug: incorrect color specification in sample .taskrc file
+ Bug: when run without arguments, task dumps core on Solaris 10
+ "task calendar" now reports all months with due pending tasks
+ Added rules for colorization by tag, project and keyword
+ Added legend to "task calendar"
1.0.0 (6/3/2008) f3de5c07118c597091a05c7d7fe8bdeae95474c1
+ New movie made, uploaded.
+ Bug: assertion fails on mobile for t v.
+ Bug: configure.ac does not properly determine ncurses availability.
+ Bug: Cannot seem to use the percent character in a task description.
+ Bug: New installation "task stats" reports newest task 12/31/1969.
+ Bug: New installation task projects displays header but no data - should short-circuit.
+ Bug: incorrect color specification in sample .taskrc file.
+ Bug: when run without arguments, task dumps core on Solaris 10.
+ "task calendar" now reports all months with due pending tasks.
+ Added rules for colorization by tag, project and keyword.
+ Added legend to "task calendar".
0.9.9 (5/27/2008)
0.9.9 (5/27/2008) 2ecf50032226c91b406f247417a063dc17c8e324
+ Autoconf/automake behaving properly.
+ Clean build on OS X 10.5.
+ Clean build on Ubuntu 8.0.
+ Clean build on Fedora Core 8.
+ Clean build on Fedora Core 9.
0.9.8 (5/25/2008)
0.9.8 (5/25/2008) 18fd59a1edb20e5c68d086a97fae5fa9f6bb348a
+ Added "task color" command.
+ Removed unnecessary files.
+ Completed documentation.
0.9.7 (5/24/2008)
+ Migrated old compiler flags into Makefile.am
+ Added ncurses endwin function check to configure.ac
0.9.7 (5/24/2008) 25dc4150947a3e612c8118838d04b3bbe68441f7
+ Migrated old compiler flags into Makefile.am.
+ Added ncurses endwin function check to configure.ac.
+ Set up structure for AUTHORS file.
+ Set up NEWS file, with pleas for feedback.
+ Added welcome message to README.
@@ -113,35 +399,35 @@ represents a feature release, and the Z represents a patch.
+ Removed unnecessary SAMPLE_taskrc, and assorted references.
+ Cleaned up ChangeLog.
+ Minor mods to standard docs.
+ Bumped version to 0.9.7
+ Changed some autoconf details
+ Corrected comment in T.cpp
+ Bumped version to 0.9.7.
+ Changed some autoconf details.
+ Corrected comment in T.cpp.
+ Made unit tests compile and run again.
+ Removed tests from distibution.
0.9.6 (5/13/208)
+ Corrected wrong include file in Table.cpp
0.9.6 (5/13/2008)
+ Corrected wrong include file in Table.cpp.
+ Replaced color management code.
+ Improved color rules code.
0.9.5 (5/12/2008)
+ Replaced Table storage with Grid.
+ Added Grid.cpp to configure.ac
+ Added Makefile to src/.gitignore
+ Added Grid.cpp to configure.ac.
+ Added Makefile to src/.gitignore.
+ Makefile should not be part of the repository.
+ Added Grid.cpp
+ Added Grid::Cell::operator==
+ Added Grid.cpp.
+ Added Grid::Cell::operator==.
+ ChangeLog file begun.
+ Bumped version to 0.9.5 for next release.
0.9.4 (4/26/2008)
+ Integrated new Grid object into build - not yet integrated into Table.
+ More .gitignore tweaks.
+ Added .gitignore
+ Added .gitignore.
+ Added more missing files.
+ Added all source code.
+ Generic OSS files added.
+ Initial commit.
+ Initial commit on Github.
0.9.3 (4/6/2008)
+ Added "task completed" command.
@@ -152,74 +438,76 @@ represents a feature release, and the Z represents a patch.
+ "task" duplicated to "task_rel" for preparation of a fork.
0.9.1 (4/1/2008)
+ Blank attributes read are longer be written out.
+ Blank attributes read are no longer written out.
+ Completed "task export" command.
+ Added configuration values to "task version" command.
+ Consolidated header files, removed unnecessary ones.
0.9.0 (3/23/2008)
+ flat source directory
+ autoconf complete
+ "task next"
+ "task stats"
+ "task export"
+ Rules-based colorization
+ flat source directory.
+ autoconf complete.
+ "task next".
+ "task stats".
+ "task export".
+ Rules-based colorization.
0.8.1 (1/28/2008) - 0.8.16 (3/13/2008)
+ autoconf conversion (many builds)
+ autoconf conversion
0.8.0 Polish (1/25/2008)
+ Code cleanup, reorganization
+ "task overdue"
+ Add "age" column to list and long
+ Use 'conf' for build, version tracking
+ Add "/from/to/" description editing
+ Code cleanup, reorganization.
+ "task overdue".
+ Add "age" column to list and long.
+ Use 'conf' for build, version tracking.
+ Add "/from/to/" description editing.
0.7.0 Multi-user, File handling, atomicity (1/8/2008)
+ Clean, publishable API reimplementation
+ File locking
+ retain deleted tasks
+ "task info ID" report showing all metadata
+ File format v2
+ Clean, publishable API reimplementation.
+ File locking.
+ retain deleted tasks.
+ "task info ID" report showing all metadata.
+ File format v2, including UUID.
[Development hiatus while planning for T, TDB API, new features and the future
of the project. Seeded to two testers for feedback, suggestions.]
of the project. Seeded to two testers for feedback, suggestions. Development
deliberately stopped to allow extended use of task, allowing command logging and
regular usage to determine which features were needed or unnecessary.]
0.6.0 Reports (12/27/2006)
+ "task history"
+ "task summary"
+ "task calendar"
+ due support
+ Table sorting
+ "task history".
+ "task summary".
+ "task calendar".
+ due support.
+ Table sorting.
0.5.0 Multi-user support (12/10/2006)
+ Command logging
+ "task usage" report
+ Command logging.
+ "task usage" report.
0.4.0 Destructive / modification commands (12/3/2006)
+ "task delete" complete
+ "task id ..." complete
+ "task list ..." synonym for "task find ..."
+ "task delete" complete.
+ "task id ..." complete.
+ "task list ..." synonym for "task find ...".
0.3.0 Work in progress support (12/3/2006)
+ "task start" complete
+ "task done" complete
+ completed.data support
+ "task start" complete.
+ "task done" complete.
+ completed.data support.
0.2.0 Neutral commands (12/2/2006)
+ "task find" complete
+ "task projects" complete
+ "task tags" complete
+ "task find" complete.
+ "task projects" complete.
+ "task tags" complete.
0.1.0 Constructive commands (12/1/2006)
+ "task add" complete
+ completed.data support
+ ~/.taskrc support
+ "task add" complete.
+ completed.data support.
+ ~/.taskrc support.
0.0.1 Basic infrastructure (11/29/2006)
+ Command line parsing
+ API layer
+ Usage
+ Command line parsing.
+ API layer.
+ Usage.
------ start -----------------------------------

View File

@@ -1,22 +0,0 @@
Developers may wish to change task, and here is a high-level guide to the files
included.
task.{cpp,h} Implements main, high level processing.
command.cpp Implements all non-report task commands.
report.cpp Implements all task reports.
parse.cpp Parses the command line.
TDB.{cpp,h} The task database, performs all file I/O.
T.{cpp,h} Represents a single task - parses a record from TDB, and also
composes record for TDB. Provides accessors for tasks.
Grid.{cpp,h} Implements a sparse 2D array, provides data storage for the
Table object.
Table.{cpp,h} Implements tabular data rendering, wrapping etc.
Config.{cpp,h} Implements a reader for the .taskrc file.
Date.{cpp,h} General date class for the time_t type.
text.cpp Text manipulation functions.
util.cpp General utility functions.
color.cpp Color support functions.
rules.cpp Auto-colorization rules.
Don't forget, please send bugs, patches to task@beckingham.net

View File

@@ -1,3 +1,20 @@
SUBDIRS = src
EXTRA_DIST = TUTORIAL DEVELOPERS
dist_man_MANS = doc/man/task.1 doc/man/taskrc.5 doc/man/task-tutorial.5
docdir = $(datadir)/doc/${PACKAGE}-${VERSION}
doc_DATA = AUTHORS ChangeLog COPYING NEWS README
EXTRA_DIST = INSTALL
bashscriptsdir = $(docdir)
nobase_dist_bashscripts_DATA = scripts/bash/task_completion.sh
zshscriptsdir = $(docdir)
nobase_dist_zshscripts_DATA = scripts/zsh/_task
vimscriptsdir = $(docdir)
nobase_dist_vimscripts_DATA = scripts/vim/README scripts/vim/ftdetect/task.vim scripts/vim/syntax/taskdata.vim scripts/vim/syntax/taskedit.vim
i18ndir = $(docdir)
nobase_dist_i18n_DATA = i18n/strings.de-DE i18n/strings.en-US i18n/strings.es-ES i18n/strings.fr-FR i18n/strings.nl-NL i18n/strings.sv-SE i18n/tips.de-DE i18n/tips.en-US i18n/tips.sv-SE

53
NEWS
View File

@@ -1,31 +1,46 @@
Welcome to Task 1.4.0.
New Features in task 1.8
- Attribute modifiers, for precise queries
- Improved calendar feature
- Full undo capability
- All reports now customizable
- Command aliases can now be created
- In addition to being a standard part of Fedora 10 and 11 (yum install task),
task is now also a standard part of Cygwin 1.5
- There are new demo movies on taskwarrior.org
- Shell-friendly exit codes
Please refer to the ChangeLog file for full details. There are too many to
list here.
Task has been built and tested on the following configurations:
- OS X 10.4 Tiger
- OS X 10.5 Leopard
- Fedora Core 8
- Fedora Core 9
- Ubuntu 8 Hardy Heron
- Solaris 10
- Cygwin 1.5.25-14
- OS X 10.6 Snow Leopard and 10.5 Leopard
- Fedora 11 Leonidas and 10 Cambridge
- Ubuntu 9.04 Jaunty Jackalope and 8.10 Intrepid Ibex
- Slackware 12.2
- Arch Linux
- Gentoo Linux
- Solaris 10 and 8
- OpenBSD 4.5
- FreeBSD
- Cygwin 1.5
- Haiku R1/alpha1
While Task has undergone testing, bugs are sure to remain. If you encounter a
bug, please contact me at task@beckingham.net. Here is what you could do, in
order of increasing effort (to you) and usefulness (to me):
bug, please enter a new issue at:
- Do nothing. Bug probably won't get fixed.
http://taskwarrior.org/projects/taskwarrior/issues/new
- Send an email to task@beckingham.net, explaining what you saw. The bug
will be addressed, and a new release will be made. You will be a hero.
Or you can also report the issue in the forums at:
- Send an email, and a reproducible test case in the form of the few commands
it takes to recreate the problem. The bug will be addressed, and a new
release will be made. You will be a hero.
http://taskwarrior.org/projects/taskwarrior/boards
- If you are a developer, send a patch that fixes the problem. Your patch
will be applied and tested, and a new release will be made. You will be a
hero.
Or just send a message to:
support@taskwarrior.org
Thank you.
---

59
README
View File

@@ -1,55 +1,24 @@
Thank you for taking a look at task. Task is a GTD utility featuring:
- Robust C++ implementation
- Tags
- Colorful, tabular output
- Reports, graphs
- Lots of commands
- Low-level API
- Abbreviations for all commands, options
- Multi-user file locking
- Clean architecture allowing quick addition of new features
- Recurring tasks
Thank you for taking a look at task!
It is intended that features, mainly in the form of reports will be added
frequently, with best practices and useful reports evolving from usage patterns.
Task is a GTD, todo list, task management, command line utility with a multitude
of features. It is a portable, well supported, very active project, and it is
Open Source. Task has binary distributions, online documentation, demonstration
movies, and you'll find all the details at the site:
Task is scope-limited to GTD functionality only.
http://taskwarrior.org
You may want to jump straight to the TUTORIAL file, or perhaps watch the old
task movie on YouTube:
At the site you'll find a wiki, discussion forums, downloads, news and more.
http://www.youtube.com/watch?v=l68LCl6BYvs
or the new improved one:
Your contributions are especially welcome. Whether it comes in the form of
code patches, ideas, discussion, bug reports or just encouragement, your input
is needed.
http://www.youtube.com/watch?v=D2Kn4DMOVSw
Please send your support questions and code patches to:
Either will give you a fairly good idea of what task is capable of, and whether
it fits in to your way of working. As a command line application, task is not
for everyone and some of you may prefer to not proceed. The movie or TUTORIAL
file are the quickest way for you to make that decision.
support@taskwarrior.org
Please note that the TUTORIAL file included is deprecated, and will be removed
at the next major release of task. It is superceded by an HTML tutorial that
can be found at:
http://www.beckingham.net/task.html
Task is based on ideas presented in the todo.sh script, found on:
http://todotxt.org
Task has many more features than todo.sh, but fundamentally, they are both
working toward the same goals, which is to help you follow basic Getting Things
Done (GTD) principles.
All feedback is welcome, in addition to any bug reports or patches to:
task@beckingham.net
Got an idea for an enhancement? Send a message!
I have found that task makes me more productive and organized. I hope task can
do the same for you.
Consider joining taskwarrior.org and participating in the future of task.
---

835
TUTORIAL
View File

@@ -1,835 +0,0 @@
Task program tutorial, for version 1.4.0
----------------------------------------
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
This TUTORIAL file is deprecated, and does not contain all the new features in
release 1.4.0. It will not be included in future releases of task, and will be
superceded by a richer and more extensive online version that can be found at:
http://www.beckingham.net/task.html
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
This guide shows how to quickly set up the task program, and become proficient
with it.
Contents:
Quick Setup
Simple Usage
Advanced Usage
Interacting with the Shell
Configuring Task
Colors
Quick Setup
-----------
Build the task program according to the directions in the INSTALL file. This
transcript illustrates a typical installation:
% ls
task-1.4.0.tar.gz
% gunzip task-1.4.0.tar.gz
% tar xf task-1.4.0.tar
% cd task-1.4.0
% ./configure
...
% make
...
% make install # (may require sudo, depending on --prefix)
You need to make sure that the installed task program is in your PATH
environment variable.
Task reads a configuration file - called .taskrc in your home directory - and
stores pending and completed tasks in in a directory specified in the
configuration file.
The simplest way to get a configuration file and task directory is to run task.
On startup, task will check to see if it can find the configuration file and
task directory, and if not found, will ask you whether it may create both.
% task version
A configuration file could not be found in /Users/paul/.taskrc
Would you like a sample .taskrc created, so task can proceed? (y/n) y
Done.
[then task will show version information]
Simple Usage
------------
Let us begin by adding some tasks:
% task add Book plane ticket
% task add Rent a tux
% task add Reserve a rental car
% task add Reserve a hotel room
That's it. You'll notice immediately that task has a very minimalist
interface. Let us take a look at those tasks:
% task ls
ID Project Pri Description
1 Book plane ticket
2 Rent a tux
3 Reserve a rental car
4 Send John a birthday card
The 'ls' command provides the most minimal list of tasks. Each task has been
given an id number, and you can see that there are no projects or priorities
assigned. Wait a minute - I own a tux, I don't need to rent one. Let us delete
task 2:
% task 2 delete
Permanently delete task? (y/n) y
Task wants you to confirm deletions. To remove the confirmation, edit your
.taskrc file and change the line:
confirmation=yes
to have a value of "no".
While the use of projects and priorities are not essential to benefitting from
task, they can be very useful when the list of tasks grows large. Let's assign
a project to these tasks:
% task 1 project:Wedding
% task 3 project:Wedding
% task 4 project:Family
% task ls
ID Project Pri Description
3 Family Send John a birthday card
2 Wedding Reserve a rental car
1 Wedding Book plane ticket
Notice that the id numbers have changed. When tasks get deleted, or have their
attributes changed (project, for example), the ids are prone to change. But the
id numbers will remain valid until the next 'ls' command is run. You should
only use the ids from the most recent 'ls' command. The ids change, because
task is always trying to use small numbers so that it is easy for you to enter
them correctly.
Subprojects are supported. If you have a project "Wedding", you can specify
that a task is a subproject "Transport" of "Wedding" by assigning the project
"Wedding.Transport". Let's do this:
% task 2 project:Wedding.Transport
% task ls
ID Project Pri Description
3 Family Send John a birthday card
2 Wedding.Transport Reserve a rental car
1 Wedding Book plane ticket
Task matches the leftmost part of the project when searching, so projects
may be abbreviated:
% task ls project:Wedding.Tra
ID Project Pri Description
2 Wedding.Transport Reserve a rental car
This way of matching projects can be used to see all tasks under the
"Wedding" project and all subprojects:
% task ls project:Wedding
ID Project Pri Description
2 Wedding.Transport Reserve a rental car
1 Wedding Book plane ticket
Let's reassign 2 back to the "Wedding" project:
% task 2 project:Wedding
Now that projects are assigned, we can look at just the Wedding project tasks:
% task ls project:Wedding
ID Project Pri Description
1 Wedding Book plane ticket
2 Wedding Reserve a rental car
Any command arguments after the 'ls' are used for filtering the output. We
could also have requested:
% task ls ticket plane
ID Project Pri Description
1 Wedding Book plane ticket
Now let's prioritize. Priorities can be H, M or L (High, Medium, Low).
% task ls
ID Project Pri Description
3 Family Send John a birthday card
2 Wedding Reserve a rental car
1 Wedding Book plane ticket
% task 1 priority:H
% task 2 prior:M
% task 3 pr:H
Ambiguous attribute 'pr' - could be either of project, priority
% task 3 pri:H
% task ls
ID Project Pri Description
3 Family H Send John a birthday card
1 Wedding H Book plane ticket
2 Wedding M Reserve a rental car
Notice that task supports the abbreviation of words such as priority, project.
Priority can be abbreviated to pri, but not pr, because it is ambiguous. Now
that tasks have been prioritized, you can see that the tasks are being sorted
by priority, with the highest priority tasks at the top.
These attributes can all be provided when the task is added, instead of
applying them afterwards, as shown. The following command shows how to set all
the attributes at once:
% task add project:Wedding priority:H Book plane ticket
The 'ls' command provides the least information for each task. The 'list'
command provides more:
% task list
ID Project Pri Due Active Age Description
3 Family H 4 mins Send John a birthday card
1 Wedding H 5 mins Book plane ticket
2 Wedding M 5 mins Reserve a rental car
Notice that a task can have a due date, and can be active. The task lists are
sorted by due date, then priority. Let's add due dates:
% task 3 due:6/25/2008
% task 1 due:7/31/2008
% task list
ID Project Pri Due Active Age Description
3 Family H 6/25/2008 6 mins Send John a birthday card
1 Wedding H 7/31/2008 7 mins Book plane ticket
2 Wedding M 7 mins Reserve a rental car
If today's date is 6/23/2008, then task 3 is due in 2 days. It will be colored
yellow if your terminal supports color. To change this color, edit your
.taskrc file, and change the line to one of these alternatives:
color.due=red
color.due=on_blue
color.due=red on_blue
color.due=bold_red on_blue
Where color is one of the following:
black
blue
red
green
cyan
magenta
yellow
white
All colors are specified in this way. Take a look in .taskrc for all the other
color rules that you control.
Tagging tasks is a good way to group them, aside from specifying a project. To
add a tag to a task:
% task <id> +tag
The plus sign indicates that this is a tag. Any number of tags may be applied
to a task, and then used for searching. Tags are just single words that are
labels.
% task list
ID Project Pri Due Active Age Description
3 Family H 6/25/2008 8 mins Send John a birthday card
1 Wedding H 7/31/2008 9 mins Book plane ticket
2 Wedding M 9 mins Reserve a rental car
% task 1 +phone
% task 2 +phone
% task 3 +shopping
% task 3 +john
% task list +phone
ID Project Pri Due Active Age Description
1 Wedding H 7/31/2008 9 mins Book plane ticket
2 Wedding M 9 mins Reserve a rental car
To remove a tag from a task, use the minus sign:
% task 3 -john
Advanced Use
------------
Here are the other commands, in some detail. Note that the command:
% task
with no arguments will generate a help message that lists all these commands.
% task projects
---------------
This report generates a list of all the different projects that you are using
along with a count of the pending tasks for each project. For example:
% task projects
Project Tasks
Errands 1
Birthdays 3
Car 2
% task summary
--------------
This report lists all the projects and a summary of their task status.
% task summary
Project Remaining Avg age Complete 0% 100%
Errands 1 3 days 50% XXXXXXXXXXXXXXXX
Birthdays 3 7 mths 0%
Car 2 2 wks 25% XXXXXXXXX
This shows the project, the remaining tasks, the average age of each task,
the percentage completed (remaining vs total) and a bar indicating that
percentage.
% task delete <id>
------------------
There are two ways of getting rid of tasks - mark them as done, or delete
them.
% task undelete <id>
--------------------
If a task was inadvertently deleted, it may be undeleted, provided that no
reports have been run since the deletion. Ideally, the undelete command is
run immediately after the erroneous delete command.
If a report is run (such as "task list"), then task performs a garbage
collection that removes deleted tasks, and the task cannot be undeleted.
% task done <id>
----------------
This is how a task is marked as done.
% task list ...
---------------
The list report will show the active status, and age of the task in addition
to the columns that "task ls" shows. It is just a more detailed list.
% task long ...
---------------
The long report will show the entry date and start date of a task, in
addition to the columns that the "task list" shows.
% task start <id>
-----------------
This marks a task as started (and therefore active), which is shown in the
"list" report:
% task list
ID Project Pri Due Active Age Description
12 Errand L Remember to deposit check
...
% task start 12
% task list
ID Project Pri Due Active Age Description
12 Errand L * 3 days Remember to deposit check
...
% task active
-------------
Shows all active tasks, that is, the tasks for which the "task start ..."
command was run, as shown above.
% task overdue
--------------
Simply lists all the task that have a due date that is past, in "list"
format.
% task oldest
-------------
Lists the oldest tasks. Shows 10 tasks by default, but can be set via the
"oldest" configuration variable.
% task newest
-------------
Lists the newest tasks. Shows 10 tasks by default, but can be set via the
"newest" configuration variable.
% task history
--------------
This report shows you an overview of how many tasks were added, completed and
deleted, by month. It looks like this:
% task history
Year Month Added Completed Deleted Net
2008 March 21 16 0 5
April 13 11 1 1
May 8 14 3 -9
Average 14 13 1 -1
This shows that for the three months that task has been used, March and April
saw the total number of tasks increase, but in May the number decreased as
more task were completed than added.
% task ghistory
--------------
This report shows you an overview of how many tasks were added, completed and
deleted, by month, as does "task history", but as a bar chart. It looks like this:
% task history
Year Month Added/Completed/Deleted
2008 March +++++++++++++++++++++XXXXXXXXXXXXXXXX
April +++++++++++++XXXXXXXXXXX-
May ++++++++XXXXXXXXXXXXXX---
With color enabled, the bars contain the size of each bar.
% task calendar
---------------
This report shows a calendar of the current month, with any task due or
overdue dates marked on it. Color is used to mark these dates.
% task calendar
May 2008
Su Mo Tu We Th Fr Sa
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
% task next
-----------
This report shows you the tasks you should probable work on next. Task will
scan all the tasks and will pick two task from each project to report. Those
two tasks will be chosen in order of overdue, due soon, High, Medium or Low
priority. Essentially task chooses the two most important task for each
project and displays them ordered in the usual way.
If you wish to show a different number of tasks per project, modify the entry
in .taskrc:
next=2
To be your preferred number.
% task <id> ...
---------------
When a task id is specified, everything applies to just that task. Suppose
we needed to correct a task:
% task ls
ID Project Pri Description
12 Errand L Remember to deposit chekc
...
% task 12 Remember to deposit bonus check
% task ls
ID Project Pri Description
12 Errand L Remember to deposit bonus check
...
% task /from/to/
----------------
If a task has been entered with a typo, it can be easily corrected by this
command. For example:
% task ls
ID Project Pri Description
12 Errand L Remember to deposit chekc
...
% task 12 /chekc/check/
% task ls
ID Project Pri Description
12 Errand L Remember to deposit check
...
This command makes single corrections to a task description.
% task tags
-----------
This command will generate a list of all the tags that are currently in use
by task.
% task info <id>
----------------
This command gives detailed information about a single task. It will tell
you when the task was entered, when started, its status, tags, and more.
% task stats
------------
This command generates a list of statistics about your task usage, such as
the average time it takes to complete a task, how often new tasks are added,
and more.
% task completed
----------------
This generates a list of all tasks that have been completed, sorted by their
completion date.
% task export <file name>
-------------------------
This instructs task to write out a CSV format dump of all tasks, both pending
and completed, to the file specified. This is how you might view tasks in a
spreadsheet.
% task colors
-------------
This command displays all the colors that task supports.
% task usage
------------
If logging has been enabled by the "command.logging=on" directive in the
.taskrc file, then task will record every command that is run. When this
command is run, task will display a count of how many times each command was
used.
This command is for the purpose of seeing whether command are actually used.
% task version
--------------
This can be used to show the version number of task, and to display all the
current configuration settings, as read from the .taskrc file.
% task <id> fg:... bg:...
-------------------------
Not strictly a command, the setting of the fg and bg (foreground and
background) attributes determines the colors used to represent the task.
Valid foreground colors are:
bold underline bold_underline
black bold_black underline_black bold_underline_black
red bold_red underline_red bold_underline_red
green bold_green underline_green bold_underline_green
yellow bold_yellow underline_yellow bold_underline_yellow
blue bold_blue underline_blue bold_underline_blue
magenta bold_magenta underline_magenta bold_underline_magenta
cyan bold_cyan underline_cyan bold_underline_cyan
white bold_white underline_white bold_underline_white
Valid background colors are:
on_black on_bright_black
on_red on_bright_red
on_green on_bright_green
on_yellow on_bright_yellow
on_blue on_bright_blue
on_magenta on_bright_magenta
on_cyan on_bright_cyan
on_white on_bright_white
Note that these are not just colors, but combinations of colors and
attributes.
Note also that this capability does depend on whether your terminal program
can display these colors.
% task rc:<file> ...
--------------------
By specifying rc:<file>, it is possible to force task to use an alternate
.taskrc file. By default, task looks in your home directory, so these two
commands are essentially identical:
% task list
% task rc:~/.taskrc list
What this override allows, is the possibility of keeping your task lists
completely separate, say for work and home. This can be accomplished with
the following commands (valid for bash):
% alias htask="task rc:/home/me/.taskrc_home"
% alias wtask="task rc:/home/me/.taskrc_work"
% htask list
...
% wtask list
...
Interacting with the Shell
--------------------------
Certain characters are interpreted by the shell. For example, the "&". If
you wish to include the & in a task description, you need to escape it, so
the shell doesn't interpret it. For example:
% task add Buy bread & milk
This command is an error because of the &. The shell will consider this to
be two commands:
% task add Buy bread &
% milk
The shell treats the & character as an indicator that the command is complete
and should be run in the background. Then the shell considers "milk" to be a
command all by itself. Which it is not. One way to get around this is to
individually escape the & character:
% task add Buy bread \& milk
Another is to quote the entire description, with either ' or " characters:
% task add "Buy bread & milk"
Task itself interprets the commands, and it too can make mistakes. For
example, any colon : character will be interpreted by task as a delimiter
between an attribute name and its value. Currently there is no workaround
for this.
Configuring Task
----------------
Task recognizes several entries in the .taskrc file for configuration
purposes. Valid entries are of the form:
name=value
Valid examples are:
data.location This is a path to the directory containing all the task
files. By default, it is set up to be ~/.task, for
example: /Users/paul/.task
command.logging May be "on" or "off", defaulting to "off". This
determines whether task records commands. This is not
generally useful, except while developing task.
confirmation May be "yes" or "no", and determines whether task will
ask for confirmation before deleting a task.
nag This may be a string of text, or blank. It is used as
a prompt when a task is completed that is not considered
high priority. The "task next" command lists important
tasks, and completing one of those does not generate
this nagging. Default value is:
Note: try to stick to high priority tasks.
See "task next".
next Is a number, defaulting to 2, which is the number of
tasks for each project that are shown in the "task next"
command.
curses Determines whether task uses ncurses to establish the
size of the window you are using, for text wrapping.
blanklines May be "on" or "off". Prevents the display of
unnecessary blank lines so that task makes better use
screen real estate on small-screened devices.
dateformat This is a string of characters that define how task
formats dates. The default value is:
m/d/Y
which means dates look like:
6/7/2008
The string should contain the characters:
m minimal-digit month 1, 12
d minimal-digit day 1, 30
y two-digit year 08
M two-digit month 01, 12
D two-digit day 01, 30
Y four-digit year 2008
The string may also contain other characters to act as
spacers, or formatting. Other values could include
(but are not limited to):
d/m/Y 7/6/2008
YMD 20080607
m-d-y 6-7-08
showage May be "yes" or "no". Determines whether the "Age"
column appears on the "list" and "next" reports.
monthsperline Determines how many months the "task calendar" command
renders across the screen. Defaults to 1.
oldest Determines how many tasks are shown on the "oldest"
report. Defaults to 10.
newest Determines how many tasks are shown on the "newest"
report. Defaults to 10.
defaultwidth The width of tables used when ncurses support is not
available. Defaults to 80.
color May be "on" or "off". Determines whether task uses
color.
color.overdue These are the coloration rules. They correspond to a
color.due particular attribute of a task, such as it being due, or
color.pri.H being active, and specifies the automatic coloring of
color.pri.M that task.
color.pri.L
color.pri.none The value may be one optional foreground color (see
color.active below) and one optional background color.
color.tagged
For example, the value may be:
bold_red on_bright_yellow
color.tag.X Colors any task that has the tag X.
color.project.X Colors any task assigned to project X.
color.keyword.X Colors any task where the description contains X.
Colors
------
Task supports color in several places. In cases where you may specify a
color, a foreground, a background, or a combination foreground and background
color may be used. The following are valid foreground colors:
bold underline bold_underline
black bold_black underline_black bold_underline_black
red bold_red underline_red bold_underline_red
green bold_green underline_green bold_underline_green
yellow bold_yellow underline_yellow bold_underline_yellow
blue bold_blue underline_blue bold_underline_blue
magenta bold_magenta underline_magenta bold_underline_magenta
cyan bold_cyan underline_cyan bold_underline_cyan
white bold_white underline_white bold_underline_white
and the following are valid background colors:
on_black on_bright_black
on_red on_bright_red
on_green on_bright_green
on_yellow on_bright_yellow
on_blue on_bright_blue
on_magenta on_bright_magenta
on_cyan on_bright_cyan
on_white on_bright_white

View File

@@ -1,36 +0,0 @@
Some considerable time ago - longer than I had hoped - I demonstrated an
alternate implementation of the todo script, called task, in the form of a
YouTube movie:
http://www.youtube.com/watch?v=l68LCl6BYvs
A lot has happened since then, and the task program has been slowly improving
thanks to feedback from some early testers, and continuous use by me. Today,
I have uploaded a new movie:
http://www.youtube.com/watch?v=D2Kn4DMOVSw
This movie includes most of the changes and improvements to task, but behind
the scenes are the biggest changes. There was a rewrite of the underlying
storage mechanism yielding a clean API for the front end, and the code was
reviewed for portability and converted to use GNU autoconf/automake.
Task has been released under GPL, and so far has been tested on:
Max OS X 10.4 (Tiger)
Max OS X 10.5 (Leopard)
Fedora 8
Fedora 9
Ubuntu 8 (Hardy Heron)
Solaris 10
Task has been making me more organized and productive for some time now.
Perhaps some of you might find it useful, and I welcome feedback of all kinds.
You can find the task source code at:
http://www.beckingham.net/task-1.0.0.tar.gz
Thank you.
Paul Beckingham

View File

@@ -2,9 +2,38 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(task, 1.4.0, bugs@beckingham.net)
AC_INIT(task, 1.8.3, support@taskwarrior.org)
CFLAGS="${CFLAGS=}"
CXXFLAGS="${CXXFLAGS=}"
# this macro is used to get the arguments supplied
# to the configure script (./configure --enable-debug)
# Check if we have enable debug support.
AC_MSG_CHECKING(whether to enable debugging)
debug_default="no"
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging
[default=$debug_default]],, enable_debug=$debug_default)
# Yes, shell scripts can be used
if test "$enable_debug" = "yes"; then
CXXFLAGS="$CFLAGS -Wall -pedantic -ggdb3 -DDEBUG"
AC_MSG_RESULT(yes)
else
CXXFLAGS="$CFLAGS -Wall -pedantic -O3"
AC_MSG_RESULT(no)
fi
# Check for OS.
OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
if test "$OS" = "sunos"; then
AC_MSG_NOTICE([OS Solaris detected])
AC_DEFINE([SOLARIS], [], [Compiling on Solaris])
else
AC_MSG_NOTICE([OS Non-Solaris detected])
AC_DEFINE([LINUX], [], [Compiling on Non-Solaris])
fi
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/task.cpp])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADER([auto.h])
# Checks for programs.
@@ -12,14 +41,15 @@ AC_PROG_CXX
AC_PROG_CC
AC_LANG(C++)
AC_SUBST(CFLAGS)
# Checks for libraries.
AC_CHECK_LIB(ncurses,initscr)
AC_CHECK_LIB(ncurses,endwin)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h sys/file.h sys/stat.h sys/time.h unistd.h])
AC_CHECK_HEADERS([string vector map])
AC_CHECK_HEADERS([sstream string vector map])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
@@ -33,10 +63,11 @@ AC_STRUCT_TM
AC_FUNC_MKTIME
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([select])
AC_CHECK_FUNC(flock, [AC_DEFINE([HAVE_FLOCK], [1], [Found flock])])
#AC_CHECK_FUNC(flock, [AC_DEFINE([HAVE_FLOCK], [1], [Found flock])])
AC_CHECK_FUNC(uuid_unparse_lower, [AC_DEFINE([HAVE_UUID], [1], [Found uuid_unparse_lower])])
AC_CHECK_FUNC(random, [AC_DEFINE([HAVE_RANDOM], [1], [Found random])])
AC_CHECK_FUNC(srandom, [AC_DEFINE([HAVE_SRANDOM], [1], [Found srandom])])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT

394
doc/man/task-tutorial.5 Normal file
View File

@@ -0,0 +1,394 @@
.TH task-tutorial 5 2009-10-21 "task 1.8.3" "User Manuals"
.SH NAME
task-tutorial \- A tutorial for the task(1) command line todo manager.
.SH DESCRIPTION
Task is a command line TODO list manager. It maintains a list of tasks that you
want to do, allowing you to add/remove, and otherwise manipulate them. Task
has a rich list of subcommands that allow you to do various things with it.
.SH 30 second tutorial
For the excessively lazy. Add two tasks:
.br
.RS
$ task add Read task documents later
.br
$ task add priority:H Pay bills
.RE
Easy. See that second one has a High priority? Now let's look at those tasks:
.br
.RS
$ task ls
.br
ID Project Pri Description
.br
2 H Pay bills
.br
1 Read task documents later
.RE
They are ordered by priority. Let's mark number 2 as done:
.br
.RS
$ task 2 done
.br
$ task ls
.br
ID Project Pri Description
.br
1 Read task documents later
.RE
Gone. Now let's delete that remaining task, because, well, why bother
now we are already using task:
.br
.RS
$ task delete 1
.br
$ task ls
.br
No matches
.RE
Easy. But now consider checking out what task can really do...
.SH Simple usage of task
Let us begin by adding some tasks:
.br
.RS
$ task add Book plane ticket
.br
$ task add Rent a tux
.br
$ task add Reserve a rental car
.br
$ task add Reserve a hotel room
.RE
That's it. You'll notice immediately that task has a very minimalist
interface. Let us take a look at those tasks:
.br
.RS
$ task ls
.br
ID Project Pri Description
.br
1 Book plane ticket
.br
2 Rent a tux
.br
3 Reserve a rental car
.br
4 Send John a birthday card
.RE
The 'ls' command provides the most minimal list of tasks. Each task has
been given an id number, and you can see that there are no projects or
priorities assigned. Wait a minute - I own a tux, I don't need to rent
one. Let us delete task 2:
.br
.RS
$ task 2 delete
.br
Permanently delete task? (y/n) y
.RE
Task wants you to confirm deletions. To remove the confirmation, edit
your .taskrc file and change the line:
.br
.RS
confirmation=yes
.RE
.br
to have a value of "no".
While the use of projects and priorities are not essential to benefiting
from task, they can be very useful when the list of tasks grows large.
Let's assign a project to these tasks:
.br
.RS
$ task 1 project:Wedding
.br
$ task 3 project:Wedding
.br
$ task 4 project:Family
.br
$ task ls
.br
ID Project Pri Description
.br
3 Family Send John a birthday card
.br
2 Wedding Reserve a rental car
.br
1 Wedding Book plane ticket
.RE
Notice that the id numbers have changed. When tasks get deleted, or have
their attributes changed (project, for example), the ids are prone to change.
But the id numbers will remain valid until the next 'ls' command is run.
You should only use the ids from the most recent 'ls' command. The ids change,
because task is always trying to use small numbers so that it is easy for you
to enter them correctly. Now that projects are assigned, we can look at just
the Wedding project tasks:
Subprojects are supported. If you have a project "Wedding", you can specify
that a task is a subproject "Transport" of "Wedding" by assigning the project
"Wedding.Transport". Let's do this:
.br
.RS
$ task 2 project:Wedding.Transport
.br
$ task ls
.br
ID Project Pri Description
.br
3 Family Send John a birthday card
.br
2 Wedding.Transport Reserve a rental car
.br
1 Wedding Book plane ticket
.RE
Task matches the leftmost part of the project when searching, so projects may
be abbreviated:
.br
.RS
$ task ls project:Wedding.Tra
.br
ID Project Pri Description
.br
2 Wedding.Transport Reserve a rental car
.RE
This way of matching projects can be used to see all tasks under the "Wedding"
project and all subprojects:
.br
.RS
$ task ls project:Wedding
.br
ID Project Pri Description
.br
2 Wedding.Transport Reserve a rental car
.br
1 Wedding Book plane ticket
.RE
Let's reassign 2 back to the "Wedding" project:
.br
.RS
$ task 2 project:Wedding
.RE
Now that projects are assigned, we can look at just the Wedding project tasks:
.br
.RS
$ task ls project:Wedding
.br
ID Project Pri Description
.br
1 Wedding Book plane ticket
.br
2 Wedding Reserve a rental car
.RE
Any command arguments after the 'ls' are used for filtering the output.
We could also have requested:
.br
.RS
$ task ls ticket plane
.br
ID Project Pri Description
.br
1 Wedding Book plane ticket
.RE
Now let's prioritize. Priorities can be H, M or L (High, Medium, Low).
.br
.RS
$ task ls
.br
ID Project Pri Description
.br
3 Family Send John a birthday card
.br
2 Wedding Reserve a rental car
.br
1 Wedding Book plane ticket
.br
$ task 1 priority:H
.br
$ task 2 prior:M
.br
$ task 3 pr:H
.br
Ambiguous attribute 'pr' - could be either of project, priority
.br
$ task 3 pri:H
.br
$ task ls
.br
ID Project Pri Description
.br
3 Family H Send John a birthday card
.br
1 Wedding H Book plane ticket
.br
2 Wedding M Reserve a rental car
.RE
Notice that task supports the abbreviation of words such as priority,
project. Priority can be abbreviated to pri, but not pr, because it
is ambiguous. Now that tasks have been prioritized, you can see that
the tasks are being sorted by priority, with the highest priority
tasks at the top.
These attributes can all be provided when the task is added, instead of
applying them afterwards, as shown. The following command shows how to
set all the attributes at once:
.br
.RS
$ task add project:Wedding priority:H Book plane ticket
.RE
The 'ls' command provides the least information for each task. The 'list'
command provides more:
.br
.RS
$ task list
.br
ID Project Pri Due Active Age Description
.br
3 Family H 4 mins Send John a birthday card
.br
1 Wedding H 5 mins Book plane ticket
.br
2 Wedding M 5 mins Reserve a rental car
.RE
Notice that a task can have a due date, and can be active. The task lists are
sorted by due date, then priority. Let's add due dates:
.br
.RS
$ task 3 due:6/25/2008
.br
$ task 1 due:7/31/2008
.br
$ task list
.br
ID Project Pri Due Active Age Description
.br
3 Family H 6/25/2008 6 mins Send John a birthday card
.br
1 Wedding H 7/31/2008 7 mins Book plane ticket
.br
2 Wedding M 7 mins Reserve a rental car
.RE
If today's date is 6/23/2008, then task 3 is due in 2 days. It will be colored
yellow if your terminal supports color. To change this color, edit your .taskrc
file, and change the line to one of these alternatives:
.br
.RS
color.due=red
.br
color.due=on_blue
.br
color.due=red on_blue
.br
color.due=bold_red on_blue
.RE
Where color is one of the following:
.br
.RS
black, blue, red, green, cyan, magenta, yellow or white
.RE
All colors are specified in this way. Take a look in .taskrc for all the other
color rules that you control.
Tagging tasks is a good way to group them, aside from specifying a project.
To add a tag to a task:
.br
.RS
$ task <id> +tag
.RE
The plus sign indicates that this is a tag. Any number of tags may be applied to a
task, and then used for searching. Tags are just single words that are labels.
.br
.RS
$ task list
.br
ID Project Pri Due Active Age Description
.br
3 Family H 6/25/2008 8 mins Send John a birthday card
.br
1 Wedding H 7/31/2008 9 mins Book plane ticket
.br
2 Wedding M 9 mins Reserve a rental car
.br
$ task 1 +phone
.br
$ task 2 +phone
.br
$ task 3 +shopping
.br
$ task 3 +john
.br
$ task list +phone
.br
ID Project Pri Due Active Age Description
.br
1 Wedding H 7/31/2008 9 mins Book plane ticket
.br
2 Wedding M 9 mins Reserve a rental car
.RE
To remove a tag from a task, use the minus sign:
.br
.RS
$ task 3 \-john
.RE
.SH Advanced usage of task
Advanced examples of the usage of task can be found at
the official site at <http://taskwarrior.org>
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
.br
Copyright (C) 2006 \- 2009 P. Beckingham
This man page was originally written by Federico Hernandez.
task is distributed under the GNU General Public License. See
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
.SH SEE ALSO
.BR task(1),
.BR taskrc(5)
For more information regarding task, the following may be referenced:
.TP
The official site at
<http://taskwarrior.org>
.TP
The official code repository at
<http://github.com/pbeckingham/task/>
.TP
You can contact the project by writing an email to
<support@taskwarrior.org>
.SH REPORTING BUGS
.TP
Bugs in task may be reported to the issue-tracker at
<http://taskwarrior.org>

469
doc/man/task.1 Normal file
View File

@@ -0,0 +1,469 @@
.TH task 1 2009-10-21 "task 1.8.3" "User Manuals"
.SH NAME
task \- A command line todo manager.
.SH SYNOPSIS
.B task [subcommand] [args]
.SH DESCRIPTION
Task is a command line todo list manager. It maintains a list of tasks that you
want to do, allowing you to add/remove, and otherwise manipulate them. Task
has a rich list of subcommands that allow you to do various things with it.
.SH SUBCOMMANDS
.TP
.B add [tags] [attrs] description
Adds a new task to the task list.
.TP
.B append [tags] [attrs] description
Appends more information to an existing
task.
.TP
.B annotate ID description
Adds an annotation to an existing task.
.TP
.B ID [tags] [attrs] [description]
Modifies the existing task with provided information.
.TP
.B ID /from/to/
Performs one substitution on task description and annotation for fixing mistakes.
.TP
.B ID /from/to/g
Performs all substitutions on task description and annotation for fixing mistakes.
.TP
.B edit ID
Launches an editor to let you modify all aspects of a task directly.
Use carefully.
.TP
.B undo
Reverts the most recent action.
.TP
.B shell
Launches an interactive shell with all the task commands available.
.TP
.B duplicate ID [tags] [attrs] [description]
Duplicates the specified task and allows modifications.
.TP
.B delete ID
Deletes the specified task from task list.
.TP
.B info ID
Shows all data and metadata for the specified task.
.TP
.B start ID
Marks the specified task as started.
.TP
.B stop ID
Removes the
.I start
time from the specified task.
.TP
.B done ID [tags] [attrs] [description]
Marks the specified task as done.
.TP
.B projects
Lists all project names used, and the number of tasks for each.
.TP
.B tags
Show a list of all tags used.
.TP
.B summary
Shows a report of task status by project.
.TP
.B timesheet [weeks]
Shows a weekly report of tasks completed and started.
.TP
.B history
Shows a report of task history by month.
.TP
.B ghistory
Shows a graphical report of task status by month.
.TP
.B calendar [ y | due [y] | month year [y] | year ]
Shows a monthly calendar with due tasks marked.
.TP
.B stats
Shows task database statistics.
.TP
.B import \fIfile
Imports tasks from a variety of formats.
.TP
.B export \fIfile
Exports all tasks as a CSV file.
.TP
.B color
Displays all possible colors.
.TP
.B version
Shows the task version number and current settings in the task configuration
file.
.TP
.B help
Shows the long usage text.
.SH REPORT SUBCOMMANDS
A report is a listing of information from the task database. There are several
reports currently predefined in task. The output and sort behavior of these
reports can be configured in the configuration file. See also the man page taskrc(5).
.TP
.B active [tags] [attrs] [description]
Shows all tasks matching the specified criteria
that are started but not completed.
.TP
.B all [tags] [attrs] [description]
Shows all tasks matching the specified criteria.
.TP
.B completed [tags] [attrs] [description]
Shows all tasks matching the specified criteria
that are completed.
.TP
.B ls [tags] [attrs] [description]
Provides a minimal listing of tasks with specified criteria.
.TP
.B list [tags] [attrs] [description]
Provides a more detailed listing of tasks with specified criteria.
.TP
.B long [tags] [attrs] [description]
Provides the most detailed listing of tasks with specified criteria.
.TP
.B newest [tags] [attrs] [description]
Shows the newest tasks with specified criteria.
.TP
.B oldest [tags] [attrs] [description]
Shows the oldest tasks with specified criteria
.TP
.B overdue [tags] [attrs] [description]
Shows all incomplete tasks matching the specified criteria
that are beyond their due date.
.TP
.B recurring [tags] [attrs] [description]
Shows all recurring tasks matching the specified criteria.
.TP
.B waiting [tags] [attrs] [description]
Shows all waiting tasks matching the specified criteria.
.TP
.B next [tags] [attrs] [description]
Shows all tasks with upcoming due dates matching the specified criteria.
.SH ATTRIBUTES AND METADATA
.TP
.B ID
Tasks can be specified uniquely by IDs, which are simply the index of the
task in a report. Be careful, as the IDs of tasks may change after a
modification to the database. Always run a report to check you have the right
ID for a task. IDs can be given to task as a sequences, for example,
.br
.B
task del 1,4-10,19
.TP
.B +tag|-tag
Tags are arbitrary words associated with a task. Use + to add a tag and - to
remove a tag from a task. A task can have any quantity of tags
.TP
.B project:<project-name>
Specifies the project to which a task is related to.
.TP
.B priority:H|M|L|N
Specifies High, Medium, Low and No priority for a task.
.TP
.B due:<due-date>
Specifies the due-date of a task.
.TP
.B recur:<frequency>
Specifies the frequency of a recurrence of a task.
.TP
.B until:<end-date-of-recurrence>
Specifies the Recurrence end-date of a task.
.TP
.B fg:<color-spec>
Specifies foreground color.
.TP
.B bg:<color-spec>
Specifies background color.
.TP
.B limit:<number-of-rows>
Specifies the desired number of rows a report should have.
.TP
.B wait:<wait-date>
Date until task becomes pending.
.SH ATTRIBUTE MODIFIERS
Attribute modifiers improve filters. Supported modifiers are:
.RS
.B before (synonyms under, below)
.br
.B after (synonyms over, above)
.br
.B none
.br
.B any
.br
.B is (synonym equals)
.br
.B isnt (synonym not)
.br
.B has (synonym contain)
.br
.B hasnt
.br
.B startswith (synonym left)
.br
.B endswith (synonym right)
.RE
For example:
.RS
task list due.before:eom priority.not:L
.RE
.SH SPECIFYING DATES AND FREQUENCIES
.SS DATES
Task reads dates from the command line and displays dates in the
reports. The expected and desired date format is determined by the
configuration variable
.I dateformat
in the task configuration file.
.RS
.TP
Exact specification
task ... due:7/14/2008
.TP
Relative wording
task ... due:today
.br
task ... due:yesterday
.br
task ... due:tomorrow
.TP
Day number with ordinal
task ... due:23rd
.TP
End of week (Friday), month and year
task ... due:eow
.br
task ... due:eom
.br
task ... due:eoy
.TP
Next occurring weekday
task ... due:fri
.RE
.SS FREQUENCIES
Recurrence periods. Task supports several ways of specifying the
.I frequency
of recurring tasks.
.RS
.TP
daily, day, 1d, 2d, ...
Every day or a number of days.
.TP
weekdays
Mondays, Tuesdays, Wednesdays, Thursdays, Fridays and skipping weekend days.
.TP
weekly, 1w, 2w, ...
Every week or a number of weeks.
.TP
biweekly, fortnight
Every two weeks.
.TP
quarterly, 1q, 2q, ...
Every three months, a quarter, or a number of quarters.
.TP
semiannual
Every six months.
.TP
annual, yearly, 1y, 2y, ...
Every year or a number of years.
.TP
biannual, biyearly, 2y
Every two years.
.RE
.SH COMMAND ABBREVIATION
All task commands may be abbreviated as long as a unique prefix is used. E.g.
.RS
$ task li
.RE
is an unambiguous abbreviation for
.RS
$ task list
.RE
but
.RS
$ task l
.RE
could be list, ls or long.
.SH SPECIFYING DESCRIPTIONS
Some task descriptions need to be escaped because of the shell
and the special meaning of some characters to the shell. This can be
done either by adding quotes to the description or escaping the special
character:
.RS
$ task add "quoted ' quote"
.br
$ task add escaped \\' quote
.RE
The argument \-\- (a double dash) tells task to treat all other args
as description:
.RS
$ task add -- project:Home needs scheduling
.RE
.SH CONFIGURATION FILE AND OVERRIDE OPTIONS
Task stores its configuration in a file in the user's home directory:
~/.taskrc . The default configuration file can be overridden with
.TP
.B task rc:<path-to-alternate-file>
Specifies an alternate configuration file.
.TP
.B task rc.<name>:<value> ...
Specifies individual configuration file overrides.
.SH EXAMPLES
For examples please see the task tutorial man page at
.RS
man task-tutorial
.RE
or the online documentation starting at
.RS
<http://taskwarrior.org/wiki/taskwarrior/Simple>
.RE
.SH FILES
.TP
~/.taskrc User configuration file - see also taskrc(5).
.TP
~/.task The default directory where task stores its data files. The location
can be configured in the configuration file.
.TP
~/.task/pending.data The file that contains the tasks that are not yet done.
.TP
~/.task/completed.data The file that contains the completed "done" tasks.
.TP
~/.task/undo.data The file that contains the information to the "undo" command.
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
.br
Copyright (C) 2006 \- 2009 P. Beckingham
This man page was originally written by P.C. Shyamshankar, and has been modified
and supplemented by Federico Hernandez.
task is distributed under the GNU General Public License. See
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
.SH SEE ALSO
.BR taskrc(5),
.BR task-tutorial(5)
For more information regarding task, the following may be referenced:
.TP
The official site at
<http://taskwarrior.org>
.TP
The official code repository at
<http://github.com/pbeckingham/task/>
.TP
You can contact the project by writing an email to
<support@taskwarrior.org>
.SH REPORTING BUGS
.TP
Bugs in task may be reported to the issue-tracker at
<http://taskwarrior.org>

493
doc/man/taskrc.5 Normal file
View File

@@ -0,0 +1,493 @@
.TH taskrc 5 2009-10-21 "task 1.8.3" "User Manuals"
.SH NAME
taskrc \- Configuration file for the task(1) command
.SH SYNOPSIS
.B $HOME/.taskrc
.br
.B task rc:<directory-path>/.taskrc
.SH DESCRIPTION
.B task
obtains its configuration data from a file called
.I .taskrc
\&. This file is normally located in the user's home directory:
.RS
$HOME/.taskrc
.RE
The default location can be overridden using the
.I rc:
attribute when running task:
.RS
$ task rc:<directory-path>/.taskrc
.RE
Individual option can be overridden by using the
.I rc.<name>:
attribute when running task:
.RS
$ task rc.<name>:<value> ...
.RE
If
.B task
is run without an existing configuration file it will ask if it should create a default, sample
.I .taskrc
file in the user's home directory.
The task configuration file consists of a series of "assignments" in each line. The "assignments" have the syntax:
.RS
<name-of-configuration-variable>=<value-to-be-set>
.RE
where:
.RS
.TP
<name-of-configuration-variable>
is one of the variables described below
.TP
<value-to-be-set>
is the value the variable is to be set to.
.RE
and set a configuration variable to a certain value. The equal sign ("=") is used to separate the variable
name from the value to be set.
The hash mark, or pound sign ("#") is used as a "comment" character. It can be used to annotate the
configuration file. All text after the character to the end of the line is ignored.
.SH CONFIGURATION VARIABLES
Valid variable names and their default values are:
.SS FILES
.TP
.B data.location=$HOME/.task
This is a path to the directory containing all the task files. By default, it is set up to be ~/.task,
for example: /home/paul/.task
.TP
.B locking=on
Determines whether task uses file locking when accessing the pending.data and completed.data files.
Default to "on". Solaris users who store the task data files on an NFS mount may need to set locking
to "off". Note that setting this value to "off" is dangerous. It means that another program may write
to the task.pending file when task is attempting to do the same.
.SS TERMINAL
.TP
.B curses=on
Determines whether task uses ncurses to establish the size of the window you are
using, for text wrapping.
.TP
.B defaultwidth=80
The width of tables used when ncurses support is not available. Defaults to 80.
.TP
.B editor=vi
Specifies which text editor you wish to use for when the
.B task edit <ID>
command is used. Task will first look for this configuration variable. If found, it is used.
Otherwise task will look for the $VISUAL or $EDITOR environment variables, before it defaults
to using "vi".
.SS MISCELLANEOUS
.TP
.B locale=en-US
The locale is a combination of ISO 639-1 language code and ISO 3166 country
code. If not specified, task will assume en-US. If specified, task will locate
the correct file of localized strings and proceed. It is an error to specify a
locale for which there is no strings file.
.TP
.B confirmation=yes
May be "yes" or "no", and determines whether task will ask for confirmation before deleting a task or doing bulk changes.
.TP
.B echo.command=yes
May be "yes" or "no", and causes task to display the ID and description of any task when you run the start, stop, do, undo or delete commands. The default value is "yes".
.TP
.B next=2
Is a number, defaulting to 2, which is the number of tasks for each project that are shown in the
.B task next
command.
.TP
.B bulk=2
Is a number, defaulting to 2. When more than this number of tasks are modified in a single command, confirmation will be required, unless the
.B confirmation
variable is "no".
.TP
.B nag=You have higher priority tasks.
This may be a string of text, or blank. It is used as a prompt when a task is completed
that is not considered high priority. The "task next" command lists important tasks, and
completing one of those does not generate this nagging. Default value is: You have higher
priority tasks.
.TP
.B complete.all.projects=yes
May be yes or no, and determines whether the tab completion scripts consider all the
project names you have used, or just the ones used in active tasks.
.TP
.B complete.all.tags=yes
May be yes or no, and determines whether the tab completion scripts consider all the
tag names you have used, or just the ones used in active tasks.
.SS DATES
.TP
.B dateformat=m/d/Y
This is a string of characters that define how task formats dates. The default value is: m/d/Y.
The string should contain the characters
.RS
m minimal-digit month, for example 1 or 12
.br
d minimal-digit day, for example 1 or 30
.br
y two-digit year, for example 09
.br
D two-digit day, for example 01 or 30
.br
M two-digit month, for example 01 or 12
.br
Y four-digit year, for example 2009
.RE
The string may also contain other characters to act as spacers, or formatting. Examples for other
variable values:
.RS
.br
d/m/Y would output 24/7/2009
.br
YMD would output 20090724
.br
m-d-y would output 07-24-09
.RE
.TP
.B weekstart=Sunday
Determines the day a week starts. Valid values are Sunday or Monday only.
.TP
.B displayweeknumber=yes
Determines if week numbers are displayed when using the "task calendar" command.
The week number is dependent on the day a week starts.
.TP
.B due=7
This is the number of days into the future that define when a task is considered due,
and is colored accordingly. Defaults to 7.
.TP
.B monthsperline=2
Determines how many months the "task calendar" command renders across the screen.
Defaults to however many will fit. If more months that will fit are specified,
task will only show as many that will fit.
.SS COLOR CONTROLS
.TP
.B color=on
May be "on" or "off". Determines whether task uses color. When "off", task will
use dashes (-----) to underline column headings.
.TP
.B fontunderline=on
Determines if font underlines or ASCII dashes should be used to underline
headers.
Task has a number of coloration rules. They correspond to a particular attribute
of a task, such as it being due, or being active, and specifies the automatic
coloring of that task. A list of valid color, depending on your terminal, can be
obtained by running the command
.RS
.B task color
.RE
.RS
The coloration rules and their defaults are:
.RE
.RS
.RS
.B color.overdue=bold_red
The color for overdue tasks.
.br
.B color.due=bold_yellow
The color of due tasks.
.br
.B color.pri.H=bold
The color of priority:H tasks.
.br
.B color.pri.M=on_yellow
The color of priority:M tasks.
.br
.B color.pri.L=on_green
The color of priority:L tasks.
.br
.B color.pri.none=white on_blue
The color of priority: tasks.
.br
.B color.active=bold_cyan
The color of active tasks.
.br
.B color.tagged=yellow
The color of tagged tasks.
.br
.B color.recurring=on_red
The color for recurring tasks.
.RE
.RE
.RS
The value for the coloration rules may be one optional foreground color and one optional
color. For example, the value may be
.RE
.RS
.RS
bold_red on_bright_yellow
.RE
.RE
.RS
Certain attributes like tags, projects and keywords can also have their own coloration rules.
.RE
.RS
.TP
.B color.tag.X=yellow
Colors any task that has the tag X.
.TP
.B color.project.X=on_green
Colors any task assigned to project X.
.TP
.B color.keyword.X=on_blue
Colors any task where the description contains X.
.TP
.B color.header=green
Colors any of the messages printed prior to the report output.
.TP
.B color.message=green
Colors any of the messages printed after the report output.
.TP
.B color.footnote=green
Colors any of the messages printed last.
.RE
.SS SHADOW FILE
.TP
.B
shadow.file=$HOME/.task/shadow.txt
If specified, designates a file path that will be automatically written to by task,
whenever the task database changes. In other words, it is automatically kept up to date.
The shadow.command configuration variable is used to determine which report is written
to the shadow file. There is no color used in the shadow file. This feature can be useful
in maintaining a current file for use by programs like GeekTool, Conky or Samurize.
.TP
.B
shadow.command=list
This is the command that is run to maintain the shadow file, determined by the
.I shadow.file
configuration variable. The format is identical to that of
.I default.command
\&. Please see the corresponding documentation for that command.
.TP
.B
shadow.notify=on
When this value is set to "on", task will display a message whenever the shadow
file is updated by some task command.
.SS DEFAULTS
.TP
.B
default.project=foo
Provides a default project name for the
.I task add
command.
.TP
.B
default.priority=M
Provides a default priority for the
.I task add
command.
.TP
.B
default.command=list
Provides a default command that is run every time task is invoked with no arguments.
For example, if set to:
.RS
.RS
default.command=list project:foo
.RE
.RE
.RS
then task will run the "list project:foo" command if no command is specified. This means that
by merely typing
.RE
.RS
.RS
$ task
.br
[task list project:foo]
.br
\&
.br
ID Project Pri Description
1 foo H Design foo
2 foo Build foo
.RE
.RE
.SS REPORTS
The reports can be customized by using the following configuration variables.
The output columns, their labels and the sort order can be set using the
corresponding variables for each report. Each report name is used as a
"command" name. For example
.TP
.B task overdue
.TP
.B report.X.description
The description for report X when running the "task help" command.
.TP
.B report.X.columns
The columns that will be used when generating the report X. Valid columns are:
id, uuid, project, priority, entry, start, due, recur, recur_ind, age, age_compact,
active, tags, description, description_only. The IDs are separated by commas.
.TP
.B report.X.labels
The labels for each column that will be used when generating report X. The labels
are a comma separated list.
.TP
.B report.X.sort
The sort order of the tasks in the generated report X. The sort order is specified
by using the column ids post-fixed by a "+" for ascending sort order or a "-" for
descending sort order. The sort IDs are separated by commas
.TP
.B report.X.filter
This adds a filter to the report X so that only tasks matching the filter criteria
are displayed in the generated report.
.TP
.B report.X.limit
An optional value to a report limiting the number of displayed tasks in the
generated report.
.TP
Task comes with a number of predefined reports in its default configuration file. These reports are:
.TP
.B long
Lists all task, all data, matching the specified criteria.
.TP
.B list
Lists all tasks matching the specified criteria.
.TP
.B ls
Minimal listing of all tasks matching the specified criteria.
.TP
.B newest
Shows the newest tasks.
.TP
.B oldest
Shows the oldest tasks.
.TP
.B overdue
Lists overdue tasks matching the specified criteria.
.TP
.B active
Lists active tasks matching the specified criteria.
.TP
.B completed
Lists completed tasks matching the specified criteria.
.TP
.B recurring
Lists recurring tasks matching the specified criteria.
.TP
.B waiting
Lists all waiting tasks matching the specified criteria.
.TP
.B all
Lists all tasks matching the specified criteria.
.TP
.B next
Lists all tasks with upcoming due dates matching the specified criteria.
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
.br
Copyright (C) 2006 \- 2009 P. Beckingham
This man page was originally written by Federico Hernandez.
task is distributed under the GNU General Public License. See
http://www.gnu.org/licenses/gpl-2.0.txt for more information.
.SH SEE ALSO
.BR task(1),
.BR task-tutorial(5)
For more information regarding task, the following may be referenced:
.TP
The official site at
<http://taskwarrior.org>
.TP
The official code repository at
<http://github.com/pbeckingham/task/>
.TP
You can contact the project by writing an email to
<support@taskwarrior.org>
.SH REPORTING BUGS
.TP
Bugs in task may be reported to the issue-tracker at
<http://taskwarrior.org>

40
doc/misc/grammar.bnf Normal file
View File

@@ -0,0 +1,40 @@
# This is a full BNF grammar for the task command line. It is intended that a
# future release of task will incorporate a complete lexer/parser implementing
# this grammar, which will allow for more sophisticated command lines, for
# example:
#
# task delete 1 2 4-7
# task add pri:H pro:X -- pro pri 1 ///
#
command ::= simple_command
| filter_command filter?
| id_command
| "export" file
| <id>
| <id> <substitution> ;
simple_command ::= "version" | "help" | "projects" | "tags" | "next" | "stats"
| "color" ;
filter_command ::= "summary" | "history" | "calendar" | "active" | "overdue"
| "oldest" | "newest" | "add" | "list" | "long" | "ls"
| "completed" ;
id_command ::= "delete" | "undelete" | "info" | "start" | "end" | "done"
| "undo" ;
filter ::= filter_part+ ;
filter_part ::= tag_add | tag_remove | attribute | word ;
tag_add ::= "+" word ;
tag_remove ::= "-" word ;
attribute ::= word ":" word ;
word ::=
file ::=
id ::= digit+ ;
digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
substitution ::= "/" word+ "/" word* "/" "g"? ;

109
doc/misc/script.txt Normal file
View File

@@ -0,0 +1,109 @@
Hello, and welcome to this quick demo of the task program.
task add do laundry Let's add some tasks
I need to do laundry
task add project:garage order dumpster Oh yeah, I need to order the dumpster
task add +phone tell mom i loveher Must call Mom (that "phone" there is a tag - they can
be useful for searching and categorizing)
task add +phone pro:garage schedule
goodwill pickup
task ad +email pro:garage ask Tom if Notice I can abbreviate commands
he wants that old bkie
task ls Let's see what we've got
Oh, I spelled bike wrong
task 5 /bkie/bike/
task ls That's better
task 1 pro:home Let's assign projects
task 3 pro:home tell mom I love her
task ls pro:garage
task long pro:garage Let's see all the columns
task list pro:garage There are different ways to list
task lis +phone By tag
task li pro:garage +phone By project and tag
task l mom By word
task 1 priority:H Priorities can be High, Medium or Low
task pri:H 3
task 1 pri:M
task li The list is sorted by priority.
task 2 pri:L
task li
task done 3 Suppose task 3 is done
task li ...and it's gone
task 2 +phone +mistake Lets add tags
# Oops!
task 2 -mistake or remove tags
task tags or look at all the tags
task info 2 or all the details
task projects or all the projects
task 3 fg:bold Let's make it colorful
task 4 fg:bold_green
task li
task 3 fg:bold_underline_white
task li
task 4 bg:on_bright_red fg:bold_yellow
task li Oh that's just nasty - let's get rid of that.
task 4 bg:
task li
task 4 fg:
task 3 fg:
task colors There are many combinations to choose from
(Slashes!!!)
task 1 due:6/8/2008 Let's add a due date
date
task li
task calendar Notice the due task is in yellow, today is marked cyan
task 1 due:5/20/2008 This is now an overdue task
task li and it shows up red
task overdue
task cal
task export file.csv You can export the tasks to a spreadsheet
cat file.csv
task start 1 Started tasks can be used as reminders
of what you are supposed to be doing
task active They show up as active
task done 1 Let's clear out a couple
task li
task done 3
task active
task summary Summary shows progress on all projects
task history History shows general activity - how many added,
completed etc, by month
task ghistory This report shows a histogram of tasks that were
added (in red), completed (in green) and deleted
(in yellow), all by month.
And that's it. There are more commands than this
covered in the online documentation, but this should give
the basic idea.
Thank you for watching.

View File

@@ -1,69 +0,0 @@
This is a full BNF grammar for the task command line. It is intended that a
future release of task will incorporate a complete lexer/parser implementing
this grammar.
command:
VERSION
| HELP
| PROJECTS
| TAGS
| SUMMARY
| HISTORY
| NEXT
| CALENDAR
| ACTIVE
| OVERDUE
| STATS
| USAGE
| OLDEST
| NEWEST
| EXPORT <file>
| COLOR
| DELETE <id>
| UNDELETE <id>
| INFO <id>
| START <id>
| DONE <id>
| ADD [<tags>] [<attrs>] [<desc>]
| LIST [<tags>] [<attrs>] [<desc>]
| LONG [<tags>] [<attrs>] [<desc>]
| LS [<tags>] [<attrs>] [<desc>]
| COMPLETED [<tags>] [<attrs>] [<desc>]
| <id> [<tags>] [<attrs>] [<desc>]
| <id> <substitution>
id:
\d+
| \d{8}-\d{4}-\d{4}-\d{12}
tags:
+<tag>
| -<tag>
tag:
\w+
attrs:
<attr>
| <attr> <attrs>
attr:
<name>:<value>
name:
\w+
value:
.+
substitution:
/ <pattern> / <pattern> /
pattern:
.+
file:
?

View File

@@ -1,130 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="simple">30-second Tutorial</a></h2>
<div class="content">
<p>
For the excessively lazy.
Add two tasks:
</p>
<pre><code>% task add Read task documents later
% task add priority:H Pay bills</code></pre>
<p>
Easy. See that second one has a High priority? Now let's look at those tasks:
</p>
<pre><code>% task ls
ID Project Pri Description
2 H Pay bills
1 Read task documents later</code></pre>
<p>
They are ordered by priority. Let's mark number 2 as done:
</p>
<pre><code>% task 2 done
% task ls
ID Project Pri Description
1 Read task documents later</code></pre>
<p>
Gone. Now let's delete that remaining task, because, well,
why bother now we are already using task:
</p>
<pre><code>% task delete 1
% task ls
No matches</code></pre>
<p>
Easy. But now consider checking out what task can really do...
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,14 +0,0 @@
Documentation Restructuring
high level pages
download
previous verisons
tutorial
recurrence
priorities
subprojects
tags
need page banner
need task link off beckinghma.net

View File

@@ -1,429 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="advanced">Advanced Usage</a></h2>
<div class="content">
<p>
Here are the other commands, in some detail.
</p>
<strong>% task</strong>
<p>
With no arguments, this command will generate a help message that
lists all these commands.
</p>
<strong>% task projects</strong>
<p>
This report generates a list of all the different projects that you
are using along with a count of the pending tasks for each project.
For example:
</p>
<pre><code>% task projects
Project Tasks
Errands 1
Birthdays 3
Car 2</code></pre>
<strong>% task summary</strong>
<p>
This report lists all the projects and a summary of their task
status.
</p>
<pre><code>% task summary
Project Remaining Avg age Complete 0% 100%
Errands 1 3 days 50% XXXXXXXXXXXXXXXX
Birthdays 3 7 mths 0%
Car 2 2 wks 25% XXXXXXXXX</code></pre>
<p>
This shows the project, the remaining tasks, the average age of each
task, the percentage completed (remaining vs total) and a bar
indicating that percentage.
</p>
<strong>% task delete &lt;id&gt;</strong>
<p>
There are two ways of getting rid of tasks - mark them as done, or
delete them.
</p>
<strong>% task undelete &lt;id&gt;</strong>
<p>
If a task was inadvertently deleted, it may be undeleted, provided that no
reports have been run since the deletion. Ideally, the undelete command is
run immediately after the erroneous delete command.
</p>
<p>
If a report is run (such as "task list"), then task performs a garbage
collection that removes deleted tasks, and the task cannot be undeleted.
</p>
<strong>% task done &lt;id&gt;</strong>
<p>
This is how a task is marked as done.
</p>
<strong>% task list ...</strong>
<p>
The list report will show the active status, and age of the task in
addition to the columns that "task ls" shows. It is just a more
detailed list.
</p>
<strong>% task long ...</strong>
<p>
The long report will show the entry date and start date of a task,
in addition to the columns that the "task list" shows.
</p>
<strong>% task start &lt;id&gt;</strong>
<p>
This marks a task as started (and therefore active), which is shown
in the "list" report:
</p>
<pre><code>% task list
ID Project Pri Due Active Age Description
12 Errand L Remember to deposit check
...
% task start 12
% task list
ID Project Pri Due Active Age Description
12 Errand L * 3 days Remember to deposit check
...</code></pre>
<strong>% task active</strong>
<p>
Shows all active tasks, that is, the tasks for which the
"task start ..." command was run, as shown above.
</p>
<strong>% task overdue</strong>
<p>
Simply lists all the task that have a due date that is past, in
"list" format.
</p>
<strong>% task history</strong>
<p>
This report shows you an overview of how many tasks were added,
completed and deleted, by month. It looks like this:
</p>
<pre><code>% task history
Year Month Added Completed Deleted Net
2008 March 21 16 0 5
April 13 11 1 1
May 8 14 3 -9</code></pre>
<p>
This shows that for the three months that task has been used, March
and April saw the total number of tasks increase, but in May the
number decreased as more task were completed than added.
</p>
<strong>% task calendar</strong>
<p>
This report shows a calendar of the current month, with any task
due or overdue dates marked on it. Color is used to mark these
dates.
</p>
<pre><code>% task calendar
May 2008
Su Mo Tu We Th Fr Sa
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</code></pre>
<strong>% task next</strong>
<p>
This report shows you the tasks you should probable work on next.
Task will scan all the tasks and will pick two task from each
project to report. Those two tasks will be chosen in order of
overdue, due soon, High, Medium or Low priority. Essentially task
chooses the two most important task for each project and displays
them ordered in the usual way.
</p>
<p>
If you wish to show a different number of tasks per project, modify
the entry in .taskrc:
</p>
<pre><code>next=2</code></pre>
<p>
To be your preferred number.
</p>
<strong>% task &lt;id&gt; ...</strong>
<p>
When a task id is specified, everything applies to just that task.
Suppose we needed to correct a task:
</p>
<pre><code>% task ls
ID Project Pri Description
12 Errand L Remember to deposit chekc
...
% task 12 Remember to deposit bonus check
% task ls
ID Project Pri Description
12 Errand L Remember to deposit bonus check
...</code></pre>
<strong>% task oldest</strong>
<p>
Lists the oldest tasks. Shows 10 tasks by default, but can be
set via the "oldest" configuration variable.
</p>
<strong>% task newest</strong>
<p>
Lists the newest tasks. Shows 10 tasks by default, but can be
set via the "newest" configuration variable.
</p>
<strong>% task /from/to/</strong>
<p>
If a task has been entered with a typo, it can be easily corrected
by this command. For example:
</p>
<pre><code>% task ls
ID Project Pri Description
12 Errand L Remember to deposit chekc
...
% task 12 /chekc/check/
% task ls
ID Project Pri Description
12 Errand L Remember to deposit check
...</code></pre>
<p>
This command makes single corrections to a task description.
</p>
<strong>% task tags</strong>
<p>
This command will generate a list of all the tags that are currently
in use by task.
</p>
<strong>% task info &lt;id&gt;</strong>
<p>
This command gives detailed information about a single task. It
will tell you when the task was entered, when started, its status,
tags, and more.
</p>
<strong>% task stats</strong>
<p>
This command generates a list of statistics about your task usage,
such as the average time it takes to complete a task, how often new
tasks are added, and more.
</p>
<strong>% task completed</strong>
<p>
This generates a list of all tasks that have been completed, sorted
by their completion date.
</p>
<strong>% task export &lt;file name&gt;</strong>
<p>
This instructs task to write out a CSV format dump of all tasks,
both pending and completed, to the file specified. This is how you
might view tasks in a spreadsheet.
</p>
<strong>% task colors</strong>
<p>
This command displays all the colors that task supports.
</p>
<strong>% task usage</strong>
<p>
If logging has been enabled by the "command.logging=on" directive
in the .taskrc file, then task will record every command that is
run. When this command is run, task will display a count of how
many times each command was used.
</p>
<p>
This command is for the purpose of seeing whether command are
actually used.
</p>
<strong>% task version</strong>
<p>
This can be used to show the version number of task, and to display
all the current configuration settings, as read from the .taskrc
file.
</p>
<strong>% task rc:&lt;file&gt; ...</strong>
<p>
By specifying rc:<file>, it is possible to force task to use an alternate
.taskrc file. By default, task looks in your home directory, so these two
commands are essentially identical:
</p>
<pre><code>% task list
% task rc:~/.taskrc list</code></pre>
<p>
What this override allows, is the possibility of keeping your task lists
completely separate, say for work and home. This can be accomplished with
the following commands (valid for bash):
</p>
<pre><code>% alias htask="task rc:/home/me/.taskrc_home"
% alias wtask="task rc:/home/me/.taskrc_work"
% htask list
...
% wtask list
...</code></pre>
<strong>% task &lt;id&gt; fg:... bg:...</strong>
<p>
Not strictly a command, the setting of the fg and bg (foreground
and background) attributes determines the colors used to represent
the task. Valid foreground colors are:
</p>
<pre><code> bold underline bold_underline
black bold_black underline_black bold_underline_black
red bold_red underline_red bold_underline_red
green bold_green underline_green bold_underline_green
yellow bold_yellow underline_yellow bold_underline_yellow
blue bold_blue underline_blue bold_underline_blue
magenta bold_magenta underline_magenta bold_underline_magenta
cyan bold_cyan underline_cyan bold_underline_cyan
white bold_white underline_white bold_underline_white</code></pre>
<p>
Note that these are not just colors, but combinations of colors and
attributes. Valid background colors are:
</p>
<pre><code>on_black on_bright_black
on_red on_bright_red
on_green on_bright_green
on_yellow on_bright_yellow
on_blue on_bright_blue
on_magenta on_bright_magenta
on_cyan on_bright_cyan
on_white on_bright_white</code></pre>
<p>
Note also that this capability does depend on whether your terminal
program can display these colors.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,127 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="color">Colors</a></h2>
<div class="content">
<p>
Task supports color in several places. In cases where you may
specify a color, a foreground, a background, or a combination
foreground and background color may be used. The following are
valid foreground colors:
</p>
<pre><code> bold underline bold_underline
black bold_black underline_black bold_underline_black
red bold_red underline_red bold_underline_red
green bold_green underline_green bold_underline_green
yellow bold_yellow underline_yellow bold_underline_yellow
blue bold_blue underline_blue bold_underline_blue
magenta bold_magenta underline_magenta bold_underline_magenta
cyan bold_cyan underline_cyan bold_underline_cyan
white bold_white underline_white bold_underline_white</code></pre>
<p>
and the following are valid background colors:
</p>
<pre><code>on_black on_bright_black
on_red on_bright_red
on_green on_bright_green
on_yellow on_bright_yellow
on_blue on_bright_blue
on_magenta on_bright_magenta
on_cyan on_bright_cyan
on_white on_bright_white</code></pre>
<p>
Depending on your terminal color choices, task can display all
the colors it supports with the command:
</p>
<img src="images/color.png" />
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,303 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="config">Configuring Task</a></h2>
<div class="content">
<p>
Task recognizes several entries in the .taskrc file for
configuration purposes. Valid entries are of the form:
</p>
<pre><code>name=value</code></pre>
<p>
Valid examples are:
</p>
<dt>data.location</dt>
<dd>
This is a path to the directory containing all the task files.
By default, it is set up to be ~/.task, for example:
/Users/paul/.task
</dd>
<dt>command.logging</dt>
<dd>
May be "on" or "off", defaulting to "off". This determines
whether task records commands. This is not generally useful,
except while developing task.
</dd>
<dt>confirmation</dt>
<dd>
May be "yes" or "no", and determines whether task will ask for
confirmation before deleting a task.
</dd>
<dt>nag</dt>
<dd>
This may be a string of text, or blank. It is used as a prompt
when a task is completed that is not considered high priority.
The "task next" command lists important tasks, and completing
one of those does not generate this nagging. Default value is:
<strong>Note: try to stick to high priority tasks. See "task next".</strong>
</dd>
<dt>next</dt>
<dd>
Is a number, defaulting to 2, which is the number of tasks for
each project that are shown in the "task next" command.
</dd>
<dt>curses</dt>
<dd>
Determines whether task uses ncurses to establish the size of
the window you are using, for text wrapping.
</dd>
<dt>blanklines</dt>
<dd>
May be "on" or "off". Prevents the display of unnecessary blank
lines so that task makes better use screen real estate on small-
screened devices.
</dd>
<dt>dateformat</dt>
<dd>
<p>
This is a string of characters that define how task formats dates.
The default value is:
</p>
<pre><code>m/d/Y</code></pre>
<p>
which means dates look like:
</p>
<pre><code>6/7/2008</code></pre>
<p>
The string should contain the characters:
<table>
<tr>
<th class="table_h">Character</th>
<th class="table_h">Meaning</th>
<th class="table_h">Example</th>
</tr>
<tr>
<td class="table_d">m</td>
<td class="table_d">minimal-digit month</td>
<td class="table_d">1, 12</td>
</tr>
<tr>
<td class="table_d">d</td>
<td class="table_d">minimal-digit day</td>
<td class="table_d">1, 30</td>
</tr>
<tr>
<td class="table_d">y</td>
<td class="table_d">two-digit year</td>
<td class="table_d">08</td>
</tr>
<tr>
<td class="table_d">M</td>
<td class="table_d">two-digit month</td>
<td class="table_d">01, 12</td>
</tr>
<tr>
<td class="table_d">D</td>
<td class="table_d">two-digit day</td>
<td class="table_d">01, 30</td>
</tr>
<tr>
<td class="table_d">Y</td>
<td class="table_d">four-digit year</td>
<td class="table_d">2008</td>
</tr>
</table>
</p>
<p>
The string may also contain other characters to act as spacers,
or formatting. Other values could include (but are not limited to):
</p>
<p>
<table>
<tr>
<th class="table_h">dateformat</td>
<th class="table_h">How it looks</th>
</tr>
<tr>
<td class="table_d">d/m/Y</td>
<td class="table_d">7/6/2008</td>
</tr>
<tr>
<td class="table_d">YMD</td>
<td class="table_d">20080607</td>
</tr>
<tr>
<td class="table_d">m-d-y</td>
<td class="table_d">6-7-08</td>
</tr>
</table>
</p>
</dd>
<dt>showage<dt>
<dd>
May be "yes" or "no". Determines whether the "Age"
column appears on the "list" and "next" reports.
<dd>
<dt>monthsperline</dt>
<dd>
Determines how many months the "task calendar" command
renders across the screen. Defaults to 1.
</dd>
<dt>oldest</dt>
<dd>
Determines how many tasks the "task oldest" command displays.
Defaults to 10.
</dd>
<dt>newest</dt>
<dd>
Determines how many tasks the "task newest" command displays.
Defaults to 10.
</dd>
<dt>defaultwidth</dt>
<dd>
The width of tables used when ncurses support is not available.
Defaults to 80.
</dd>
<dt>color</dt>
<dd>
May be "on" or "off". Determines whether task uses color.
</dd>
<dt>
color.overdue<br />
color.due<br />
color.pri.H<br />
color.pri.M<br />
color.pri.L<br />
color.pri.none<br />
color.active<br />
color.tagged
</dt>
<dd>
These are the coloration rules. They correspond to a particular
attribute of a task, such as it being due, or being active, and
specifies the automatic coloring of that task. The value may
be one optional foreground color (see below) and one optional
background color. For example, the value may be:
<br />
<strong>bold_red on_bright_yellow</strong>
</dd>
<dt>color.tag.X</dt>
<dd>
Colors any task that has the tag X.
</dd>
<dt>color.project.X</dt>
<dd>
Colors any task assigned to project X.
</dd>
<dt>color.keyword.X</dt>
<dd>
Colors any task where the description contains X.
</dd>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,160 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title">Date Handling</h2>
<div class="content">
<p>
Task reads dates from the command line, and displays dates in the reports.
</p>
<p>
In order to do this in a flexible way, task obeys a configuration variable that
determines the expected and desired date format. See the
<a href="config.html">Configuring Task</a> page for details.
</p>
<p>
In addition to exactly specifying the date, such as:
</p>
<pre><code>% task ... due:7/10/2008</code></pre>
<p>
task supports a flexible variety of alternatives. For example:
</p>
<pre><code>% task ... due:today</code></pre>
<p>
Similarly:
</p>
<pre><code>% task ... due:yesterday
% task ... due:tomorrow</code></pre>
<p>
Here are some other forms that are accepted. The day number, followed by an
ordinal:
</p>
<pre><code>% task ... due:23rd</code></pre>
<p>
End of month:
</p>
<pre><code>% task ... due:eom</code></pre>
<p>
End of year:
</p>
<pre><code>% task ... due:eoy</code></pre>
<p>
End of week (Friday):
</p>
<pre><code>% task ... due:eow</code></pre>
<p>
Next Friday:
</p>
<pre><code>% task ... due:Friday</code></pre>
<p>
Note that next Friday means seven days from now if today is Friday, otherwise
it means the next occurring Friday. Most of these forms may be specified using
abbreviations, provided they are unique. For example:
</p>
<pre><code>% task ... due:fri</code></pre>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

View File

@@ -1,205 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title">Recurring Tasks</h2>
<div class="content">
<p>
Task supports recurring tasks, which is a task that keeps falling due, on a
regular schedule. An example of this may be "pay rent". Here is how
recurring tasks work in task:
</p>
<p>
Ordinarily, a task is a single item that is entered in the pending state, and
remains so until it is either completed or deleted. This is an example of a
single instance task.
</p>
<p>
A recurring task is different. When a recurring task is entered, it remains
hidden from view, but acts as a root task for a task instances that are
generated on a regular basis. Consider the example:
</p>
<pre><code>% task Pay rent due:7/1/2008 recur:monthly</code></pre>
<p>
If today's date is 7/10, for example, then that due date is in the past, and
you might expect there to be an already overdue task for 7/1/2008, and another
due on 8/1/2008. This means that from that root, task has created two
instances with different due dates.
</p>
<pre><code>% task list
ID Project Pri Due Active Age Description
1 7/1/2008 1 min Pay rent
2 8/1/2008 1 min Pay rent
2 tasks</code></pre>
<p>
Task creates any overdue tasks, then creates one additional due task. These
new task instances are then completed or deleted as you normally would.
</p>
<p>
In the example above, a new task instance is created every month, and this will
repeat indefinitely. Task also supports an end date. Suppose you are taking
every Friday off work for the summer. You'll need to submit your TPS report on
Thursdays instead:
</p>
<pre><code>% task TPS report due:thursday recur:weekly until:8/31/2008</code></pre>
<p>
This create a weekly recurring task that expires on 8/31/2008. What this means
is that after all those task instances have been created, then completed or
deleted, the root task will expire and disappear. Task will tell you what it
is doing when this happens.
</p>
<h4>Deletion</h4>
<p>
When a recurring task is deleted, you will be asked if you would also like to
delete all recurring task instances:
</p>
<pre><code>% task del 1
Permanently delete task? (y/n) y
This is a recurring task. Do you want to delete all pending
recurrences of this same task? (y/n) y</code></pre>
<h4>Recurrence Periods</h4>
<p>
In the above examples, the recurrence period was specified as "monthly" and
"weekly". Task supports several ways of specifying this:
</p>
<table>
<tr>
<th class="table_h">Period</th>
<th class="table_h">Meaning</th>
</tr>
<tr>
<td class="table_d">daily, day, 1d, 2d ...</td>
<td class="table_d">Every day, or a number of days</td>
</tr>
<tr>
<td class="table_d">weekly, 1w, 2w ...</td>
<td class="table_d">Every week, or a number of weeks</td>
</tr>
<tr>
<td class="table_d">biweekly, fortnight</td>
<td class="table_d">Every two weeks</td>
</tr>
<tr>
<td class="table_d">monthly, 1m, 2m ...</td>
<td class="table_d">Every month, or a number of months</td>
</tr>
<tr>
<td class="table_d">bimonthly</td>
<td class="table_d">Every two months</td>
</tr>
<tr>
<td class="table_d">quarterly, 1q, 2q ...</td>
<td class="table_d">Every three months, a quarter, or a number of quarters</td>
</tr>
<tr>
<td class="table_d">semiannual</td>
<td class="table_d">Every six months</td>
</tr>
<tr>
<td class="table_d">annual, yearly, 1y, 2y ...</td>
<td class="table_d">Every year, or a number of years</td>
</tr>
<tr>
<td class="table_d">biannual, biyearly, 2y</td>
<td class="table_d">Every two-years</td>
</tr>
</table>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,140 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="setup">Quick Setup</a></h2>
<div class="content">
<p>
Build the task program according to the directions in the INSTALL
file. This transcript illustrates a typical installation:
</p>
<pre><code>% ls
task-1.4.0.tar.gz
% gunzip task-1.4.0.tar.gz
% tar xf task-1.4.0.tar
% cd task-1.4.0
% ./configure
...
% make
...
% make install # (may require sudo, depending on --prefix)</code></pre>
<p>
(For those of you using <a href="http://www.cygwin.com">Cygwin</a>,
you need to make sure you have the "gcc" and "make" packages
available, which are found in the "devel" category. For more
task features, also make sure you have "libncurses-devel" and
"lincurse8".)
</p>
<p>
You need to make sure that the installed task program is in your
PATH environment variable.
</p>
<p>
Task reads a configuration file - called .taskrc in your home
directory - and stores pending and completed tasks in in a directory
specified in the configuration file.
</p>
<p>
The simplest way to get a configuration file and task directory is
to run task. On startup, task will check to see if it can find the
configuration file and task directory, and if not found, will ask
you whether it may create both.
</p>
<pre><code>% task version
A configuration file could not be found in /Users/paul/.taskrc
Would you like a sample .taskrc created, so task can proceed? (y/n) y
Done.
[then task will show version information]</code></pre>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,130 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="shell">Interacting with the Shell</a></h2>
<div class="content">
<p>
Certain characters are interpreted by the shell. For example, the
"&amp;". If you wish to include the &amp; in a task description,
you need to escape it, so the shell doesn't interpret it. For
example:
</p>
<pre><code>% task add Buy bread &amp; milk</code></pre>
<p>
This command is an error because of the &amp;. The shell will
consider this to be two commands:
</p>
<pre><code>% task add Buy bread &amp;
% milk</code></pre>
<p>
The shell treats the &amp; character as an indicator that the
command is complete and should be run in the background. Then the
shell considers "milk" to be a command all by itself. Which it is
not. One way to get around this is to individually escape the &amp;
character:
</p>
<pre><code>% task add Buy bread \&amp; milk</code></pre>
<p>
Another is to quote the entire description, with either ' or "
characters:
</p>
<pre><code>% task add "Buy bread &amp; milk"</code></pre>
<p>
Task itself interprets the commands, and it too can make mistakes.
For example, any colon : character will be interpreted by task as a
delimiter between an attribute name and its value. Currently there
is no workaround for this.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,355 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="simple">Simple Usage</a></h2>
<div class="content">
<p>
Let us begin by adding some tasks:
</p>
<pre><code>% task add Book plane ticket
% task add Rent a tux
% task add Reserve a rental car
% task add Reserve a hotel room</code></pre>
<p>
That's it. You'll notice immediately that task has a very
minimalist interface. Let us take a look at those tasks:
</p>
<pre><code>% task ls
ID Project Pri Description
1 Book plane ticket
2 Rent a tux
3 Reserve a rental car
4 Send John a birthday card</code></pre>
<p>
The 'ls' command provides the most minimal list of tasks. Each
task has been given an id number, and you can see that there are no
projects or priorities assigned. Wait a minute - I own a tux, I
don't need to rent one. Let us delete task 2:
</p>
<pre><code>% task 2 delete
Permanently delete task? (y/n) y</code></pre>
<p>
Task wants you to confirm deletions. To remove the confirmation,
edit your .taskrc file and change the line:
</p>
<pre><code>confirmation=yes</code></pre>
<p>
to have a value of "no".
</p>
<p>
While the use of projects and priorities are not essential to
benefitting from task, they can be very useful when the list of
tasks grows large. Let's assign a project to these tasks:
</p>
<pre><code>% task 1 project:Wedding
% task 3 project:Wedding
% task 4 project:Family
% task ls
ID Project Pri Description
3 Family Send John a birthday card
2 Wedding Reserve a rental car
1 Wedding Book plane ticket</code></pre>
<p>
Notice that the id numbers have changed. When tasks get deleted,
or have their attributes changed (project, for example), the ids are
prone to change. But the id numbers will remain valid until the
next 'ls' command is run. You should only use the ids from the most
recent 'ls' command. The ids change, because task is always trying
to use small numbers so that it is easy for you to enter them
correctly. Now that projects are assigned, we can look at just the
Wedding project tasks:
</p>
<p>
Subprojects are supported. If you have a project "Wedding", you can
specify that a task is a subproject "Transport" of "Wedding" by
assigning the project "Wedding.Transport". Let's do this:
</p>
<pre><code>% task 2 project:Wedding.Transport
% task ls
ID Project Pri Description
3 Family Send John a birthday card
2 Wedding.Transport Reserve a rental car
1 Wedding Book plane ticket</code></pre>
<p>
Task matches the leftmost part of the project when searching, so
projects may be abbreviated:
</p>
<pre><code>% task ls project:Wedding.Tra
ID Project Pri Description
2 Wedding.Transport Reserve a rental car</code></pre>
<p>
This way of matching projects can be used to see all tasks under
the "Wedding" project and all subprojects:
</p>
<pre><code>% task ls project:Wedding
ID Project Pri Description
2 Wedding.Transport Reserve a rental car
1 Wedding Book plane ticket</code></pre>
<p>
Let's reassign 2 back to the "Wedding" project:
</p>
<pre><code>% task 2 project:Wedding</code></pre>
<p>
Now that projects are assigned, we can look at just the
Wedding project tasks:
</p>
<pre><code>% task ls project:Wedding
ID Project Pri Description
1 Wedding Book plane ticket
2 Wedding Reserve a rental car</code></pre>
<p>
Any command arguments after the 'ls' are used for filtering the
output. We could also have requested:
</p>
<pre><code>% task ls ticket plane
ID Project Pri Description
1 Wedding Book plane ticket</code></pre>
<p>
Now let's prioritize. Priorities can be H, M or L (High, Medium,
Low).
</p>
<pre><code>% task ls
ID Project Pri Description
3 Family Send John a birthday card
2 Wedding Reserve a rental car
1 Wedding Book plane ticket
% task 1 priority:H
% task 2 prior:M
% task 3 pr:H
Ambiguous attribute 'pr' - could be either of project, priority
% task 3 pri:H
% task ls
ID Project Pri Description
3 Family H Send John a birthday card
1 Wedding H Book plane ticket
2 Wedding M Reserve a rental car</code></pre>
<p>
Notice that task supports the abbreviation of words such as
priority, project. Priority can be abbreviated to pri, but not pr,
because it is ambiguous. Now that tasks have been prioritized, you
can see that the tasks are being sorted by priority, with the
highest priority tasks at the top.
</p>
<p>
These attributes can all be provided when the task is added, instead
of applying them afterwards, as shown. The following command shows
how to set all the attributes at once:
</p>
<pre><code>% task add project:Wedding priority:H Book plane ticket<code></pre>
<p>
The 'ls' command provides the least information for each task. The
'list' command provides more:
</p>
<pre><code>% task list
ID Project Pri Due Active Age Description
3 Family H 4 mins Send John a birthday card
1 Wedding H 5 mins Book plane ticket
2 Wedding M 5 mins Reserve a rental car</code></pre>
<p>
Notice that a task can have a due date, and can be active. The
task lists are sorted by due date, then priority. Let's add due
dates:
</p>
<pre><code>% task 3 due:6/25/2008
% task 1 due:7/31/2008
% task list
ID Project Pri Due Active Age Description
3 Family H 6/25/2008 6 mins Send John a birthday card
1 Wedding H 7/31/2008 7 mins Book plane ticket
2 Wedding M 7 mins Reserve a rental car</code></pre>
<p>
If today's date is 6/23/2008, then task 3 is due in 2 days. It will
be colored yellow if your terminal supports color. To change this
color, edit your .taskrc file, and change the line to one of these
alternatives:
</p>
<pre><code>color.due=red
color.due=on_blue
color.due=red on_blue
color.due=bold_red on_blue</code></pre>
<p>
Where color is one of the following:
</p>
<pre><code>black
blue
red
green
cyan
magenta
yellow
white</code></pre>
<p>
All colors are specified in this way. Take a look in .taskrc for
all the other color rules that you control.
</p>
<p>
Tagging tasks is a good way to group them, aside from specifying a
project. To add a tag to a task:
</p>
<pre><code>% task &lt;id&gt; +tag<code></pre>
<p>
The plus sign indicates that this is a tag. Any number of tags may
be applied to a task, and then used for searching. Tags are just
single words that are labels.
</p>
<pre><code>% task list
ID Project Pri Due Active Age Description
3 Family H 6/25/2008 8 mins Send John a birthday card
1 Wedding H 7/31/2008 9 mins Book plane ticket
2 Wedding M 9 mins Reserve a rental car
% task 1 +phone
% task 2 +phone
% task 3 +shopping
% task 3 +john
% task list +phone
ID Project Pri Due Active Age Description
1 Wedding H 7/31/2008 9 mins Book plane ticket
2 Wedding M 9 mins Reserve a rental car</code></pre>
<p>
To remove a tag from a task, use the minus sign:
</p>
<pre><code>% task 3 -john</code></pre>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,126 +0,0 @@
body {
text-align: center;
margin: 0; padding: 1em;
}
#container {
width: 740px;
text-align: left;
margin: 0 auto; padding: 0;
}
#header {
height: 60px;
margin: 0 0 15px; padding: 0;
}
#page {}
#content {
width: 500px;
}
#header a:link,
#header a:visited {
color:#000;
text-decoration: none;
}
#header h1 {
font: bold 400% georgia, serif;
letter-spacing: -1px;
margin: 0;
float: left;
}
#header h2 {
font: normal 12px verdana, arial, sans-serif;
margin: 2.5em 0 0 0.8em;
float: left;
}
#content {}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5 {
font-family: "lucidamac bold", "lucida grande", arial, sans-serif;
letter-spacing: -1px;
}
#content h1 {
font-size: 24px;
}
#content h2 {
font-size: 22px;
border-bottom: 1px dotted #000;
}
#content h3 {
font-size: 20px;
border-bottom: 1px dotted #bbb;
}
#content h4 {
font-size: 18px;
border-bottom: 1px dotted #bbb;
}
#content h5 {
font-size: 18px;
background: #ffd;
border-bottom: 1px dotted #bbb;
}
#content p {
line-height: 15px;
}
#content ul,
#content ol {
}
#content code {
font: normal 12px "bitstream vera sans mono", monaco "lucida console", "courier new", courier, serif;
}
#content pre {
color: #63FF00;
background: #000;
overflow: auto;
font: normal 12px "bitstream vera sans mono", monaco "lucida console", "courier new", courier, serif;
margin: 0.9em 0; padding: 8px;
}
dt {
font: bold 14px "lucida grande", verdana, arial, helvetica, sans-serif;
}
dd {
}
body {
font: normal 12px "lucida grande", verdana, arial, helvetica, sans-serif;
}
.small {
font: normal 10px verdana, arial, sans-serif;
}
.table_h {
background-color: #e0e0e0;
}
.table_d {
background-color: #f7f7f7;
}
input,
textarea { font: normal 12px "bitstream vera sans", verdana, sans-serif; }
abbr { border: none; }
cite { font-style: normal; }
a img { border: none; padding: 0; margin: 0; }

View File

@@ -1,183 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h1 class="title">Task</h1>
<p>
Task is an open source, command-line, TODO list manager.
</p>
<p>
Here you will find information on how to acquire, build, configure,
use and become proficient with the task program.
</p>
<ul>
<li><a href="setup.html">Quick Setup</a>
<li><a href="30second.html">30-second Tutorial</a>
<li><a href="simple.html">Simple Usage</a>
<li><a href="advanced.html">Advanced Usage</a>
<li><a href="shell.html">Interacting with the Shell</a>
<li><a href="config.html">Configuring Task</a>
<li><a href="color.html">Color</a>
<li><a href="usage.html">Task Command Usage</a>
<li><a href="recur.html">Recurring Tasks</a>
<li><a href="date.html">Date Handling</a>
<li><a href="troubleshooting.html">Troubleshooting</a>
<li><a href="versions.html">Old Versions</a>
<li>Filters (coming soon)
</ul>
<p>
More documents are being written, and will be added here.
</p>
<p>
Alternatively, watch the
<a href="http://www.youtube.com/watch?v=D2Kn4DMOVSw">task movie</a>
which illustrates many of task's features.
</p>
<br />
<h2 class="title">Get the Latest Source Release
<a href="http://www.beckingham.net/task-1.4.0.tar.gz">task-1.4.0.tar.gz</a>
</h2>
<div class="content">
<h4>New in version 1.4.0 (7/10/2008)</h4>
<ul>
<li>Added new <a href="recur.html">recurring tasks</a> feature
<li>Added "task undelete" feature to restore a (very) recently deleted
task
<li>Added averages to the "task history" report
<li>Added bar chart history report "task ghistory"
<li>Added support for rc:&lt;file&gt; to allow override of the default
~/.taskrc file
<li>Added support for relative due: dates, such as "tomorrow", "friday",
"23rd", "eom"
<li>Added support for task filtering on all reports
<li>Automatically shuts off color, ncurses when output is not to a tty
<li>Added support for the ~ character in .taskrc data.location, for flexibility
<li>Allows colons on the description, provided what is to the left of the colon
is not a standard attribute name
<li>Fixed bug where Esc[0m sequences were being emitted for no good reason
<li>Fixed bug where table headers are underlined when color is turned off
<li>Fixed bug where adding a blank priority resulted in an assigned garbage value
<li>Fixed bug parsing date "07/08/2008" when using dateformat "m/d/Y"
</ul>
<p>
(Find out <a href="versions.html">what was new in prior versions</a>)
</p>
<h2>Troubleshooting</h2>
<p>
Task has been built and tested in the following environments:
</p>
<ul>
<li>OS X 10.4 Tiger
<li>OS X 10.5 Leopard
<li>Fedora Core 8
<li>Fedora Core 9
<li>Ubuntu 8 Hardy Heron
<li>Solaris 10
<li>Cygwin 1.5.25-14
</ul>
<p>
If you have difficulties building task, have found a bug, have a
suggestion for improvement, or a feature request, please send mail to
<a href="mailto:task@beckingham.net">task@beckingham.net</a>.
</p>
<p>
Take a look at the <a href="troubleshooting.html">troubleshooting guide</a>
for tips and workarounds to problems.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,163 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task Troubleshooting Guide</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h1 class="title">Task Troubleshooting Guide</h1>
<p>
Here you will find tips and suggestions for making task behave
properly, and bug workarounds.
</p>
<br />
<h2 class="title">Segmentation Fault for certain commands</h2>
<div class="content">
<p>
Upgrading task to version 1.1.0, 1.2.0 and 1.3.0 can cause
segmentation faults. This is mostly occurring for Ubuntu users,
although there is no reason for it to be limited to Ubuntu.
</p>
<p>
Task 1.3.1 fixes this bug, but there is a workaround for users
of earlier versions. Add the following line to your ~/.taskrc
file:
</p>
<code><pre>dateformat=m/d/Y</pre></code>
<p class="small">
The "dateformat" setting is supported in task 1.1.0 and later.
</p>
</div>
<br />
<h2 class="title">How to get rid of the "Age" column</h2>
<div class="content">
<p>
The "Age" column that shows up on several reports is proving
to be unpopular. In task 1.2.0 and later, here is how to
remove it from the reports - make sure you have the line:
</p>
<code><pre>showage=no</pre></code>
<p>
in your ~/.taskrc file.
Note that the "task long" report does not obey this setting
in versions prior to 1.3.1.
</p>
<p class="small">
The "showage" setting is supported in task 1.2.0 or later.
<br />
The "task long" report supports this setting in versions 1.3.1
or later.
</p>
<div>
<br />
<h2 class="title">How do I build task under Cygwin?</h2>
<div class="content">
<p>
Task is built the same way everywhere. But under Cygwin, you'll
need to make sure you have the following packages available
first:
<ul>
<li>gcc
<li>make
<li>libncurses-devel
<li>libncurses8
</ul>
The gcc and make packages allow you to compile the code, and
are therefore required, but the ncurses packages are optional.
Ncurses will allow task to determine the width of the window, and
therefore use the whole width and wrap text accordingly, for a
more aesthetically pleasing display.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,142 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task 1.4.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="usage">Command Usage<a></h2>
<div class="content">
<pre><code>task add [tags] [attrs] desc...
task list [tags] [attrs] desc...
task long [tags] [attrs] desc...
task ls [tags] [attrs] desc...
task completed [tags] [attrs] desc...
task ID [tags] [attrs] [desc...]
task ID /from/to/
task delete ID
task undelete ID
task info ID
task start ID
task done ID
task projects
task tags
task summary
task history
task ghistory
task next
task calendar
task active
task overdue
task oldest
task newest
task stats
task usage
task export
task color
task version
ID is the numeric identifier displayed by the 'task list' command
Tags are arbitrary words, any quantity:
+tag The + means add the tag
-tag The - means remove the tag
Attributes are:
project: Project name
priority: Priority
due: Due date
fg: Foreground color
bg: Background color
Any command or attribute name may be abbreviated if still unique:
task list project:Home
task li pro:Home
Some task descriptions need to be escaped because of the shell:
task add "quoted ' quote"
task add escaped \' quote
Many characters have special meaning to the shell, including:
$ ! ' " ( ) ; \ ` * ? { } [ ] < > | &amp; % # ~</code></pre>
<div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@@ -1,190 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Task Prior Versions</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="task.css" type="text/css" />
</head>
<body>
<div id="container">
<table>
<tr>
<td>
<div id="toolbar">
<a href="task.html">Home</a>
<a href="setup.html">Setup</a>
<a href="30second.html">30-second Tutorial</a>
<a href="simple.html">Simple</a>
<a href="advanced.html">Advanced</a>
<a href="shell.html">Shell</a>
<a href="config.html">Configuration</a>
<a href="color.html">Colors</a>
<a href="usage.html">Usage</a>
<a href="recur.html">Recurrence</a>
<a href="date.html">Date Handling</a>
<a href="troubleshooting.html">Troubleshooting</a>
<a href="versions.html">Old Versions</a>
</div>
<div id="content">
<br />
<br />
<br />
<h1 class="title">Task Prior Versions</h1>
<br />
<div class="content">
<p>
<h4>New in version 1.3.1</h4>
Source: <a href="http://www.beckingham.net/task-1.3.1.tar.gz">task-1.3.1.tar.gz</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.3.1-1_i386.deb">task_1.3.1-1_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
<li>New configuration variable "defaultwidth" determines the width
of windows in the absense of ncurses support
<li>Fixed bug where "showage" configuration variable was not being
oberved by the "task long" report
<li>Fixed bug causing segmentation faults (mostly for Ubuntu users)
when various commands are run
<li>Fixed bug so that task now will recreate a missing ~/.taskrc file,
OR a missing ~/.task directory
</ul>
<p>
<h4>New in version 1.3.0</h4>
Source: <a href="http://www.beckingham.net/task-1.3.0.tar.gz">task-1.3.0.tar.gz</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.3.0-0_i386.deb">task_1.3.0-0_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
<li>"task calendar" now displays multiple months per line, adjustable
by the "monthsperline" configuration variable. Feature added by
Damian Glenny
<li>Displays shorter message when a command is entered incorrectly,
and the full usage for "task help"
<li>"task export" can now filter tasks like the reports
<li>"task oldest" shows the oldest tasks
<li>"task newest" shows the newest tasks
<li>Fixed bug where task generates a segmentation fault for several
commands, when no "dateformat" configuration variable was present
<li>Fixed bug whereby if you have more than one task with a due date,
7 days gets added to the entry date of task 2..n
<li>Fixed bug whereby "1 wks" was being improperly pluralized
</ul>
<p>
<h4>New in version 1.2.0</h4>
Source: <a href="http://www.beckingham.net/task-1.2.0.tar.gz">task-1.2.0.tar.gz</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.2.0-1_i386.deb">task_1.2.0-1_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
<li>Subprojects supported - please see documentation below, or TUTORIAL
file
<li>"dateformat" configuration variable now properly used to parse as
well as render dates
<li>"task list x" now performs a caseless comparison between "x" and
the task description
<li>"showage" configuration variable determines whether the "Age" column
should appear on the "task list" and "task next" reports
<li>Improvements to the TUTORIAL file and this page
</ul>
<p>
<h4>New in version 1.1.0</h4>
Source: <a href="http://www.beckingham.net/task-1.1.0.tar.gz">task-1.1.0.tar.gz</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.1.0-1_i386.deb">task_1.1.0-1_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
<li>"blanklines" configuration variable to stop displaying unnecessary
white space and thus work better on small-screen devices
<li>"dateformat" configuration now determines how dates are formatted
<li>Better formatting of "task tags" output
<li>This home page set up, with TUTORIAL
<li>Added tags to the "task long" report
</ul>
<p>
<h4>New in version 1.0.1</h4>
Source: <a href="http://www.beckingham.net/task-1.0.1.tar.gz">task-1.0.1.tar.gz</a>
</p>
<ul>
<li>Fixed bug where the UUID generator not properly terminating strings
<li>Fixed bug where srandom/srand not called prior to custom UUID generation
</ul>
<p>
<h4>Version 1.0.0</h4>
Source: <a href="http://www.beckingham.net/task-1.0.0.tar.gz">task-1.0.0.tar.gz</a>
</p>
<p>
Task 1.0.0 was the first publicly available version of task.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2008, P. Beckingham. All rights reserved.
</p>
</div>
</div>
</td>
<td align="right" valign="top" width="200px">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<script type="text/javascript"><!--
google_ad_client = "pub-9709799404235424";
/* Task Main */
google_ad_slot = "8660617875";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4737637-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

157
i18n/strings.de-DE Normal file
View File

@@ -0,0 +1,157 @@
# This is an example strings.en-US file.
#
# The task program has a built-in set of default strings, which are UTF8 encoded
# for the en-US locale. A file such as this is used to override those defaults.
# This means that a strings file is merely a delta applied to the built-in
# strings, so an empty string file means you get en-US.
#
# To use another string file, add the following entry to your .taskrc file:
#
# locale=sv-SE # Swedish string set
# 1xx task shell
100 Unbekannter Fehler #Unknown Error.
101 Konnte nicht Datenverzeichnis HOME aus passwd Datei lesen #Could not read home directory from the passwd file.
102 (j/n) #(y/n)
103 Ungültige ID in Sequenz #Invalid ID in sequence
104 Ungültige ID in Bereich #Invalid ID in range
105 Invertierter Sequenzbereich hoch-niedrig #Inverted sequence range high-low
106 ID Bereich zu gross #ID Range too large
107 Keine Sequenz #Not a sequence.
108 Task interaktiv nur möglich mit vorhandenem ncurses #Interactive task is only available when built with ncurses support.
109 Leerer Eintrag in der Eingabe #Empty record in input
110 Unbekanntes Zeichen am Zeilenende #Unrecognized characters at end of line
111 Datensatz nicht als Format 4 erkannt #Record not recognized as format 4
112 Kann leere Zeichenkette nicht ersetzen #Cannot substitute an empty string
113 Nicht erkanntes Zeichen am Ende der Ersetzung #Unrecognized character(s) at end of substitution
114 Fehlformulierte Ersetzung #Malformed substitution
115 Etiketten dürfen keine Kommas enthalten #Tags are not permitted to contain commas
# 2xx Commands - must be sequential
200 aktiv #active
201 hinzufen #add
202 beizufügen #append
203 anmerkung #annotate
204 kalender #calendar
205 farben #colors
206 fertiggestellt #completed
207 löschen #delete
208 erledigt #done
209 duplizieren #duplicate
210 editieren #edit
211 export #export
212 hilfe #help
213 geschichte #history
214 ggeschichte #ghistory
215 import #import
216 info #info
218 überfällig #overdue
219 projekte #projects
220 start #start
221 statistik #stats
222 stop #stop
223 zusammenfassung #summary
224 etikett #tags
225 zeitdatenblatt#timesheet
227 rücksetzen #undo
228 version #version
# 3xx Attributes - must be sequential
300 projekt #project
301 priorität #priority
302 vordergrund #fg
303 hintergrund #bg
304 fällig #due
305 eintrag #entry
306 start #start
307 stop #end
308 wiederkehrend #recur
309 bis #until
310 mask #mask
311 imask #imask
# 35x Attribute modifiers - must be sequential
350 davor #before
351 danach #after
352 nict #not
353 kein #none
354 beliebig #any
355 synth #synth
356 unter #under
357 über #over
358 erstes #first
359 letztes #last
360 dieses #this
361 nächste #next
362 ist #is
363 istnicht #isnt
364 hat #has
365 hatnicht #hasnt
366 beginntmit #startswith
367 endetmit #endswith
# 4xx Columns
# 5xx Colors
500 fett #bold
501 unterstrichen #underline
502 fett_unterstrichen #bold_underline
503 schwarz #black
504 rot #red
505 grün #green
506 gelb #yellow
507 blau #blue
508 magenta #magenta
509 cyan #cyan
510 weiss #white
511 fett_schwarz #bold_black
512 fett_rot #bold_red
513 fett_grün #bold_green
514 fett_gelb #bold_yellow
515 fett_blau #bold_blue
516 fett_magenta #bold_magenta
517 fett_cyan #bold_cyan
518 fett_weiss #bold_white
519 unterstrichen_schwarz #underline_black
520 unterstrichen_rot #underline_red
521 unterstrichen_grün #underline_green
522 unterstrichen_gelb #underline_yellow
523 unterstrichen_blau #underline_blue
524 unterstrichen_magenta #underline_magenta
525 unterstrichen_cyan #underline_cyan
526 unterstrichen_weiss #underline_white
527 fett_unterstrichen_schwarz #bold_underline_black
528 fett_unterstrichen_rot #bold_underline_red
529 fett_unterstrichen_grün #bold_underline_green
530 fett_unterstrichen_gelb #bold_underline_yellow
531 fett_unterstrichen_blau #bold_underline_blue
532 fett_unterstrichen_magenta #bold_underline_magenta
533 fett_unterstrichen_cyan #bold_underline_cyan
534 fett_unterstrichen_weiss #bold_underline_white
535 auf_schwarz #on_black
536 auf_rot #on_red
537 auf_grün #on_green
538 auf_gelb #on_yellow
539 auf_blau #on_blue
540 auf_magenta #on_magenta
541 auf_cyan #on_cyan
542 auf_weiss #on_white
543 auf_signal_schwarz #on_bright_black
544 auf_signal_rot #on_bright_red
545 auf_signal_grün #on_bright_green
546 auf_signal_gelb #on_bright_yellow
547 auf_signal_blau #on_bright_blue
548 auf_signal_magenta #on_bright_magenta
549 auf_signal_cyan #on_bright_cyan
550 auf_signal_weiss #on_bright_white
551 aus #off
552 Unbekannte Farbe #Unknown color name
# 6xx Config
# 7xx TDB
# 8xx Reports

159
i18n/strings.en-US Normal file
View File

@@ -0,0 +1,159 @@
# This is an example strings.en-US file.
#
# The task program has a built-in set of default strings, which are UTF8 encoded
# for the en-US locale. A file such as this is used to override those defaults.
# This means that a strings file is merely a delta applied to the built-in
# strings, so an empty string file means you get en-US.
#
# To use another string file, add the following entry to your .taskrc file:
#
# locale=sv-SE # Swedish string set
# 1xx task shell
100 Unknown Error.
101 Could not read home directory from the passwd file.
102 (y/n)
103 Invalid ID in sequence
104 Invalid ID in range
105 Inverted sequence range high-low
106 ID Range too large
107 Not a sequence.
108 Interactive task is only available when built with ncurses support.
109 Empty record in input
110 Unrecognized characters at end of line
111 Record not recognized as format 4
112 Cannot substitute an empty string
113 Unrecognized character(s) at end of substitution
114 Malformed substitution
115 Tags are not permitted to contain commas
116 You must specify a command, or a task ID to modify
# 2xx Commands - must be sequential
200 active
201 add
202 append
203 annotate
204 calendar
205 colors
206 completed
207 delete
208 done
209 duplicate
210 edit
211 export
212 help
213 history
214 ghistory
215 import
216 info
218 overdue
219 projects
220 start
221 stats
222 stop
223 summary
224 tags
225 timesheet
227 undo
228 version
229 shell
# 3xx Attributes - must be sequential
300 project
301 priority
302 fg
303 bg
304 due
305 entry
306 start
307 end
308 recur
309 until
310 mask
311 imask
# 35x Attribute modifiers - must be sequential
350 before
351 after
352 not
353 none
354 any
355 synth
356 under
357 over
358 first
359 last
360 this
361 next
362 is
363 isnt
364 has
365 hasnt
366 startswith
367 endswith
# 4xx Columns
# 5xx Colors
500 bold
501 underline
502 bold_underline
503 black
504 red
505 green
506 yellow
507 blue
508 magenta
509 cyan
510 white
511 bold_black
512 bold_red
513 bold_green
514 bold_yellow
515 bold_blue
516 bold_magenta
517 bold_cyan
518 bold_white
519 underline_black
520 underline_red
521 underline_green
522 underline_yellow
523 underline_blue
524 underline_magenta
525 underline_cyan
526 underline_white
527 bold_underline_black
528 bold_underline_red
529 bold_underline_green
530 bold_underline_yellow
531 bold_underline_blue
532 bold_underline_magenta
533 bold_underline_cyan
534 bold_underline_white
535 on_black
536 on_red
537 on_green
538 on_yellow
539 on_blue
540 on_magenta
541 on_cyan
542 on_white
543 on_bright_black
544 on_bright_red
545 on_bright_green
546 on_bright_yellow
547 on_bright_blue
548 on_bright_magenta
549 on_bright_cyan
550 on_bright_white
551 off
552 Unknown color name
# 6xx Config
# 7xx TDB
# 8xx Reports

11
i18n/strings.es-ES Normal file
View File

@@ -0,0 +1,11 @@
# 1xx task shell
100 Error desconocido.
# 2xx Commands
# 3xx Attributes
# 4xx Columns
# 5xx Colors
# 6xx Config
# 7xx TDB
# 8xx Reports

11
i18n/strings.fr-FR Normal file
View File

@@ -0,0 +1,11 @@
# 1xx task shell
100 Erreur inconnue.
# 2xx Commands
# 3xx Attributes
# 4xx Columns
# 5xx Colors
# 6xx Config
# 7xx TDB
# 8xx Reports

11
i18n/strings.nl-NL Normal file
View File

@@ -0,0 +1,11 @@
# 1xx task shell
100 Onbekende fout.
# 2xx Commands
# 3xx Attributes
# 4xx Columns
# 5xx Colors
# 6xx Config
# 7xx TDB
# 8xx Reports

157
i18n/strings.sv-SE Normal file
View File

@@ -0,0 +1,157 @@
# This is an example strings.en-US file.
#
# The task program has a built-in set of default strings, which are UTF8 encoded
# for the en-US locale. A file such as this is used to override those defaults.
# This means that a strings file is merely a delta applied to the built-in
# strings, so an empty string file means you get en-US.
#
# To use another string file, add the following entry to your .taskrc file:
#
# locale=sv-SE # Swedish string set
# 1xx task shell
100 Okänt fel. #Unknown Error.
101 Kunde inte läsa hemkatalogen från passwd filen. #Could not read home directory from the passwd file.
102 (j/n) #(y/n)
103 Ogiltig ID i sekvens #Invalid ID in sequence
104 Ogiltig ID i spännvidd #Invalid ID in range
105 Inverterad sekvens spännvidd hög-låg #Inverted sequence range high-low
106 ID spännvidd för stor #ID Range too large
107 Ingen sekvens. #Not a sequence.
108 Interaktiv task är bara tillgänglig när den kompilerades med support för ncurses. #Interactive task is only available when built with ncurses support.
109 Tom post i ingångsdata #Empty record in input
110 Okänt tecknen på slutet av raden. #Unrecognized characters at end of line
111 Post inte indentifierad som format 4 #Record not recognized as format 4
112 Substitution av tom teckensträng är inte möjligt #Cannot substitute an empty string
113 Pkänt tecken vid slutet av substitution #Unrecognized character(s) at end of substitution
114 Ogiltig substitution #Malformed substitution
115 Taggar får inte innehåller komman #Tags are not permitted to contain commas
# 2xx Commands - must be sequential
200 aktivt #active
201 tillägg #add
202 bifoga #append
203 kommentera #annotate
204 kalender #calendar
205 färger #colors
206 avslutad #completed
207 stryk #delete
208 färdig #done
209 kopiera #duplicate
210 redigera #edit
211 exportera #export
212 hjälp #help
213 historia #history
214 ghistoria #ghistory
215 importera #import
216 info #info
218 försenad #overdue
219 projekten #projects
220 start #start
221 statistik #stats
222 stop #stop
223 sammanfattning #summary
224 taggar #tags
225 tidsrapport #timesheet
227 ångra #undo
228 version #version
# 3xx Attributes - must be sequential
300 projekt #project
301 prioritet #priority
302 förgrund #fg
303 bakgrund #bg
304 väntad #due
305 post #entry
306 start #start
307 slut #end
308 periodirskt #recur
309 innan #until
310 mask #mask
311 imask #imask
# 35x Attribute modifiers - must be sequential
350 före #before
351 efter #after
352 inte #not
353 ingen #none
354 några #any
355 synth #synth
356 under #under
357 över #over
358 första #first
359 sista #last
360 detta #this
361 nästa #next
362 är #is
363 ärinte #isnt
364 har #has
365 harinte #hasnt
366 börjarmed #startswith
367 slutarmed #endswith
# 4xx Columns
# 5xx Colors
500 fet #bold
501 understrykt #underline
502 fet_understrykt #bold_underline
503 svart #black
504 röd #red
505 grön #green
506 gul #yellow
507 blå #blue
508 magenta #magenta
509 cyan #cyan
510 vit #white
511 fet_svart #bold_black
512 fet_röd #bold_red
513 fet_grön #bold_green
514 fet_gul #bold_yellow
515 fet_blå #bold_blue
516 fet_magenta #bold_magenta
517 fet_cyan #bold_cyan
518 fet_vit #bold_white
519 understrykt_svart #underline_black
520 understrykt_röd #underline_red
521 understrykt_grön #underline_green
522 understrykt_gul #underline_yellow
523 understrykt_blå #underline_blue
524 understrykt_magenta #underline_magenta
525 understrykt_cyan #underline_cyan
526 understrykt_vit #underline_white
527 fet_understrykt_svart #bold_underline_black
528 fet_understrykt_röd #bold_underline_red
529 fet_understrykt_grön #bold_underline_green
530 fet_understrykt_gul #bold_underline_yellow
531 fet_understrykt_blå #bold_underline_blue
532 fet_understrykt_magenta #bold_underline_magenta
533 fet_understrykt_cyan #bold_underline_cyan
534 fet_understrykt_vit #bold_underline_white
535 på_svart #on_black
536 på_röd #on_red
537 på_grön #on_green
538 på_gul #on_yellow
539 på_blå #on_blue
540 på_magenta #on_magenta
541 på_cyan #on_cyan
542 på_vit #on_white
543 på_ljust_svart #on_bright_black
544 på_ljust_röd #on_bright_red
545 på_ljust_grön #on_bright_green
546 på_ljust_gul #on_bright_yellow
547 på_ljust_blå #on_bright_blue
548 på_ljust_magenta #on_bright_magenta
549 på_ljust_cyan #on_bright_cyan
550 på_ljust_vit #on_bright_white
551 av #off
552 Okänt färg namn #Unknown color name
# 6xx Config
# 7xx TDB
# 8xx Reports

5
i18n/tips.de-DE Normal file
View File

@@ -0,0 +1,5 @@
%
erster Tipp
%
zweiter Tipp
%

5
i18n/tips.en-US Normal file
View File

@@ -0,0 +1,5 @@
%
first tip
%
second tip
%

5
i18n/tips.sv-SE Normal file
View File

@@ -0,0 +1,5 @@
%
första tips
%
andra tips
%

View File

@@ -1,70 +0,0 @@
Real Parsing
define grammar for command line
implement flex/bison parser
new grammar includes:
- task delete <ID> [<ID> ...]
- task done <ID> [<ID> ...]
User-Defined Reports
report.large=id,uuid,project,priority,entry,start,due,active,tags,description
report.long=id,project,priority,entry,start,due,tags,description
report.list=id,project,priority,due,active,description
report.ls=id,project,priority,description
Sorting is always: due+ priority- project+
ID UUID Project Priority Entry Start Due Active Tags Description
Test Suite
- allow .taskrc override
- debug=on to cause all cout to be csv
- regression tests for every bug, command, feature
Recurrence
+ new T::status recurring (stored as R)
+ new user-specifiable attributes - recur:<duration> [until:<date>]
+ duration:
daily, day, 1d
Nd
weekly, 1w
Nw
biweekly
monthly, 1m
bimonthly
Nm
quarterly, 1q
Nq
biannual, biyearly
annual, yearly, 1y
Na, Ny
+ recur: without due: => Error
+ until: without recur: => Error
+ New file format: supports status R, recur:, until:, base:, range:
- on TDB.gc, adjust base: and compress range: for T::status == recurring
- all recurring tasks are removed from lists by T::*pendingT, and a synthetic
addendum is generated
- when a recurring task is completed, range: is updated, and a synthetic
task is added to completed.data that retains the attributes of the root
- Scenario:
# Today = 6/22/2008
% task add Friday due:6/15/2008 recur:weekly until 8/1/2008
# task must generate a base and range
# base:6/15/2008
# range:-------
# ^6/15
# ^6/22
# ^6/29
# ^7/6
# ^7/13
# ^7/20
# ^7/27
% task ls
1 Friday 6/15/2008 .lte. today (overdue)
2 Friday 6/22/2008 .lte. today (due)
3 Friday 6/29/2008 one recurrence
4 Friday 7/6/2008 (not shown)
5 Friday 7/13/2008 (not shown)
6 Friday 7/20/2008 (not shown)
7 Friday 7/27/2008 (not shown)

32
package-config/README Normal file
View File

@@ -0,0 +1,32 @@
The package-config directory contains the configuration files
for building release packages for the different operating
systems:
* osx: binary packages for Mac OSX
* fedora: rpm packages for Fedora (Linux)
* ubuntu: deb packages for Ubuntu and (Linux)
* cygwin_ bz2 packages for cygwin (windows)
Please visit the corresponding operating systems homepage
for instructions on how to build a binary package of task
out of the released source tarball with these configuration
files.
For Fedora rpm packages you find instructions at
http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo
For Ubuntu deb packages you find instructions at
https://wiki.ubuntu.com/PackagingGuide/Complete
For Cygwin bz2 packages you find instructions at
http://cygwin.com/setup.html
You might also ask in the forums on taskwarrior.org if you
have further questions.
This file and the corresponding package build configuration files
are released under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
Please see the file COPYING in the main directory.

View File

@@ -0,0 +1,10 @@
# setup.hint for task 1.8.1-1
category: Utils
requires: libncurses9 cygwin
sdesc: A command-line to do list manager
ldesc: "Task is a command-line to do list manager.
It has support for GTD functionality and includes
the following features: tags, colorful tabular output,
reports and graphs, lots of manipulation commands,
low-level API, abbreviations for all commands and
options, multiuser file locking, recurring tasks."

View File

@@ -0,0 +1,45 @@
task 1.8.1-1
------------------------------------------
A command-line to do list manager that can be used
with the gtd system.
Runtime requirements:
cygwin-1.5.25 or newer
libncurses
Build requirements:
cygwin-1.5.25 or newer
gcc-3.4.4-1 or newer
libncurses-devel
Canonical homepage:
http://taskwarrior.org
Canonical download:
http://taskwarrior.org/download
License:
GPLv2+
Language:
C++
------------------------------------
Build instructions:
unpack task-1.8.1-1-src.tar.bz2
if you use setup to install this src package,
it will be unpacked under /usr/src automatically
cd /usr/src/task-1.8.1-1
./configure --prefix=/usr
make
make install
------------------------------------
task was packaged for cygwin by
Federico Hernandez <ultrafredde@gmail.com> and
is licensed under the GPL
---- task-1.8.1-1 -- 2009-08-20 ----

View File

@@ -0,0 +1,63 @@
diff -Nrup task-1.8.1-1/CYGWIN-PATCHES/setup.hint task-1.8.1-1.cygwin/CYGWIN-PATCHES/setup.hint
--- task-1.8.1-1/CYGWIN-PATCHES/setup.hint 1970-01-01 01:00:00.000000000 +0100
+++ task-1.8.1-1.cygwin/CYGWIN-PATCHES/setup.hint 2009-08-20 15:47:56.304750000 +0200
@@ -0,0 +1,10 @@
+# setup.hint for task 1.8.1-1
+category: Utils
+requires: libncurses9 cygwin
+sdesc: A command-line to do list manager
+ldesc: "Task is a command-line to do list manager.
+It has support for GTD functionality and includes
+the following features: tags, colorful tabular output,
+reports and graphs, lots of manipulation commands,
+low-level API, abbreviations for all commands and
+options, multiuser file locking, recurring tasks."
diff -Nrup task-1.8.1-1/CYGWIN-PATCHES/task-1.8.1-1.README task-1.8.1-1.cygwin/CYGWIN-PATCHES/task-1.8.1-1.README
--- task-1.8.1-1/CYGWIN-PATCHES/task-1.8.1-1.README 1970-01-01 01:00:00.000000000 +0100
+++ task-1.8.1-1.cygwin/CYGWIN-PATCHES/task-1.8.1-1.README 2009-08-20 15:47:44.320375000 +0200
@@ -0,0 +1,45 @@
+task 1.8.1-1
+------------------------------------------
+
+A command-line to do list manager that can be used
+with the gtd system.
+
+Runtime requirements:
+ cygwin-1.5.25 or newer
+ libncurses
+
+Build requirements:
+ cygwin-1.5.25 or newer
+ gcc-3.4.4-1 or newer
+ libncurses-devel
+
+Canonical homepage:
+ http://taskwarrior.org
+
+Canonical download:
+ http://taskwarrior.org/download
+
+License:
+ GPLv2+
+
+Language:
+ C++
+
+------------------------------------
+
+Build instructions:
+ unpack task-1.8.1-1-src.tar.bz2
+ if you use setup to install this src package,
+ it will be unpacked under /usr/src automatically
+ cd /usr/src/task-1.8.1-1
+ ./configure --prefix=/usr
+ make
+ make install
+
+------------------------------------
+
+task was packaged for cygwin by
+Federico Hernandez <ultrafredde@gmail.com> and
+is licensed under the GPL
+
+---- task-1.8.1-1 -- 2009-08-20 ----

View File

@@ -0,0 +1,45 @@
task 1.8.1-1
------------------------------------------
A command-line to do list manager that can be used
with the gtd system.
Runtime requirements:
cygwin-1.5.25 or newer
libncurses
Build requirements:
cygwin-1.5.25 or newer
gcc-3.4.4-1 or newer
libncurses-devel
Canonical homepage:
http://taskwarrior.org
Canonical download:
http://taskwarrior.org/download
License:
GPLv2+
Language:
C++
------------------------------------
Build instructions:
unpack task-1.8.1-1-src.tar.bz2
if you use setup to install this src package,
it will be unpacked under /usr/src automatically
cd /usr/src/task-1.8.1-1
./configure --prefix=/usr
make
make install
------------------------------------
task was packaged for cygwin by
Federico Hernandez <ultrafredde@gmail.com> and
is licensed under the GPL
---- task-1.8.1-1 -- 2009-08-20 ----

View File

@@ -0,0 +1,71 @@
Name: task
Version: 1.8.1
Release: 1%{?dist}
Summary: A command-line to do list manager
Group: Applications/Productivity
License: GPLv2+
URL: http://taskwarrior.org
Source0: http://taskwarrior.org/download/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel
%description
Task is a command-line to do list manager. It has
support for GTD functionality and includes the
following features: tags, colorful tabular output,
reports and graphs, lots of manipulation commands,
low-level API, abbreviations for all commands and
options, multiuser file locking, recurring tasks.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
install -m 644 -T scripts/bash/task_completion.sh $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/task
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README scripts i18n
%{_bindir}/task
%{_mandir}/man1/task.1.gz
%{_mandir}/man5/taskrc.5.gz
%{_mandir}/man5/task-tutorial.5.gz
%config(noreplace) %{_sysconfdir}/bash_completion.d
%changelog
* Thu Aug 20 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.1-1
Intial RPM for task bugfix release 1.8.1
* Tue Jul 21 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.0-1
Intial RPM for task release 1.8.0
* Mon Jul 13 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.0.beta3-1
Intial RPM for task beta release 1.8.0.beta3
* Wed Jul 08 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.0.beta2-1
Intial RPM for task beta release 1.8.0.beta2
* Tue Jul 07 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.8.0.beta1-1
Intial RPM for task beta release 1.8.0.beta1
* Tue Jun 08 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.1-2
- Fixed inclusion of manpages.
* Tue Jun 08 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.1-1
- Initial RPM for bugfix release 1.7.1.
- Updated references to new project homepage in spec file.
* Tue May 19 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.0-2
- Changed license to GPLv2+ and removed Requires macro.
- See https://bugzilla.redhat.com/show_bug.cgi?id=501498
* Tue May 19 2009 Federico Hernandez <ultrafredde@gmail.com> - 1.7.0-1
- Initial RPM.

View File

@@ -0,0 +1,281 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@@ -0,0 +1,24 @@
Thank you for taking a look at task!
Task is a GTD, todo list, task management, command line utility with a multitude
of features. It is a portable, well supported, very active project, and it is
Open Source. Task has binary distributions, online documentation, demonstration
movies, and you'll find all the details at the site:
http://taskwarrior.org
At the site you'll find a wiki, discussion forums, downloads, news and more.
Your contributions are especially welcome. Whether it comes in the form of
code patches, ideas, discussion, bug reports or just encouragement, your input
is needed.
Please send your support questions and code patches to:
support@taskwarrior.org
Consider joining taskwarrior.org and participating in the future of task.
---

View File

@@ -0,0 +1 @@
<pkg-contents spec="1.12"><f n="task" o="root" g="wheel" p="33261" pt="/Users/paul/task.git/package-config/osx/binary/task" m="false" t="file"><mod>group</mod><mod>owner</mod></f></pkg-contents>

View File

@@ -0,0 +1 @@
<pkgref spec="1.12" uuid="C71026FD-E252-42CD-89C3-2F6F087AAF17"><config><identifier>com.beckingham.task182.task.pkg</identifier><version>1.8.2</version><description></description><post-install type="none"/><requireAuthorization/><installFrom mod="true">/Users/paul/task.git/package-config/osx/binary/task</installFrom><installTo mod="true" relocatable="true">/usr/local/bin</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo</mod><mod>locationType</mod><mod>relocatable</mod><mod>identifier</mod><mod>parent</mod><mod>version</mod><mod>installTo.path</mod></config><contents><file-list>01task-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>

View File

@@ -0,0 +1 @@
<pkmkdoc spec="1.12"><properties><title>Task 1.8.2</title><build>/Users/paul/Desktop/task-1.8.2.pkg</build><organization>com.beckingham</organization><userSees ui="both"/><min-target os="3"/><domain anywhere="true" system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="task" id="choice0" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.beckingham.task182.task.pkg"/><choice-reqs><requirement id="tosv" operator="ge" value="'10.6.0'" selected="no" enabled="no" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"/></choice-reqs></choice></contents><resources bg-scale="proportional" bg-align="center"><locale lang="en"><resource mod="true" type="license">/Users/paul/task.git/package-config/osx/binary/COPYING.txt</resource><resource mod="true" type="readme">/Users/paul/task.git/package-config/osx/binary/README.txt</resource></locale></resources><flags/><item type="file">01task.xml</item><mod>properties.title</mod><mod>properties.customizeOption</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>

View File

@@ -0,0 +1,46 @@
task (1.8.1-0ubuntu1) jaunty; urgency=low
* Initial deb package for task bugfix release 1.8.1
-- Federico Hernandez <ultrafredde@gmail.com> Thu, 20 Aug 2009 20:26:33 +0200
task (1.8.0-0ubuntu1) jaunty; urgency=low
* Initial deb package for task release 1.8.0
-- Federico Hernandez <ultrafredde@gmail.com> Tue, 21 Jul 2009 15:26:33 +0200
task (1.8.0-0ubuntu1~beta3) jaunty; urgency=low
* Initial deb package for task beta release 1.8.0.beta3
-- Federico Hernandez <ultrafredde@gmail.com> Mon, 13 Jul 2009 15:09:38 +0200
task (1.8.0-0ubuntu1~beta2) jaunty; urgency=low
* Initial deb package for task beta release 1.8.0.beta2
-- Federico Hernandez <ultrafredde@gmail.com> Wed, 08 Jul 2009 15:40:50 +0200
task (1.8.0-0ubuntu1~beta1) jaunty; urgency=low
* Initial deb package for task beta release 1.8.0.beta1
-- Federico Hernandez <ultrafredde@gmail.com> Tue, 07 Jul 2009 01:35:28 +0200
task (1.7.1-0ubuntu1) jaunty; urgency=low
* Initial deb package for bugfix release 1.7.1
* Updated references to new project homepage in control file.
* dpatch not longer neededas upstream version contains fix
for taskrc.5 bug
-- Federico Hernandez <ultrafredde@gmail.com> Tue, 09 Jun 2009 11:49:51 +0200
task (1.7.0-0ubuntu1) jaunty; urgency=low
* Initial release (LP: #378847)
* Fixed bug in taskrc.5 man page from upstream project
which made lintian complain
-- Federico Hernandez <ultrafredde@gmail.com> Wed, 27 May 2009 23:57:08 +0200

View File

@@ -0,0 +1 @@
7

View File

@@ -0,0 +1,19 @@
Source: task
Section: utils
Priority: optional
Maintainer: Federico Hernandez <ultrafredde@gmail.com>
XSBC-Original-Maintainer: Federico Hernandez <ultrafredde@gmail.com>
Build-Depends: debhelper (>= 7), autotools-dev, libncurses5-dev
Standards-Version: 3.8.0.1
Homepage: http://taskwarrior.org
Package: task
Architecture: any
Depends: ${shlibs:Depends}
Description: A command-line to do list manager
Task is a command-line to do list manager. It has
support for GTD functionality and includes the
following features: tags, colorful tabular output,
reports and graphs, lots of manipulation commands,
low-level API, abbreviations for all commands and
options, multiuser file locking, recurring tasks.

View File

@@ -0,0 +1,59 @@
This package was debianized by:
Federico Hernandez <ultrafredde@gmail.com> on Thu, 20 Aug 2009 20:26:33 +0200
It was downloaded from:
http://taskwarrior.org
Upstream Authors:
Paul Beckingham <paul@beckingham.net>
Federico Hernandez
David J Patrick
John Florian
Damian Glenny
Andy Lester
H. İbrahim Güngör
Stefan Dorn
Michael Greb
Benjamin Tegarden
Chris Pride
Richard Querin
T. Charles Yun
P.C. Shyamshankar
Johan Friis
Steven de Brouwer
Pietro Cerutti
Copyright:
Copyright 2006 - 2009, Paul Beckingham
Copyright 2009 Federico Hernandez
Copyright 2009 P.C. Shyamshankar
Copyright 2009 John Florian
License:
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.
The Debian packaging is:
Copyright (C) 2009, Federico Hernandez <ultrafredde@gmail.com>
and is licensed under the GPL, see above.

View File

@@ -0,0 +1,3 @@
AUTHORS
NEWS
README

View File

@@ -0,0 +1,2 @@
scripts
i18n

View File

@@ -0,0 +1,47 @@
#!/usr/bin/make -f
config.status: configure
dh_testdir
./configure $(CROSS) --prefix=/usr --docdir=$(DATADIR)/doc/task
build: build-stamp
build-stamp: config.status
dh_testdir
$(MAKE)
touch $@
clean:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
$(MAKE) DESTDIR=$(CURDIR)/debian/task install
binary-indep: install
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installman
dh_installexamples
install -D -m644 scripts/bash/task_completion.sh $(CURDIR)/debian/task/etc/bash_completion.d/task
rm -rf $(CURDIR)/debian/task/usr/share/doc/task-1.8.1
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

View File

@@ -0,0 +1,3 @@
version=3
http://taskwarrior.org/download/task-(.*)\.tar\.gz

View File

@@ -1,105 +0,0 @@
Hello, and welcome to this quick demo of the task program.
task add do laundry Let's add some tasks
I need to do laundry
task add project:garage order dumpster Oh yeah, the dumpster
task add +phone tell mom i loveher Must call Mom (that "phone" there is a tag - they are
useful for searching, categorizing)
task add +phone pro:garage schedule
goodwill pickup
task ad +email pro:garage ask Tom if Notice I can abbreviating commands
he wants that old bkie
task ls Let's see what we've got
I spelled bike wrong
task 5 /bkie/bike/
task ls That's better
task 1 pro:home Let's assign projects
task 3 pro:home tell mom I love her
task ls pro:garage
task long pro:garage Let's see all the columns
task list pro:garage There are different ways to list
task lis +phone By tag
task li pro:garage +phone By project and tag
task l mom By word
task 1 priority:H Priorities can be High, Medium or Low
task pri:H 3
task 1 pri:M
task li The list is sorted by priority.
task 2 pri:L
task li
task done 3 Suppose task 3 is done
task li ...and it's gone
task 2 +phone +mistake Lets add tags
# Oops!
task 2 -mistake or remove tags
task tags or look at all the tags
task info 2 or all the details
task projects or all the projects
task 3 fg:bold Let's make it colorful
task 4 fg:bold_green
task li
task 3 fg:bold_underline_white
task li
task 4 bg:on_bright_red fg:bold_yellow
task li Oh that's just nasty - let's get rid of that.
task 4 bg:
task li
task 4 fg:
task 3 fg:
task colors There are many combinations to choose from
(Slashes!!!)
task 1 due:6/8/2008 Let's add a due date
date
task li
task calendar Notice the due task is in yellow, today is marked cyan
task 1 due:5/20/2008 This is now an overdue task
task li and it shows up red
task overdue
task cal
task export file.csv You can export the tasks to a spreadsheet
cat file.csv
task start 1 Started tasks can be used as reminders
of what you are supposed to be doing
task active They show up as active
task done 1 Let's clear out a couple
task li
task done 3
task active
task summary Summary shows progress on all projects
task history History shows general activity - how many added,
completed etc, by month
And that's it. There are more commands than this
covered in the TUTORIAL file, but this should give
the basic idea.
Thank you for watching.

View File

@@ -0,0 +1,127 @@
# bash completion support for task
#
# Copyright 2009 Federico Hernandez
# All rights reserved.
#
# This script is part of the task project.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the
#
# Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor,
# Boston, MA
# 02110-1301
# USA
#
# The routines will do completion of:
#
# *) task subcommands
# *) project names
# *) tag names
#
# To use these routines:
#
# 1) Copy this file to somewhere (e.g. ~/.bash_completion.d/.task_completion.sh).
# 2) Added the following line to your .bashrc:
# source ~/.bash_completion.d/task_completion.sh
#
# OR
#
# 3) Copy the file to /etc/bash_complettion.d
# 4) source /etc/bash_completion
#
# To submit patches/bug reports:
#
# *) Go to the projects website at
#
# http://taskwarrior.org
#
_task_get_tags() {
task _tags
}
_task_get_config() {
task _config
}
_task_offer_projects() {
COMPREPLY=( $(compgen -W "$(task _projects)" -- ${cur/*:/}) )
}
_task()
{
local cur prev opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
if [ ${#COMP_WORDS[*]} -gt 2 ]
then
prev2="${COMP_WORDS[COMP_CWORD-2]}"
else
prev2=""
fi
# echo -e "\ncur='$cur'"
# echo "prev='$prev'"
# echo "prev2='$prev2'"
opts="$(task _commands) $(task _ids)"
case "${prev}" in
:)
case "${prev2}" in
pro*)
_task_offer_projects
return 0
;;
esac
;;
*)
case "${cur}" in
pro*:*)
_task_offer_projects
return 0
;;
:)
case "${prev}" in
pro*)
_task_offer_projects
return 0
;;
esac
;;
+*)
local tags=$(_task_get_tags | sed 's/^/+/')
COMPREPLY=( $(compgen -W "${tags}" -- ${cur}) )
return 0
;;
-*)
local tags=$(_task_get_tags | sed 's/^/-/')
COMPREPLY=( $(compgen -W "${tags}" -- ${cur}) )
return 0
;;
rc.*)
local config=$(_task_get_config | sed -e 's/^/rc\./' -e 's/$/:/')
COMPREPLY=( $(compgen -W "${config}" -- ${cur}) )
return 0
;;
esac
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
}
complete -o nospace -F _task task

57
scripts/vim/README Normal file
View File

@@ -0,0 +1,57 @@
Configure VIM for Syntax Highlighting of Task Data
The task data files (pending.data, completed.data and undo.data) as well as
edits made via commands like "task 1 edit" can be color-highlighted if you
happen to use VIM as your preferred text editor. Eventually this will happen
automatically in newer versions of VIM, but for now you have to do a little
bit of file shuffling.
Prerequisites
For this to work, you need to first have syntax highlighting enabled when you
use VIM. This happens to be the default for most VIM installations, but it is
usually quite simple if that doesn't happen to be so in your case. Rather than
repeat the excellent VIM documentation here, please see the appropriate VIM
documentation itself. Generally this can be made seen by starting vim/gvim and
issuing the following command:
:help syntax
You may prefer instead to read the help online at:
http://vimdoc.sourceforge.net/htmldoc/syntax.html#syntax
Configuring VIM to Understand Task Data
Once you have VIM's syntax highlighting enabled and working with other file
types properly, configuring it for use with task is simple. You simply need to
copy some files that came with task into your home directory so that you have:
~/.vim/ftdetect/task.vim
~/.vim/syntax/taskdata.vim
~/.vim/syntax/taskedit.vim
The source of these files varies depending on how you installed task. If you
installed task via a regular package (rpm or deb) you can find these files in
/usr/share/doc/task-VERSION/scripts/vim/. If you built task yourself from the
tarball (using the default configure options), these will be in
/usr/local/share/doc/task-VERSION/scripts/vim/ instead. So you should be able
to do one of the following:
cp -av /usr/share/doc/task-VERSION/scripts/vim/* ~/.vim/
or
cp -av /usr/local/share/doc/task-VERSION/scripts/vim/* ~/.vim/
You should then be ready to go.
---
All three above mentioned files are
Copyright 2009 John Florian
and are available under the GNU Public License version 2 or later.
For the full text of this license, see COPYING.

View File

@@ -0,0 +1,18 @@
" Vim support file to detect task data files and single task edits
"
" Maintainer: John Florian <jflorian@doubledog.org>
" Updated: Wed Jul 8 19:45:55 EDT 2009
"
" Copyright 2009 John Florian
"
" This file is available under the GNU Public License version 2 or later.
" For the full text of this license, see COPYING.
" for the raw data files
au BufRead,BufNewFile {pending,completed,undo}.data set filetype=taskdata
" for 'task 42 edit'
au BufRead,BufNewFile *.task set filetype=taskedit
" vim:noexpandtab

View File

@@ -0,0 +1,48 @@
" Vim syntax file
" Language: task data
" Maintainer: John Florian <jflorian@doubledog.org>
" Updated: Wed Jul 8 19:46:20 EDT 2009
"
" Copyright 2009 John Florian
"
" This file is available under the GNU Public License version 2 or later.
" For the full text of this license, see COPYING.
" For version 5.x: Clear all syntax items.
" For version 6.x: Quit when a syntax file was already loaded.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Key Names for values.
syn keyword taskdataKey description due end entry imask mask parent
syn keyword taskdataKey priority project recur start status tags uuid
syn match taskdataKey "annotation_\d\+"
syn match taskdataUndo "^time.*$"
syn match taskdataUndo "^\(old \|new \|---\)"
" Values associated with key names.
"
" Strings
syn region taskdataString matchgroup=Normal start=+"+ end=+"+
\ contains=taskdataEncoded,taskdataUUID,@Spell
"
" Special Embedded Characters (e.g., "&comma;")
syn match taskdataEncoded "&\a\+;" contained
" UUIDs
syn match taskdataUUID "\x\{8}-\(\x\{4}-\)\{3}\x\{12}" contained
" The default methods for highlighting. Can be overridden later.
hi def link taskdataEncoded Function
hi def link taskdataKey Statement
hi def link taskdataString String
hi def link taskdataUUID Special
hi def link taskdataUndo Type
let b:current_syntax = "taskdata"
" vim:noexpandtab

View File

@@ -0,0 +1,40 @@
" Vim syntax file
" Language: support for 'task 42 edit'
" Maintainer: John Florian <jflorian@doubledog.org>
" Updated: Wed Jul 8 19:46:32 EDT 2009
"
" Copyright 2009 John Florian
"
" This file is available under the GNU Public License version 2 or later.
" For the full text of this license, see COPYING.
" For version 5.x: Clear all syntax items.
" For version 6.x: Quit when a syntax file was already loaded.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn match taskeditHeading "^\s*#\s*Name\s\+Editable details\s*$" contained
syn match taskeditHeading "^\s*#\s*-\+\s\+-\+\s*$" contained
syn match taskeditReadOnly "^\s*#\s*\(UU\)\?ID:.*$" contained
syn match taskeditReadOnly "^\s*#\s*Status:.*$" contained
syn match taskeditReadOnly "^\s*#\s*i\?Mask:.*$" contained
syn match taskeditKey "^ *.\{-}:" nextgroup=taskeditString
syn match taskeditComment "^\s*#.*$"
\ contains=taskeditReadOnly,taskeditHeading
syn match taskeditString ".*$" contained contains=@Spell
" The default methods for highlighting. Can be overridden later.
hi def link taskeditComment Comment
hi def link taskeditHeading Function
hi def link taskeditKey Statement
hi def link taskeditReadOnly Special
hi def link taskeditString String
let b:current_syntax = "taskedit"
" vim:noexpandtab

58
scripts/zsh/_task Normal file
View File

@@ -0,0 +1,58 @@
#compdef task
# zsh completion for task
#
# Copyright 2009 P.C. Shyamshankar
# All rights reserved.
#
# This script is part of the task project.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the
#
# Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor,
# Boston, MA
# 02110-1301
# USA
#
typeset -g _task_cmds
_task_cmds=($(task rubbish-command | sed -n -e 's/^\s\+task \(\w\+\) .*/\1/p' | grep -v ID))
# As of task 1.7.0,
# _task_cmds=(add append annotate completed edit duplicate delete undelete info start stop done undo projects tags summary timesheet history ghistory next calendar active overdue stats import export color version help list long ls newest oldest)
_task() {
_arguments -s -S \
"*::task command:_task_commands"
return 0
}
(( $+functions[_task_commands] )) ||
_task_commands() {
local cmd ret=1
if (( CURRENT == 1 )); then
_describe -t commands 'task command' _task_cmds
else
local curcontext="${curcontext}"
cmd="${_task_cmds[(r)$words[1]:*]%%:*}"
if (( $#cmd )); then
curcontext="${curcontext%:*:*}:task-${cmd}"
_call_function ret _task_${cmd} || _message "No command remaining."
else
_message "Unknown subcommand ${cmd}"
fi
return ret
fi
}

2
src/.gitignore vendored
View File

@@ -1,2 +1,2 @@
./Makefile
*.o
Makefile.in

782
src/Att.cpp Normal file
View File

@@ -0,0 +1,782 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include "text.h"
#include "color.h"
#include "util.h"
#include "Date.h"
#include "Duration.h"
#include "Context.h"
#include "Att.h"
extern Context context;
static const char* internalNames[] =
{
"entry",
"start",
"end",
"parent",
"uuid",
"mask",
"imask",
"limit",
"status",
"description",
};
static const char* modifiableNames[] =
{
"project",
"priority",
"fg",
"bg",
"due",
"recur",
"until",
"wait",
};
// Synonyms on the same line.
static const char* modifierNames[] =
{
"before", "under", "below",
"after", "over", "above",
"none",
"any",
"is", "equals",
"isnt", "not",
"has", "contains",
"hasnt",
"startswith", "left",
"endswith", "right",
};
#define NUM_INTERNAL_NAMES (sizeof (internalNames) / sizeof (internalNames[0]))
#define NUM_MODIFIABLE_NAMES (sizeof (modifiableNames) / sizeof (modifiableNames[0]))
#define NUM_MODIFIER_NAMES (sizeof (modifierNames) / sizeof (modifierNames[0]))
////////////////////////////////////////////////////////////////////////////////
Att::Att ()
: mName ("")
, mValue ("")
, mMod ("")
{
}
////////////////////////////////////////////////////////////////////////////////
Att::Att (const std::string& name, const std::string& mod, const std::string& value)
{
mName = name;
mValue = value;
mMod = mod;
}
////////////////////////////////////////////////////////////////////////////////
Att::Att (const std::string& name, const std::string& mod, int value)
{
mName = name;
std::stringstream s;
s << value;
mValue = s.str ();
mMod = mod;
}
////////////////////////////////////////////////////////////////////////////////
Att::Att (const std::string& name, const std::string& value)
{
mName = name;
mValue = value;
mMod = "";
}
////////////////////////////////////////////////////////////////////////////////
Att::Att (const std::string& name, int value)
{
mName = name;
std::stringstream s;
s << value;
mValue = s.str ();
mMod = "";
}
////////////////////////////////////////////////////////////////////////////////
Att::Att (const Att& other)
{
mName = other.mName;
mValue = other.mValue;
mMod = other.mMod;
}
////////////////////////////////////////////////////////////////////////////////
Att& Att::operator= (const Att& other)
{
if (this != &other)
{
mName = other.mName;
mValue = other.mValue;
mMod = other.mMod;
}
return *this;
}
////////////////////////////////////////////////////////////////////////////////
Att::~Att ()
{
}
////////////////////////////////////////////////////////////////////////////////
// For parsing.
bool Att::valid (const std::string& input) const
{
Nibbler n (input);
std::string ignored;
if (n.getUntilOneOf (".:", ignored))
{
if (ignored.length () == 0)
return false;
while (n.skip ('.'))
if (!n.getUntilOneOf (".:", ignored))
return false;
if (n.skip (':') &&
(n.getQuoted ('"', ignored) ||
n.getUntil (' ', ignored) ||
n.getUntilEOS (ignored) ||
n.depleted ()))
return true;
return false;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Att::validInternalName (const std::string& name)
{
for (unsigned int i = 0; i < NUM_INTERNAL_NAMES; ++i)
if (name == internalNames[i])
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Att::validModifiableName (const std::string& name)
{
for (unsigned int i = 0; i < NUM_MODIFIABLE_NAMES; ++i)
if (name == modifiableNames[i])
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Att::validNameValue (
const std::string& name,
const std::string& mod,
const std::string& value)
{
std::string writableName = name;
std::string writableMod = mod;
std::string writableValue = value;
return Att::validNameValue (writableName, writableMod, writableValue);
}
////////////////////////////////////////////////////////////////////////////////
bool Att::validNameValue (
std::string& name,
std::string& mod,
std::string& value)
{
// First, guess at the full attribute name.
std::vector <std::string> candidates;
for (unsigned i = 0; i < NUM_INTERNAL_NAMES; ++i)
candidates.push_back (internalNames[i]);
for (unsigned i = 0; i < NUM_MODIFIABLE_NAMES; ++i)
candidates.push_back (modifiableNames[i]);
std::vector <std::string> matches;
autoComplete (name, candidates, matches);
if (matches.size () == 0)
return false;
else if (matches.size () != 1)
{
std::string error = "Ambiguous attribute '" + name + "' - could be either of "; // TODO i18n
std::string combined;
join (combined, ", ", matches);
throw error + combined;
}
name = matches[0];
// Second, guess at the modifier name.
if (mod != "")
{
candidates.clear ();
for (unsigned i = 0; i < NUM_MODIFIER_NAMES; ++i)
candidates.push_back (modifierNames[i]);
matches.clear ();
autoComplete (mod, candidates, matches);
if (matches.size () == 0)
throw std::string ("Unrecognized modifier '") + mod + "'";
else if (matches.size () != 1)
{
std::string error = "Ambiguous modifier '" + mod + "' - could be either of "; // TODO i18n
std::string combined;
join (combined, ", ", matches);
error += combined;
throw error + combined;
}
mod = matches[0];
}
// Some attributes are intended to be private, unless the command is read-
// only, in which cased these are perfectly valid elements of a filter.
if (context.cmd.isWriteCommand () &&
!validModifiableName (name))
throw std::string ("\"") +
name +
"\" is not an attribute you may modify directly.";
// Thirdly, make sure the value has the expected form or values.
if (name == "project")
{
if (!noSpaces (value))
throw std::string ("The '") + name + "' attribute may not contain spaces.";
}
else if (name == "priority")
{
if (value != "")
{
value = upperCase (value);
if (value != "H" &&
value != "M" &&
value != "L")
throw std::string ("\"") +
value +
"\" is not a valid priority. Use H, M, L or leave blank.";
}
}
else if (name == "description")
{
if (context.cmd.isWriteCommand ())
{
if (value == "")
throw std::string ("The '") + name + "' attribute must not be blank.";
if (!noVerticalSpace (value))
throw std::string ("The '") + name + "' attribute must not contain vertical white space.";
}
}
else if (name == "fg" || name == "bg")
{
if (value != "")
Text::guessColor (value);
}
else if (name == "due" ||
name == "until" ||
name == "wait")
{
// Validate and convert to epoch.
if (value != "")
value = Date (value, context.config.get ("dateformat", "m/d/Y")).toEpochString ();
}
else if (name == "recur")
{
// Just validate, don't convert to days.
Duration d;
if (value != "")
d.parse (value);
}
else if (name == "limit")
{
if (value == "" || !digitsOnly (value))
throw std::string ("The '") + name + "' attribute must be an integer.";
}
else if (name == "status")
{
value = lowerCase (value);
std::vector <std::string> matches;
std::vector <std::string> candidates;
candidates.push_back ("pending");
candidates.push_back ("completed");
candidates.push_back ("deleted");
candidates.push_back ("recurring");
candidates.push_back ("waiting");
autoComplete (value, candidates, matches);
if (matches.size () == 1)
value = matches[0];
else
throw std::string ("\"") +
value +
"\" is not a valid status. Use 'pending', 'completed', 'deleted', 'recurring' or 'waiting'.";
}
else if (! validInternalName (name) &&
! validModifiableName (name))
throw std::string ("'") + name + "' is not a recognized attribute.";
return true;
}
////////////////////////////////////////////////////////////////////////////////
// TODO Obsolete
bool Att::validMod (const std::string& mod)
{
for (unsigned int i = 0; i < NUM_MODIFIER_NAMES; ++i)
if (modifierNames[i] == mod)
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
// The type of an attribute is useful for modifier evaluation.
std::string Att::type (const std::string& name) const
{
if (name == "due" ||
name == "until" ||
name == "start" ||
name == "entry" ||
name == "end" ||
name == "wait")
return "date";
else if (name == "recur")
return "duration";
else if (name == "limit")
return "number";
else
return "text";
}
////////////////////////////////////////////////////////////////////////////////
// The type of an attribute is useful for modifier evaluation.
std::string Att::modType (const std::string& name) const
{
if (name == "hasnt" ||
name == "isnt")
return "negative";
return "positive";
}
////////////////////////////////////////////////////////////////////////////////
//
// start --> name --> . --> mod --> : --> " --> value --> " --> end
// | ^
// |_____________________|
//
void Att::parse (const std::string& input)
{
Nibbler n (input);
parse (n);
}
void Att::parse (Nibbler& n)
{
// Ensure a clean object first.
mName = "";
mValue = "";
mMod = "";
if (n.getUntilOneOf (".:", mName))
{
if (mName.length () == 0)
throw std::string ("Missing attribute name"); // TODO i18n
if (n.skip ('.'))
{
std::string mod;
if (n.getUntil (":", mod))
{
if (validMod (mod))
mMod = mod;
else
throw std::string ("The name '") + mod + "' is not a valid modifier"; // TODO i18n
}
else
throw std::string ("Missing . or : after modifier"); // TODO i18n
}
if (n.skip (':'))
{
// Both quoted and unquoted Att's are accepted.
// Consider removing this for a stricter parse.
if (n.getQuoted ('"', mValue) ||
n.getUntil (' ', mValue))
{
decode (mValue);
}
}
else
throw std::string ("Missing : after attribute name"); // TODO i18n
}
else
throw std::string ("Missing : after attribute name"); // TODO i18n
/* TODO This might be too slow to include. Test this assumption.
validNameValue (mName, mMod, mValue);
*/
}
////////////////////////////////////////////////////////////////////////////////
// "this" is the attribute that has modifiers. "other" is the attribute from a
// Record that does not have modifiers, but may have a value.
bool Att::match (const Att& other) const
{
// All matches are assumed to pass, any short-circuit on non-match.
// If there are no mods, just perform a straight compare on value.
if (mMod == "")
{
if (mValue != other.mValue)
return false;
}
// has = contains as a substring.
else if (mMod == "has" || mMod == "contains") // TODO i18n
{
if (other.mValue.find (mValue) == std::string::npos)
return false;
}
// is = equal. Nop.
else if (mMod == "is" || mMod == "equals") // TODO i18n
{
if (mValue != other.mValue)
return false;
}
// isnt = not equal.
else if (mMod == "isnt" || mMod == "not") // TODO i18n
{
if (mValue == other.mValue)
return false;
}
// any = any value, but not empty value.
else if (mMod == "any") // TODO i18n
{
if (other.mValue == "")
return false;
}
// none = must have empty value.
else if (mMod == "none") // TODO i18n
{
if (other.mValue != "")
return false;
}
// startswith = first characters must match.
else if (mMod == "startswith" || mMod == "left") // TODO i18n
{
if (other.mValue.length () < mValue.length ())
return false;
if (mValue != other.mValue.substr (0, mValue.length ()))
return false;
}
// endswith = last characters must match.
else if (mMod == "endswith" || mMod == "right") // TODO i18n
{
if (other.mValue.length () < mValue.length ())
return false;
if (mValue != other.mValue.substr (
other.mValue.length () - mValue.length (),
std::string::npos))
return false;
}
// hasnt = does not contain as a substring.
else if (mMod == "hasnt") // TODO i18n
{
if (other.mValue.find (mValue) != std::string::npos)
return false;
}
// before = under = below = <
else if (mMod == "before" || mMod == "under" || mMod == "below")
{
std::string which = type (mName);
if (which == "duration")
{
Duration literal (mValue);
Duration variable ((time_t)::atoi (other.mValue.c_str ()));
if (!(variable < literal))
return false;
}
else if (which == "date")
{
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
Date variable ((time_t)::atoi (other.mValue.c_str ()));
if (other.mValue == "" || ! (variable < literal))
return false;
}
else if (which == "number")
{
if (::atoi (mValue.c_str ()) >= ::atoi (other.mValue.c_str ()))
return false;
}
else if (which == "text")
{
if (mValue <= other.mValue)
return false;
}
}
// after = over = above = >
else if (mMod == "after" || mMod == "over" || mMod == "above")
{
std::string which = type (mName);
if (which == "duration")
{
Duration literal (mValue);
Duration variable ((time_t)::atoi (other.mValue.c_str ()));
if (! (variable > literal))
return false;
}
else if (which == "date")
{
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
Date variable ((time_t)::atoi (other.mValue.c_str ()));
if (! (variable > literal))
return false;
}
else if (which == "number")
{
if (::atoi (mValue.c_str ()) <= ::atoi (other.mValue.c_str ()))
return false;
}
else if (which == "text")
{
if (mValue >= other.mValue)
return false;
}
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
// name : " value "
std::string Att::composeF4 () const
{
std::string output = "";
if (mName != "" && mValue != "")
{
std::string value = mValue;
encode (value);
enquote (value);
output += mName + ":" + value;
}
return output;
}
////////////////////////////////////////////////////////////////////////////////
void Att::mod (const std::string& input)
{
if (input != "" && !validMod (input))
throw std::string ("The name '") + input + "' is not a valid modifier"; // TODO i18n
mMod = input;
}
////////////////////////////////////////////////////////////////////////////////
std::string Att::mod () const
{
return mMod;
}
////////////////////////////////////////////////////////////////////////////////
std::string Att::name () const
{
return mName;
}
////////////////////////////////////////////////////////////////////////////////
void Att::name (const std::string& name)
{
mName = name;
}
////////////////////////////////////////////////////////////////////////////////
std::string Att::value () const
{
return mValue;
}
////////////////////////////////////////////////////////////////////////////////
void Att::value (const std::string& value)
{
mValue = value;
}
////////////////////////////////////////////////////////////////////////////////
int Att::value_int () const
{
return ::atoi (mValue.c_str ());
}
////////////////////////////////////////////////////////////////////////////////
void Att::value_int (int value)
{
std::stringstream s;
s << value;
mValue = s.str ();
}
////////////////////////////////////////////////////////////////////////////////
// Add quotes.
void Att::enquote (std::string& value) const
{
value = '"' + value + '"';
}
////////////////////////////////////////////////////////////////////////////////
// Remove quotes. Instead of being picky, just remove them all. There should
// be none within the value, and this will correct for one possible corruption
// that hand-editing the pending.data file could cause.
void Att::dequote (std::string& value) const
{
std::string::size_type quote;
while ((quote = value.find ('"')) != std::string::npos)
value.replace (quote, 1, "");
}
////////////////////////////////////////////////////////////////////////////////
// Encode values prior to serialization.
// \t -> &tab;
// " -> &quot;
// , -> &comma;
// [ -> &open;
// ] -> &close;
// : -> &colon;
void Att::encode (std::string& value) const
{
std::string::size_type i;
while ((i = value.find ('\t')) != std::string::npos)
value.replace (i, 1, "&tab;"); // no i18n
while ((i = value.find ('\'')) != std::string::npos)
value.replace (i, 1, "&squot;"); // no i18n
while ((i = value.find ('"')) != std::string::npos)
value.replace (i, 1, "&dquot;"); // no i18n
while ((i = value.find (',')) != std::string::npos)
value.replace (i, 1, "&comma;"); // no i18n
while ((i = value.find ('[')) != std::string::npos)
value.replace (i, 1, "&open;"); // no i18n
while ((i = value.find (']')) != std::string::npos)
value.replace (i, 1, "&close;"); // no i18n
while ((i = value.find (':')) != std::string::npos)
value.replace (i, 1, "&colon;"); // no i18n
}
////////////////////////////////////////////////////////////////////////////////
// Decode values after parse.
// \t <- &tab;
// " <- &quot; or &dquot;
// ' <- &squot;
// , <- &comma;
// [ <- &open;
// ] <- &close;
// : <- &colon;
void Att::decode (std::string& value) const
{
std::string::size_type i;
while ((i = value.find ("&tab;")) != std::string::npos) // no i18n
value.replace (i, 5, "\t");
while ((i = value.find ("&dquot;")) != std::string::npos) // no i18n
value.replace (i, 7, "\"");
while ((i = value.find ("&squot;")) != std::string::npos) // no i18n
value.replace (i, 7, "'");
while ((i = value.find ("&quot;")) != std::string::npos) // no i18n
value.replace (i, 6, "\"");
while ((i = value.find ("&comma;")) != std::string::npos) // no i18n
value.replace (i, 7, ",");
while ((i = value.find ("&open;")) != std::string::npos) // no i18n
value.replace (i, 6, "[");
while ((i = value.find ("&close;")) != std::string::npos) // no i18n
value.replace (i, 7, "]");
while ((i = value.find ("&colon;")) != std::string::npos) // no i18n
value.replace (i, 7, ":");
}
////////////////////////////////////////////////////////////////////////////////

85
src/Att.h Normal file
View File

@@ -0,0 +1,85 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_ATT
#define INCLUDED_ATT
#include <string>
#include <vector>
#include "Nibbler.h"
class Att
{
public:
Att ();
Att (const std::string&, const std::string&, const std::string&);
Att (const std::string&, const std::string&, int);
Att (const std::string&, const std::string&);
Att (const std::string&, int);
Att (const Att&);
Att& operator= (const Att&);
~Att ();
bool valid (const std::string&) const;
static bool validInternalName (const std::string&);
static bool validModifiableName (const std::string&);
static bool validNameValue (const std::string&, const std::string&, const std::string&);
static bool validNameValue (std::string&, std::string&, std::string&);
static bool validMod (const std::string&);
std::string type (const std::string&) const;
std::string modType (const std::string&) const;
void parse (const std::string&);
void parse (Nibbler&);
bool match (const Att&) const;
std::string composeF4 () const;
void mod (const std::string&);
std::string mod () const;
std::string name () const;
void name (const std::string&);
std::string value () const;
void value (const std::string&);
int value_int () const;
void value_int (int);
private:
void enquote (std::string&) const;
void dequote (std::string&) const;
void encode (std::string&) const;
void decode (std::string&) const;
private:
std::string mName;
std::string mValue;
std::string mMod;
};
#endif
////////////////////////////////////////////////////////////////////////////////

234
src/Cmd.cpp Normal file
View File

@@ -0,0 +1,234 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include "Cmd.h"
#include "Context.h"
#include "util.h"
#include "text.h"
#include "i18n.h"
#include "main.h"
extern Context context;
////////////////////////////////////////////////////////////////////////////////
Cmd::Cmd ()
: command ("")
{
}
////////////////////////////////////////////////////////////////////////////////
Cmd::Cmd (const std::string& input)
{
parse (input);
}
////////////////////////////////////////////////////////////////////////////////
Cmd::~Cmd ()
{
}
////////////////////////////////////////////////////////////////////////////////
// Determines whether the string represents a unique command name or custom
// report name.
bool Cmd::valid (const std::string& input)
{
load ();
std::vector <std::string> matches;
autoComplete (lowerCase (context.canonicalize (input)), commands, matches);
return matches.size () == 1 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
// Determines whether the string represents a valid custom report name.
bool Cmd::validCustom (const std::string& input)
{
load ();
std::vector <std::string> matches;
autoComplete (lowerCase (context.canonicalize (input)), customReports, matches);
return matches.size () == 1 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
void Cmd::parse (const std::string& input)
{
load ();
std::string candidate = lowerCase (context.canonicalize (input));
std::vector <std::string> matches;
autoComplete (candidate, commands, matches);
if (1 == matches.size ())
command = matches[0];
else if (0 == matches.size ())
command = "";
else
{
std::string error = "Ambiguous command '" + candidate + "' - could be either of "; // TODO i18n
std::string combined;
join (combined, ", ", matches);
throw error + combined;
}
}
////////////////////////////////////////////////////////////////////////////////
void Cmd::load ()
{
if (commands.size () == 0)
{
commands.push_back ("_projects");
commands.push_back ("_tags");
commands.push_back ("_commands");
commands.push_back ("_ids");
commands.push_back ("_config");
commands.push_back (context.stringtable.get (CMD_ADD, "add"));
commands.push_back (context.stringtable.get (CMD_APPEND, "append"));
commands.push_back (context.stringtable.get (CMD_ANNOTATE, "annotate"));
commands.push_back (context.stringtable.get (CMD_CALENDAR, "calendar"));
commands.push_back (context.stringtable.get (CMD_COLORS, "colors"));
commands.push_back (context.stringtable.get (CMD_DELETE, "delete"));
commands.push_back (context.stringtable.get (CMD_DONE, "done"));
commands.push_back (context.stringtable.get (CMD_DUPLICATE, "duplicate"));
commands.push_back (context.stringtable.get (CMD_EDIT, "edit"));
commands.push_back (context.stringtable.get (CMD_EXPORT, "export"));
commands.push_back (context.stringtable.get (CMD_HELP, "help"));
commands.push_back (context.stringtable.get (CMD_HISTORY, "history"));
commands.push_back (context.stringtable.get (CMD_GHISTORY, "ghistory"));
commands.push_back (context.stringtable.get (CMD_IMPORT, "import"));
commands.push_back (context.stringtable.get (CMD_INFO, "info"));
commands.push_back (context.stringtable.get (CMD_PROJECTS, "projects"));
#ifdef FEATURE_SHELL
commands.push_back (context.stringtable.get (CMD_SHELL, "shell"));
#endif
commands.push_back (context.stringtable.get (CMD_START, "start"));
commands.push_back (context.stringtable.get (CMD_STATS, "stats"));
commands.push_back (context.stringtable.get (CMD_STOP, "stop"));
commands.push_back (context.stringtable.get (CMD_SUMMARY, "summary"));
commands.push_back (context.stringtable.get (CMD_TAGS, "tags"));
commands.push_back (context.stringtable.get (CMD_TIMESHEET, "timesheet"));
commands.push_back (context.stringtable.get (CMD_UNDO, "undo"));
commands.push_back (context.stringtable.get (CMD_VERSION, "version"));
// Now load the custom reports.
std::vector <std::string> all;
context.config.all (all);
foreach (i, all)
{
if (i->substr (0, 7) == "report.")
{
std::string report = i->substr (7, std::string::npos);
std::string::size_type columns = report.find (".columns");
if (columns != std::string::npos)
{
report = report.substr (0, columns);
// Make sure a custom report does not clash with a built-in
// command.
if (std::find (commands.begin (), commands.end (), report) != commands.end ())
throw std::string ("Custom report '") + report +
"' conflicts with built-in task command.";
// A custom report is also a command.
customReports.push_back (report);
commands.push_back (report);
}
}
}
}
}
////////////////////////////////////////////////////////////////////////////////
void Cmd::allCustomReports (std::vector <std::string>& all) const
{
all = customReports;
}
////////////////////////////////////////////////////////////////////////////////
void Cmd::allCommands (std::vector <std::string>& all) const
{
all.clear ();
foreach (command, commands)
if (command->substr (0, 1) != "_")
all.push_back (*command);
}
////////////////////////////////////////////////////////////////////////////////
// Commands that do not directly modify the data files.
bool Cmd::isReadOnlyCommand ()
{
if (command == "_projects" ||
command == "_tags" ||
command == "_commands" ||
command == "_ids" ||
command == "_config" ||
command == context.stringtable.get (CMD_CALENDAR, "calendar") ||
command == context.stringtable.get (CMD_COLORS, "colors") ||
command == context.stringtable.get (CMD_EXPORT, "export") ||
command == context.stringtable.get (CMD_HELP, "help") ||
command == context.stringtable.get (CMD_HISTORY, "history") ||
command == context.stringtable.get (CMD_GHISTORY, "ghistory") ||
command == context.stringtable.get (CMD_INFO, "info") ||
command == context.stringtable.get (CMD_PROJECTS, "projects") ||
command == context.stringtable.get (CMD_SHELL, "shell") ||
command == context.stringtable.get (CMD_STATS, "stats") ||
command == context.stringtable.get (CMD_SUMMARY, "summary") ||
command == context.stringtable.get (CMD_TAGS, "tags") ||
command == context.stringtable.get (CMD_TIMESHEET, "timesheet") ||
command == context.stringtable.get (CMD_VERSION, "version") ||
validCustom (command))
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
// Commands that directly modify the data files.
bool Cmd::isWriteCommand ()
{
if (command == context.stringtable.get (CMD_ADD, "add") ||
command == context.stringtable.get (CMD_APPEND, "append") ||
command == context.stringtable.get (CMD_ANNOTATE, "annotate") ||
command == context.stringtable.get (CMD_DELETE, "delete") ||
command == context.stringtable.get (CMD_DONE, "done") ||
command == context.stringtable.get (CMD_DUPLICATE, "duplicate") ||
command == context.stringtable.get (CMD_EDIT, "edit") ||
command == context.stringtable.get (CMD_IMPORT, "import") ||
command == context.stringtable.get (CMD_START, "start") ||
command == context.stringtable.get (CMD_STOP, "stop") ||
command == context.stringtable.get (CMD_UNDO, "undo"))
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////

64
src/Cmd.h Normal file
View File

@@ -0,0 +1,64 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_CMD
#define INCLUDED_CMD
#include <vector>
#include <string>
class Cmd
{
public:
Cmd (); // Default constructor
Cmd (const std::string&); // Default constructor
~Cmd (); // Destructor
Cmd (const Cmd&);
Cmd& operator= (const Cmd&);
bool valid (const std::string&);
bool validCustom (const std::string&);
void parse (const std::string&);
void allCustomReports (std::vector <std::string>&) const;
void allCommands (std::vector <std::string>&) const;
bool isReadOnlyCommand ();
bool isWriteCommand ();
public:
std::string command;
private:
void load ();
private:
std::vector <std::string> commands;
std::vector <std::string> customReports;
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2008, Paul Beckingham.
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -32,12 +32,20 @@
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
#include "task.h"
#include "Config.h"
#include "text.h"
#include "util.h"
////////////////////////////////////////////////////////////////////////////////
// These are default (but overridable) reports. These entries are necessary
// because these three reports were converted from hard-coded reports to custom
// reports, and therefore need these config file entries. However, users are
// already used to seeing these five reports, but do not have these entries.
// The choice was a) make users edit their .taskrc files, b) write a .taskrc
// upgrade program to make the change, or c) this.
Config::Config ()
{
setDefaults ();
}
////////////////////////////////////////////////////////////////////////////////
@@ -47,9 +55,9 @@ Config::Config (const std::string& file)
}
////////////////////////////////////////////////////////////////////////////////
// Read the Configuration filee and populate the *this map. The file format
// is simply lines with name=value pairs. Whitespace between name, = and value
// is not tolerated, but blank lines and comments starting with # are allowed.
// Read the Configuration file and populate the *this map. The file format is
// simply lines with name=value pairs. Whitespace between name, = and value is
// not tolerated, but blank lines and comments starting with # are allowed.
bool Config::load (const std::string& file)
{
std::ifstream in;
@@ -60,20 +68,20 @@ bool Config::load (const std::string& file)
while (getline (in, line))
{
// Remove comments.
size_type pound = line.find ("#");
std::string::size_type pound = line.find ("#"); // no i18n
if (pound != std::string::npos)
line = line.substr (0, pound);
line = trim (line, " \t");
line = trim (line, " \t"); // no i18n
// Skip empty lines.
if (line.length () > 0)
{
size_type equal = line.find ("=");
std::string::size_type equal = line.find ("="); // no i18n
if (equal != std::string::npos)
{
std::string key = trim (line.substr (0, equal), " \t");
std::string value = trim (line.substr (equal+1, line.length () - equal), " \t");
std::string key = trim (line.substr (0, equal), " \t"); // no i18n
std::string value = trim (line.substr (equal+1, line.length () - equal), " \t"); // no i18n
(*this)[key] = value;
}
}
@@ -87,62 +95,234 @@ bool Config::load (const std::string& file)
}
////////////////////////////////////////////////////////////////////////////////
void Config::createDefault (const std::string& home)
void Config::createDefaultRC (const std::string& rc, const std::string& data)
{
// Strip trailing slash off home directory, if necessary.
std::string terminatedHome = home;
if (home[home.length () - 1] == '/')
terminatedHome = home.substr (0, home.length () - 1);
// Create a sample .taskrc file.
std::stringstream contents;
contents << "# Task program configuration file.\n"
<< "# For more documentation, see http://taskwarrior.org\n"
<< "\n"
<< "# Files\n"
<< "data.location=" << data << "\n"
<< "locking=on # Use file-level locking\n"
<< "\n"
<< "# Terminal\n"
<< "curses=on # Use ncurses library to determine terminal width\n"
<< "#defaultwidth=80 # Without ncurses, assumed width\n"
<< "#editor=vi # Preferred text editor\n"
<< "\n"
<< "# Miscellaneous\n"
<< "confirmation=yes # Confirmation on delete, big changes\n"
<< "echo.command=yes # Details on command just run\n"
<< "next=2 # How many tasks per project in next report\n"
<< "bulk=2 # > 2 tasks considered 'a lot', for confirmation\n"
<< "nag=You have higher priority tasks. # Nag message to keep you honest\n"
<< "\n"
<< "# Dates\n"
<< "dateformat=m/d/Y # Preferred input and display date format\n"
<< "weekstart=Sunday # Sunday or Monday only\n"
<< "displayweeknumber=yes # Show week numbers on calendar\n"
<< "due=7 # Task is considered due in 7 days\n"
<< "#monthsperline=2 # Number of calendar months on a line\n"
<< "\n"
<< "# Color controls.\n"
<< "color=on # Use color\n"
<< "color.overdue=bold_red # Color of overdue tasks\n"
<< "color.due=bold_yellow # Color of due tasks\n"
<< "color.pri.H=bold # Color of priority:H tasks\n"
<< "#color.pri.M=on_yellow # Color of priority:M tasks\n"
<< "#color.pri.L=on_green # Color of priority:L tasks\n"
<< "#color.pri.none=white on_blue # Color of priority: tasks\n"
<< "color.active=bold_cyan # Color of active tasks\n"
<< "color.tagged=yellow # Color of tagged tasks\n"
<< "#color.tag.bug=yellow # Color of +bug tasks\n"
<< "#color.project.garden=on_green # Color of project:garden tasks\n"
<< "#color.keyword.car=on_blue # Color of description.contains:car tasks\n"
<< "#color.recurring=on_red # Color of recur.any: tasks\n"
<< "#color.header=bold_green # Color of header messages\n"
<< "#color.footnote=bold_green # Color of footnote messages\n"
<< "\n"
<< "#shadow.file=/tmp/shadow.txt # Location of shadow file\n"
<< "#shadow.command=list # Task command for shadow file\n"
<< "#shadow.notify=on # Footnote when updated\n"
<< "\n"
<< "#default.project=foo # Unless otherwise specified\n"
<< "#default.priority=M # Unless otherwise specified\n"
<< "default.command=list # Unless otherwise specified\n"
<< "\n"
<< "# Fields: id,uuid,project,priority,entry,start,due,recur,recur_ind,age,\n"
<< "# age_compact,active,tags,description,description_only\n"
<< "# Description: This report is ...\n"
<< "# Sort: due+,priority-,project+\n"
<< "# Filter: pro:x pri:H +bug limit:10\n"
<< "\n"
<< "# task long\n"
<< "report.long.description=Lists all task, all data, matching the specified criteria\n"
<< "report.long.columns=id,project,priority,entry,start,due,recur,age,tags,description\n"
<< "report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Age,Tags,Description\n"
<< "report.long.sort=due+,priority-,project+\n"
<< "report.long.filter=status:pending\n"
<< "\n"
<< "# task list\n"
<< "report.list.description=Lists all tasks matching the specified criteria\n"
<< "report.list.columns=id,project,priority,due,active,age,description\n"
<< "report.list.labels=ID,Project,Pri,Due,Active,Age,Description\n"
<< "report.list.sort=due+,priority-,project+\n"
<< "report.list.filter=status:pending\n"
<< "\n"
<< "# task ls\n"
<< "report.ls.description=Minimal listing of all tasks matching the specified criteria\n"
<< "report.ls.columns=id,project,priority,description\n"
<< "report.ls.labels=ID,Project,Pri,Description\n"
<< "report.ls.sort=priority-,project+\n"
<< "report.ls.filter=status:pending\n"
<< "\n"
<< "# task newest\n"
<< "report.newest.description=Shows the newest tasks\n"
<< "report.newest.columns=id,project,priority,due,active,age,description\n"
<< "report.newest.labels=ID,Project,Pri,Due,Active,Age,Description\n"
<< "report.newest.sort=id-\n"
<< "report.newest.filter=status:pending limit:10\n"
<< "\n"
<< "# task oldest\n"
<< "report.oldest.description=Shows the oldest tasks\n"
<< "report.oldest.columns=id,project,priority,due,active,age,description\n"
<< "report.oldest.labels=ID,Project,Pri,Due,Active,Age,Description\n"
<< "report.oldest.sort=id+\n"
<< "report.oldest.filter=status:pending limit:10\n"
<< "\n"
<< "# task overdue\n"
<< "report.overdue.description=Lists overdue tasks matching the specified criteria\n"
<< "report.overdue.columns=id,project,priority,due,active,age,description\n"
<< "report.overdue.labels=ID,Project,Pri,Due,Active,Age,Description\n"
<< "report.overdue.sort=due+,priority-,project+\n"
<< "report.overdue.filter=status:pending due.before:today\n"
<< "\n"
<< "# task active\n"
<< "report.active.description=Lists active tasks matching the specified criteria\n"
<< "report.active.columns=id,project,priority,due,active,age,description\n"
<< "report.active.labels=ID,Project,Pri,Due,Active,Age,Description\n"
<< "report.active.sort=due+,priority-,project+\n"
<< "report.active.filter=status:pending start.any:\n"
<< "\n"
<< "# task completed\n"
<< "report.completed.description=Lists completed tasks matching the specified criteria\n"
<< "report.completed.columns=end,project,priority,age,description\n"
<< "report.completed.labels=Complete,Project,Pri,Age,Description\n"
<< "report.completed.sort=end+,priority-,project+\n"
<< "report.completed.filter=status:completed\n"
<< "\n"
<< "# task recurring\n"
<< "report.recurring.description=Lists recurring tasks matching the specified criteria\n"
<< "report.recurring.columns=id,project,priority,due,recur,active,age,description\n"
<< "report.recurring.labels=ID,Project,Pri,Due,Recur,Active,Age,Description\n"
<< "report.recurring.sort=due+,priority-,project+\n"
<< "report.recurring.filter=status:pending parent.any:\n"
<< "\n"
<< "# task waiting\n"
<< "report.waiting.description=Lists all waiting tasks matching the specified criteria\n"
<< "report.waiting.columns=id,project,priority,wait,age,description\n"
<< "report.waiting.labels=ID,Project,Pri,Wait,Age,Description\n"
<< "report.waiting.sort=wait+,priority-,project+\n"
<< "report.waiting.filter=status:waiting\n"
<< "\n"
<< "# task all\n"
<< "report.all.description=Lists all tasks matching the specified criteria\n"
<< "report.all.columns=id,project,priority,due,active,age,description\n"
<< "report.all.labels=ID,Project,Pri,Due,Active,Age,Description\n"
<< "report.all.sort=due+,priority-,project+\n"
<< "\n"
<< "# task next\n"
<< "report.next.description=Lists the most urgent tasks\n"
<< "report.next.columns=id,project,priority,due,active,age,description\n"
<< "report.next.labels=ID,Project,Pri,Due,Active,Age,Description\n"
<< "report.next.sort=due+,priority-,project+\n"
<< "report.next.filter=status:pending\n"
<< "\n";
// Determine default names of init file and task directory.
std::string rcFile = terminatedHome + "/.taskrc";
std::string dataDir = terminatedHome + "/.task";;
spit (rc, contents.str ());
}
// If rcFile is not found, offer to create one.
if (-1 == access (rcFile.c_str (), F_OK))
{
if (confirm (
"A configuration file could not be found in "
+ rcFile
+ "\n\n"
+ "Would you like a sample .taskrc created, so task can proceed?"))
{
// Create a sample .taskrc file.
FILE* out;
if ((out = fopen (rcFile.c_str (), "w")))
{
fprintf (out, "data.location=%s\n", dataDir.c_str ());
fprintf (out, "command.logging=off\n");
fprintf (out, "confirmation=yes\n");
fprintf (out, "next=2\n");
fprintf (out, "dateformat=m/d/Y\n");
fprintf (out, "showage=yes\n");
fprintf (out, "monthsperline=1\n");
fprintf (out, "curses=on\n");
fprintf (out, "color=on\n");
////////////////////////////////////////////////////////////////////////////////
void Config::createDefaultData (const std::string& data)
{
if (access (data.c_str (), F_OK))
mkdir (data.c_str (), S_IRWXU);
}
fprintf (out, "color.overdue=bold_red\n");
fprintf (out, "#color.due=on_bright_yellow\n");
fprintf (out, "#color.pri.H=on_red\n");
fprintf (out, "#color.pri.M=on_yellow\n");
fprintf (out, "#color.pri.L=on_green\n");
fprintf (out, "color.active=bold_cyan\n");
fprintf (out, "color.tagged=yellow\n");
fprintf (out, "#color.tag.bug=yellow\n");
fprintf (out, "#color.project.home=on_green\n");
fprintf (out, "#color.keyword.car=on_blue\n");
////////////////////////////////////////////////////////////////////////////////
void Config::setDefaults ()
{
set ("report.long.description", "Lists all task, all data, matching the specified criteria"); // TODO i18n
set ("report.long.columns", "id,project,priority,entry,start,due,recur,age,tags,description"); // TODO i18n
set ("report.long.labels", "ID,Project,Pri,Added,Started,Due,Recur,Age,Tags,Description"); // TODO i18n
set ("report.long.sort", "due+,priority-,project+"); // TODO i18n
set ("report.long.filter", "status:pending"); // TODO i18n
fclose (out);
set ("report.list.description", "Lists all tasks matching the specified criteria"); // TODO i18n
set ("report.list.columns", "id,project,priority,due,active,age,description"); // TODO i18n
set ("report.list.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
set ("report.list.sort", "due+,priority-,project+"); // TODO i18n
set ("report.list.filter", "status:pending"); // TODO i18n
std::cout << "Done." << std::endl;
}
}
}
set ("report.ls.description", "Minimal listing of all tasks matching the specified criteria"); // TODO i18n
set ("report.ls.columns", "id,project,priority,description"); // TODO i18n
set ("report.ls.labels", "ID,Project,Pri,Description"); // TODO i18n
set ("report.ls.sort", "priority-,project+"); // TODO i18n
set ("report.ls.filter", "status:pending"); // TODO i18n
this->load (rcFile);
set ("report.newest.description", "Shows the newest tasks"); // TODO i18n
set ("report.newest.columns", "id,project,priority,due,active,age,description"); // TODO i18n
set ("report.newest.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
set ("report.newest.sort", "id-"); // TODO i18n
set ("report.newest.filter", "status:pending limit:10"); // TODO i18n
if (-1 == access (dataDir.c_str (), F_OK))
mkdir (dataDir.c_str (), S_IRWXU);
set ("report.oldest.description", "Shows the oldest tasks"); // TODO i18n
set ("report.oldest.columns", "id,project,priority,due,active,age,description"); // TODO i18n
set ("report.oldest.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
set ("report.oldest.sort", "id+"); // TODO i18n
set ("report.oldest.filter", "status:pending limit:10"); // TODO i18n
set ("report.overdue.description", "Lists overdue tasks matching the specified criteria"); // TODO i18n
set ("report.overdue.columns", "id,project,priority,due,active,age,description"); // TODO i18n
set ("report.overdue.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
set ("report.overdue.sort", "due+,priority-,project+"); // TODO i18n
set ("report.overdue.filter", "status:pending due.before:today"); // TODO i18n
set ("report.active.description", "Lists active tasks matching the specified criteria"); // TODO i18n
set ("report.active.columns", "id,project,priority,due,active,age,description"); // TODO i18n
set ("report.active.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
set ("report.active.sort", "due+,priority-,project+"); // TODO i18n
set ("report.active.filter", "status:pending start.any:"); // TODO i18n
set ("report.completed.description", "Lists completed tasks matching the specified criteria"); // TODO i18n
set ("report.completed.columns", "end,project,priority,age,description"); // TODO i18n
set ("report.completed.labels", "Complete,Project,Pri,Age,Description"); // TODO i18n
set ("report.completed.sort", "end+,priority-,project+"); // TODO i18n
set ("report.completed.filter", "status:completed"); // TODO i18n
set ("report.recurring.description", "Lists recurring tasks matching the specified criteria"); // TODO i18n
set ("report.recurring.columns", "id,project,priority,due,recur,active,age,description"); // TODO i18n
set ("report.recurring.labels", "ID,Project,Pri,Due,Recur,Active,Age,Description"); // TODO i18n
set ("report.recurring.sort", "due+,priority-,project+"); // TODO i18n
set ("report.recurring.filter", "status:pending parent.any:"); // TODO i18n
set ("report.waiting.description", "Lists all waiting tasks matching the specified criteria"); // TODO i18n
set ("report.waiting.columns", "id,project,priority,wait,age,description"); // TODO i18n
set ("report.waiting.labels", "ID,Project,Pri,Wait,Age,Description"); // TODO i18n
set ("report.waiting.sort", "wait+,priority-,project+"); // TODO i18n
set ("report.waiting.filter", "status:waiting"); // TODO i18n
set ("report.all.description", "Lists all tasks matching the specified criteria"); // TODO i18n
set ("report.all.columns", "id,project,priority,due,active,age,description"); // TODO i18n
set ("report.all.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
set ("report.all.sort", "due+,priority-,project+"); // TODO i18n
set ("report.next.description", "Lists the most urgent tasks"); // TODO i18n
set ("report.next.columns", "id,project,priority,due,active,age,description"); // TODO i18n
set ("report.next.labels", "ID,Project,Pri,Due,Active,Age,Description"); // TODO i18n
set ("report.next.sort", "due+,priority-,project+"); // TODO i18n
set ("report.next.filter", "status:pending"); // TODO i18n
}
////////////////////////////////////////////////////////////////////////////////
@@ -183,17 +363,19 @@ const std::string Config::get (
}
////////////////////////////////////////////////////////////////////////////////
bool Config::get (const std::string& key, bool default_value)
bool Config::get (const std::string& key, const bool default_value)
{
if ((*this).find (key) != (*this).end ())
{
std::string value = lowerCase ((*this)[key]);
if (value == "t" ||
value == "true" ||
value == "1" ||
value == "yes" ||
value == "on")
if (value == "t" || // TODO i18n
value == "true" || // TODO i18n
value == "1" || // no i18n
value == "yes" || // TODO i18n
value == "on" || // TODO i18n
value == "enable" || // TODO i18n
value == "enabled") // TODO i18n
return true;
return false;

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2008, Paul Beckingham.
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -37,14 +37,19 @@ public:
Config ();
Config (const std::string&);
Config (const Config&);
Config& operator= (const Config&);
bool load (const std::string&);
void createDefault (const std::string&);
void createDefaultRC (const std::string&, const std::string&);
void createDefaultData (const std::string&);
void setDefaults ();
const std::string get (const char*);
const std::string get (const char*, const char*);
const std::string get (const std::string&);
const std::string get (const std::string&, const std::string&);
bool get (const std::string&, bool);
bool get (const std::string&, const bool);
int get (const std::string&, const int);
double get (const std::string&, const double);
void set (const std::string&, const int);

806
src/Context.cpp Normal file
View File

@@ -0,0 +1,806 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <fstream>
#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "Context.h"
#include "Timer.h"
#include "text.h"
#include "util.h"
#include "main.h"
#include "i18n.h"
#include "../auto.h"
////////////////////////////////////////////////////////////////////////////////
Context::Context ()
: config ()
, filter ()
, keymap ()
, sequence ()
, subst ()
, task ()
, tdb ()
, stringtable ()
, program ("")
, overrides ("")
, cmd ()
, inShadow (false)
{
}
////////////////////////////////////////////////////////////////////////////////
Context::~Context ()
{
}
////////////////////////////////////////////////////////////////////////////////
void Context::initialize (int argc, char** argv)
{
// Capture the args.
for (int i = 0; i < argc; ++i)
if (i == 0)
{
program = argv[i];
std::string::size_type cal = program.find ("/cal");
if (program == "cal" ||
(cal != std::string::npos && program.length () == cal + 4))
args.push_back ("calendar");
}
else
args.push_back (argv[i]);
initialize ();
}
////////////////////////////////////////////////////////////////////////////////
void Context::initialize ()
{
Timer t ("Context::initialize");
// Load the configuration file from the home directory. If the file cannot
// be found, offer to create a sample one.
loadCorrectConfigFile ();
loadAliases ();
// When redirecting output to a file, do not use color, curses.
if (!isatty (fileno (stdout)))
{
config.set ("curses", "off");
if (! config.get (std::string ("_forcecolor"), false))
config.set ("color", "off");
}
if (config.get ("color", true))
initializeColorRules ();
// Load appropriate stringtable as soon after the config file as possible, to
// allow all subsequent messages to be localizable.
std::string location = expandPath (config.get ("data.location"));
std::string locale = config.get ("locale");
// If there is a locale variant (en-US.<variant>), then strip it.
std::string::size_type period = locale.find ('.');
if (period != std::string::npos)
locale = locale.substr (0, period);
if (locale != "")
stringtable.load (location + "/strings." + locale);
// TODO Handle "--version, -v" right here?
// init TDB.
tdb.clear ();
std::vector <std::string> all;
split (all, location, ',');
foreach (path, all)
tdb.location (expandPath (*path));
}
////////////////////////////////////////////////////////////////////////////////
int Context::run ()
{
int rc;
Timer t ("Context::run");
std::string output;
try
{
parse (); // Parse command line.
rc = dispatch (output); // Dispatch to command handlers.
}
catch (const std::string& error)
{
footnote (error);
rc = 2;
}
catch (...)
{
footnote (stringtable.get (100, "Unknown error."));
rc = 3;
}
// Dump all debug messages.
if (config.get (std::string ("debug"), false))
foreach (d, debugMessages)
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
std::cout << colorizeDebug (*d) << std::endl;
else
std::cout << *d << std::endl;
// Dump all headers.
foreach (h, headers)
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
std::cout << colorizeHeader (*h) << std::endl;
else
std::cout << *h << std::endl;
// Dump the report output.
std::cout << output;
// Dump all footnotes.
foreach (f, footnotes)
if (config.get ("color", true) || config.get (std::string ("_forcecolor"), false))
std::cout << colorizeFootnote (*f) << std::endl;
else
std::cout << *f << std::endl;
return rc;
}
////////////////////////////////////////////////////////////////////////////////
int Context::dispatch (std::string &out)
{
int rc = 0;
Timer t ("Context::dispatch");
// TODO Just look at this thing. It cries out for a dispatch table.
if (cmd.command == "projects") { rc = handleProjects (out); }
else if (cmd.command == "tags") { rc = handleTags (out); }
else if (cmd.command == "colors") { rc = handleColor (out); }
else if (cmd.command == "version") { rc = handleVersion (out); }
else if (cmd.command == "help") { rc = longUsage (out); }
else if (cmd.command == "stats") { rc = handleReportStats (out); }
else if (cmd.command == "info") { rc = handleInfo (out); }
else if (cmd.command == "history") { rc = handleReportHistory (out); }
else if (cmd.command == "ghistory") { rc = handleReportGHistory (out); }
else if (cmd.command == "summary") { rc = handleReportSummary (out); }
else if (cmd.command == "calendar") { rc = handleReportCalendar (out); }
else if (cmd.command == "timesheet") { rc = handleReportTimesheet (out); }
else if (cmd.command == "add") { rc = handleAdd (out); }
else if (cmd.command == "append") { rc = handleAppend (out); }
else if (cmd.command == "annotate") { rc = handleAnnotate (out); }
else if (cmd.command == "done") { rc = handleDone (out); }
else if (cmd.command == "delete") { rc = handleDelete (out); }
else if (cmd.command == "start") { rc = handleStart (out); }
else if (cmd.command == "stop") { rc = handleStop (out); }
else if (cmd.command == "export") { rc = handleExport (out); }
else if (cmd.command == "import") { rc = handleImport (out); }
else if (cmd.command == "duplicate") { rc = handleDuplicate (out); }
else if (cmd.command == "edit") { rc = handleEdit (out); }
#ifdef FEATURE_SHELL
else if (cmd.command == "shell") { handleShell ( ); }
#endif
else if (cmd.command == "undo") { handleUndo ( ); }
else if (cmd.command == "_projects") { rc = handleCompletionProjects (out); }
else if (cmd.command == "_tags") { rc = handleCompletionTags (out); }
else if (cmd.command == "_commands") { rc = handleCompletionCommands (out); }
else if (cmd.command == "_ids") { rc = handleCompletionIDs (out); }
else if (cmd.command == "_config") { rc = handleCompletionConfig (out); }
else if (cmd.command == "" &&
sequence.size ()) { rc = handleModify (out); }
// Command that display IDs and therefore need TDB::gc first.
else if (cmd.command == "next") { if (!inShadow) tdb.gc (); rc = handleReportNext (out); }
else if (cmd.validCustom (cmd.command)) { if (!inShadow) tdb.gc (); rc = handleCustomReport (cmd.command, out); }
// If the command is not recognized, display usage.
else { rc = shortUsage (out); }
// Only update the shadow file if such an update was not suppressed (shadow),
if (cmd.isWriteCommand () && !inShadow)
shadow ();
return rc;
}
////////////////////////////////////////////////////////////////////////////////
void Context::shadow ()
{
// Determine if shadow file is enabled.
std::string shadowFile = expandPath (config.get ("shadow.file"));
if (shadowFile != "")
{
inShadow = true; // Prevents recursion in case shadow command writes.
// TODO Reinstate these checks.
/*
// Check for silly shadow file settings.
if (shadowFile == dataLocation + "/pending.data")
throw std::string ("Configuration variable 'shadow.file' is set to "
"overwrite your pending tasks. Please change it.");
if (shadowFile == dataLocation + "/completed.data")
throw std::string ("Configuration variable 'shadow.file' is set to "
"overwrite your completed tasks. Please change it.");
*/
std::string oldCurses = config.get ("curses");
std::string oldColor = config.get ("color");
clear ();
// Run report. Use shadow.command, using default.command as a fallback
// with "list" as a default.
std::string command = config.get ("shadow.command",
config.get ("default.command", "list"));
split (args, command, ' ');
initialize ();
config.set ("curses", "off");
config.set ("color", "off");
parse ();
std::string result;
(void)dispatch (result);
std::ofstream out (shadowFile.c_str ());
if (out.good ())
{
out << result;
out.close ();
}
else
throw std::string ("Could not write file '") + shadowFile + "'";
config.set ("curses", oldCurses);
config.set ("color", oldColor);
// Optionally display a notification that the shadow file was updated.
if (config.get (std::string ("shadow.notify"), false))
footnote (std::string ("[Shadow file '") + shadowFile + "' updated]");
inShadow = false;
}
}
////////////////////////////////////////////////////////////////////////////////
// Only allows aliases 10 deep.
std::string Context::canonicalize (const std::string& input) const
{
std::string canonical = input;
// First try to autocomplete the alias.
std::vector <std::string> options;
std::vector <std::string> matches;
foreach (name, aliases)
options.push_back (name->first);
autoComplete (input, options, matches);
if (matches.size () == 1)
{
canonical = matches[0];
// Follow the chain.
int i = 10; // Safety valve.
std::map <std::string, std::string>::const_iterator found;
while ((found = aliases.find (canonical)) != aliases.end () && i-- > 0)
canonical = found->second;
if (i < 1)
return input;
}
return canonical;
}
////////////////////////////////////////////////////////////////////////////////
void Context::disallowModification () const
{
if (task.size () ||
subst.mFrom != "" ||
tagAdditions.size () ||
tagRemovals.size ())
throw std::string ("The '")
+ cmd.command
+ "' command does not allow further modification of a task.";
}
////////////////////////////////////////////////////////////////////////////////
void Context::loadCorrectConfigFile ()
{
// Set up default locations.
struct passwd* pw = getpwuid (getuid ());
if (!pw)
throw std::string (
stringtable.get (
SHELL_READ_PASSWD,
"Could not read home directory from the passwd file."));
std::string home = pw->pw_dir;
std::string rc = home + "/.taskrc";
std::string data = home + "/.task";
// Is there an override for rc?
foreach (arg, args)
{
if (*arg == "--")
break;
else if (arg->substr (0, 3) == "rc:")
{
rc = arg->substr (3, std::string::npos);
home = rc;
std::string::size_type last_slash = rc.rfind ("/");
if (last_slash != std::string::npos)
home = rc.substr (0, last_slash);
else
home = ".";
args.erase (arg);
header ("Using alternate .taskrc file " + rc); // TODO i18n
break;
}
}
// Load rc file.
config.clear (); // Dump current values.
config.setDefaults (); // Add in the custom reports.
config.load (rc); // Load new file.
if (config.get ("data.location") != "")
data = config.get ("data.location");
// Is there an override for data?
foreach (arg, args)
{
if (*arg == "--")
break;
else if (arg->substr (0, 17) == "rc.data.location:")
{
data = arg->substr (17, std::string::npos);
header ("Using alternate data.location " + data); // TODO i18n
break;
}
}
// Do we need to create a default rc?
if (access (rc.c_str (), F_OK))
{
if (confirm ("A configuration file could not be found in " // TODO i18n
+ home
+ "\n\n"
+ "Would you like a sample "
+ rc
+ " created, so task can proceed?"))
{
config.createDefaultRC (rc, data);
}
else
throw std::string ("Cannot proceed without rc file.");
}
// Create data location, if necessary.
config.createDefaultData (data);
// Load rc file.
config.clear (); // Dump current values.
config.setDefaults (); // Add in the custom reports.
config.load (rc); // Load new file.
// Apply overrides of type: "rc.name:value"
std::vector <std::string> filtered;
bool foundTerminator = false;
foreach (arg, args)
{
if (*arg == "--")
{
foundTerminator = true;
filtered.push_back (*arg);
}
else if (!foundTerminator &&
arg->substr (0, 3) == "rc.")
{
std::string name;
std::string value;
Nibbler n (*arg);
if (n.getUntil ('.', name) &&
n.skip ('.') &&
n.getUntil (':', name) &&
n.skip (':') &&
n.getUntilEOS (value))
{
config.set (name, value);
overrides += " " + *arg;
footnote (std::string ("Configuration override ") + // TODO i18n
arg->substr (3, std::string::npos));
}
}
else
filtered.push_back (*arg);
}
args = filtered;
}
////////////////////////////////////////////////////////////////////////////////
void Context::loadAliases ()
{
aliases.clear ();
std::vector <std::string> vars;
config.all (vars);
foreach (var, vars)
{
if (var->substr (0, 6) == "alias.")
{
std::string alias = var->substr (6, std::string::npos);
std::string canonical = config.get (*var);
aliases[alias] = canonical;
debug (std::string ("Alias ") + alias + " -> " + canonical);
}
}
}
////////////////////////////////////////////////////////////////////////////////
void Context::parse ()
{
parse (args, cmd, task, sequence, subst, filter);
}
////////////////////////////////////////////////////////////////////////////////
void Context::parse (
std::vector <std::string>& parseArgs,
Cmd& parseCmd,
Task& parseTask,
Sequence& parseSequence,
Subst& parseSubst,
Filter& parseFilter)
{
Timer t ("Context::parse");
Att attribute;
tagAdditions.clear ();
tagRemovals.clear ();
std::string descCandidate = "";
bool terminated = false;
bool foundSequence = false;
bool foundSomethingAfterSequence = false;
foreach (arg, parseArgs)
{
if (!terminated)
{
// The '--' argument shuts off all parsing - everything is an argument.
if (*arg == "--")
{
debug ("parse terminator '" + *arg + "'");
terminated = true;
}
// Sequence
// Note: "add" doesn't require an ID
else if (parseCmd.command != "add" &&
! foundSomethingAfterSequence &&
parseSequence.valid (*arg))
{
debug ("parse sequence '" + *arg + "'");
parseSequence.parse (*arg);
foundSequence = true;
}
// Tags to include begin with '+'.
else if (arg->length () > 1 &&
(*arg)[0] == '+' &&
noSpaces (*arg))
{
debug ("parse tag addition '" + *arg + "'");
if (foundSequence)
foundSomethingAfterSequence = true;
if (arg->find (',') != std::string::npos)
throw stringtable.get (TAGS_NO_COMMA,
"Tags are not permitted to contain commas.");
tagAdditions.push_back (arg->substr (1, std::string::npos));
parseTask.addTag (arg->substr (1, std::string::npos));
}
// Tags to remove begin with '-'.
else if (arg->length () > 1 &&
(*arg)[0] == '-' &&
noSpaces (*arg))
{
debug ("parse tag removal '" + *arg + "'");
if (foundSequence)
foundSomethingAfterSequence = true;
if (arg->find (',') != std::string::npos)
throw stringtable.get (TAGS_NO_COMMA,
"Tags are not permitted to contain commas.");
tagRemovals.push_back (arg->substr (1, std::string::npos));
}
// Atributes - name[.mod]:[value]
else if (attribute.valid (*arg))
{
debug ("parse attribute '" + *arg + "'");
if (foundSequence)
foundSomethingAfterSequence = true;
attribute.parse (*arg);
// There has to be a better way. And it starts with a fresh coffee.
std::string name = attribute.name ();
std::string mod = attribute.mod ();
std::string value = attribute.value ();
if (attribute.validNameValue (name, mod, value))
{
attribute.name (name);
attribute.mod (mod);
attribute.value (value);
// Preserve modifier in the key, to allow multiple modifiers on the
// same attribute. Bug #252.
if (name != "" && mod != "")
parseTask[name + "." + mod] = attribute;
else
parseTask[name] = attribute;
}
// *arg has the appearance of an attribute (foo:bar), but isn't
// recognized, so downgrade it to part of the description.
else
{
if (foundSequence)
foundSomethingAfterSequence = true;
if (descCandidate.length ())
descCandidate += " ";
descCandidate += *arg;
}
}
// Substitution of description and/or annotation text.
else if (parseSubst.valid (*arg))
{
if (foundSequence)
foundSomethingAfterSequence = true;
debug ("parse subst '" + *arg + "'");
parseSubst.parse (*arg);
}
// It might be a command if one has not already been found.
else if (parseCmd.command == "" &&
parseCmd.valid (*arg))
{
debug ("parse cmd '" + *arg + "'");
parseCmd.parse (*arg);
if (foundSequence)
foundSomethingAfterSequence = true;
}
// Anything else is just considered description.
else
{
if (foundSequence)
foundSomethingAfterSequence = true;
if (descCandidate.length ())
descCandidate += " ";
descCandidate += *arg;
}
}
// Command is terminated, therefore everything subsequently is a description.
else
{
debug ("parse post-termination description '" + *arg + "'");
if (foundSequence)
foundSomethingAfterSequence = true;
if (descCandidate.length ())
descCandidate += " ";
descCandidate += *arg;
}
}
if (descCandidate != "" && noVerticalSpace (descCandidate))
{
debug ("parse description '" + descCandidate + "'");
parseTask.set ("description", descCandidate);
}
// At this point, either a sequence or a command should have been found.
if (parseSequence.size () == 0 && parseCmd.command == "")
parseCmd.parse (descCandidate);
// Read-only command (reports, status, info ...) use filters. Write commands
// (add, done ...) do not.
if (parseCmd.isReadOnlyCommand ())
autoFilter (parseTask, parseFilter);
// If no command was specified, and there were no command line arguments
// then invoke the default command.
if (parseCmd.command == "" && parseArgs.size () == 0)
{
// Apply overrides, if any.
std::string defaultCommand = config.get ("default.command") + overrides;
if (defaultCommand != "")
{
// Stuff the command line.
args.clear ();
split (args, defaultCommand, ' ');
header ("[task " + defaultCommand + "]");
// Reinitialize the context and recurse.
initialize ();
parse (args, cmd, task, sequence, subst, filter);
}
else
throw stringtable.get (
CMD_MISSING,
"You must specify a command, or a task ID to modify");
}
}
////////////////////////////////////////////////////////////////////////////////
void Context::clear ()
{
// Config config;
filter.clear ();
// Keymap keymap;
sequence.clear ();
subst.clear ();
// task.clear ();
task = Task ();
tdb.clear ();
// stringtable.clear ();
program = "";
args.clear ();
cmd.command = "";
tagAdditions.clear ();
tagRemovals.clear ();
clearMessages ();
inShadow = false;
}
////////////////////////////////////////////////////////////////////////////////
// Add all the attributes in the task to the filter. All except uuid.
void Context::autoFilter (Task& t, Filter& f)
{
foreach (att, t)
{
// Words are found in the description using the .has modifier.
if (att->second.name () == "description" && att->second.mod () == "")
{
std::vector <std::string> words;
split (words, att->second.value (), ' ');
foreach (word, words)
{
f.push_back (Att ("description", "has", *word));
debug ("auto filter: " + att->second.name () + ".has:" + *word);
}
}
// Projects are matched left-most.
else if (att->second.name () == "project" && att->second.mod () == "")
{
if (att->second.value () != "")
{
f.push_back (Att ("project", "startswith", att->second.value ()));
debug ("auto filter: " + att->second.name () + ".startswith:" + att->second.value ());
}
else
{
f.push_back (Att ("project", "is", att->second.value ()));
debug ("auto filter: " + att->second.name () + ".is:" + att->second.value ());
}
}
// The limit attribute does not participate in filtering, and needs to be
// specifically handled in handleCustomReport.
else if (att->second.name () == "limit")
{
}
// Every task has a unique uuid by default, and it shouldn't be included,
// because it is guaranteed to not match.
else if (att->second.name () == "uuid")
{
}
// The mechanism for filtering on tags is +/-<tag>.
else if (att->second.name () == "tags")
{
}
// Generic attribute matching.
else
{
f.push_back (att->second);
debug ("auto filter: " +
att->second.name () +
(att->second.mod () != "" ?
("." + att->second.mod () + ":") :
":") +
att->second.value ());
}
}
// Include tagAdditions.
foreach (tag, tagAdditions)
{
f.push_back (Att ("tags", "has", *tag));
debug ("auto filter: +" + *tag);
}
// Include tagRemovals.
foreach (tag, tagRemovals)
{
f.push_back (Att ("tags", "hasnt", *tag));
debug ("auto filter: -" + *tag);
}
}
////////////////////////////////////////////////////////////////////////////////
void Context::header (const std::string& input)
{
headers.push_back (input);
}
////////////////////////////////////////////////////////////////////////////////
void Context::footnote (const std::string& input)
{
footnotes.push_back (input);
}
////////////////////////////////////////////////////////////////////////////////
void Context::debug (const std::string& input)
{
debugMessages.push_back (input);
}
////////////////////////////////////////////////////////////////////////////////
void Context::clearMessages ()
{
headers.clear ();
footnotes.clear ();
debugMessages.clear ();
}
////////////////////////////////////////////////////////////////////////////////

100
src/Context.h Normal file
View File

@@ -0,0 +1,100 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_CONTEXT
#define INCLUDED_CONTEXT
#include "Filter.h"
#include "Keymap.h"
#include "Config.h"
#include "Sequence.h"
#include "Subst.h"
#include "Cmd.h"
#include "Task.h"
#include "TDB.h"
#include "StringTable.h"
class Context
{
public:
Context (); // Default constructor
~Context (); // Destructor
Context (const Context&);
Context& operator= (const Context&);
void initialize (int, char**); // all startup
void initialize (); // for reinitializing
int run (); // task classic
int interactive (); // task interactive (not implemented)
int dispatch (std::string&); // command handler dispatch
void shadow (); // shadow file update
int getWidth (); // determine terminal width
void header (const std::string&); // Header message sink
void footnote (const std::string&); // Footnote message sink
void debug (const std::string&); // Debug message sink
void clearMessages ();
void parse ();
void parse (std::vector <std::string>&, Cmd&, Task&, Sequence&, Subst&, Filter&);
void clear ();
std::string canonicalize (const std::string&) const;
void disallowModification () const;
private:
void loadCorrectConfigFile ();
void loadAliases ();
void autoFilter (Task&, Filter&);
public:
Config config;
Filter filter;
Keymap keymap;
Sequence sequence;
Subst subst;
Task task;
TDB tdb;
StringTable stringtable;
std::string program;
std::vector <std::string> args;
std::string overrides;
Cmd cmd;
std::map <std::string, std::string> aliases;
std::vector <std::string> tagAdditions;
std::vector <std::string> tagRemovals;
private:
std::vector <std::string> headers;
std::vector <std::string> footnotes;
std::vector <std::string> debugMessages;
bool inShadow;
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2008, Paul Beckingham.
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -25,11 +25,14 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <sstream>
#include <time.h>
#include <assert.h>
#include <stdlib.h>
#include "task.h"
#include <ctype.h>
#include "Date.h"
#include "text.h"
#include "util.h"
////////////////////////////////////////////////////////////////////////////////
// Defaults to "now".
@@ -63,6 +66,10 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
int day = 0;
int year = 0;
// Perhaps it is an epoch date, in string form?
if (isEpoch (mdy))
return;
// Before parsing according to "format", perhaps this is a relative date?
if (isRelativeDate (mdy))
return;
@@ -76,14 +83,14 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
// Single or double digit.
case 'm':
if (i >= mdy.length () ||
! ::isdigit (mdy[i]))
! isdigit (mdy[i]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
}
if (i + 1 < mdy.length () &&
(mdy[i + 0] == '0' || mdy[i + 0] == '1') &&
::isdigit (mdy[i + 1]))
if (i + 1 < mdy.length () &&
(mdy[i + 0] == '0' || mdy[i + 0] == '1') &&
isdigit (mdy[i + 1]))
{
month = ::atoi (mdy.substr (i, 2).c_str ());
i += 2;
@@ -97,14 +104,14 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
case 'd':
if (i >= mdy.length () ||
! ::isdigit (mdy[i]))
! isdigit (mdy[i]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
}
if (i + 1 < mdy.length () &&
(mdy[i + 0] == '0' || mdy[i + 0] == '1' || mdy[i + 0] == '2' || mdy[i + 0] == '3') &&
::isdigit (mdy[i + 1]))
isdigit (mdy[i + 1]))
{
day = ::atoi (mdy.substr (i, 2).c_str ());
i += 2;
@@ -118,9 +125,9 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
// Double digit.
case 'y':
if (i + 1 >= mdy.length () ||
! ::isdigit (mdy[i + 0]) ||
! ::isdigit (mdy[i + 1]))
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
}
@@ -131,8 +138,8 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
case 'M':
if (i + 1 >= mdy.length () ||
! ::isdigit (mdy[i + 0]) ||
! ::isdigit (mdy[i + 1]))
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
}
@@ -143,8 +150,8 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
case 'D':
if (i + 1 >= mdy.length () ||
! ::isdigit (mdy[i + 0]) ||
! ::isdigit (mdy[i + 1]))
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
}
@@ -156,10 +163,10 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
// Quadruple digit.
case 'Y':
if (i + 3 >= mdy.length () ||
! ::isdigit (mdy[i + 0]) ||
! ::isdigit (mdy[i + 1]) ||
! ::isdigit (mdy[i + 2]) ||
! ::isdigit (mdy[i + 3]))
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]) ||
! isdigit (mdy[i + 2]) ||
! isdigit (mdy[i + 3]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
}
@@ -179,6 +186,9 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
}
}
if (i < mdy.length ())
throw std::string ("\"") + mdy + "\" is not a valid date in " + format + " format.";
if (!valid (month, day, year))
throw std::string ("\"") + mdy + "\" is not a valid date.";
@@ -208,6 +218,14 @@ time_t Date::toEpoch ()
return mT;
}
////////////////////////////////////////////////////////////////////////////////
std::string Date::toEpochString ()
{
std::stringstream epoch;
epoch << mT;
return epoch.str ();
}
////////////////////////////////////////////////////////////////////////////////
void Date::toEpoch (time_t& epoch)
{
@@ -253,6 +271,22 @@ const std::string Date::toString (const std::string& format /*= "m/d/Y" */) cons
return formatted;
}
////////////////////////////////////////////////////////////////////////////////
bool Date::valid (const std::string& input, const std::string& format)
{
try
{
Date test (input, format);
}
catch (...)
{
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
bool Date::valid (const int m, const int d, const int y)
{
@@ -277,9 +311,11 @@ bool Date::leapYear (int year)
{
bool ly = false;
if (!(year % 4)) ly = true;
else if (!(year % 400)) ly = true;
else if (!(year % 100)) ly = false;
// (year % 4 == 0) && (year % 100 !=0) OR
// (year % 400 == 0)
// are leapyears
if (((!(year % 4)) && (year % 100)) || (!(year % 400))) ly = true;
return ly;
}
@@ -354,6 +390,28 @@ std::string Date::dayName (int dow)
return days[dow];
}
////////////////////////////////////////////////////////////////////////////////
int Date::weekOfYear (int weekStart) const
{
struct tm* t = localtime (&mT);
char weekStr[3];
if (weekStart == 0)
strftime(weekStr, sizeof(weekStr), "%U", t);
else if (weekStart == 1)
strftime(weekStr, sizeof(weekStr), "%V", t);
else
throw std::string ("The 'weekstart' configuration variable may "
"only contain 'Sunday' or 'Monday'.");
int weekNumber = ::atoi (weekStr);
if (weekStart == 0)
weekNumber += 1;
return weekNumber;
}
////////////////////////////////////////////////////////////////////////////////
int Date::dayOfWeek () const
{
@@ -490,6 +548,19 @@ time_t Date::operator- (const Date& rhs)
return mT - rhs.mT;
}
////////////////////////////////////////////////////////////////////////////////
bool Date::isEpoch (const std::string& input)
{
if (digitsOnly (input) &&
input.length () > 8)
{
mT = (time_t) ::atoi (input.c_str ());
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
// If the input string looks like a relative date, determine that date, set mT
// and return true.
@@ -543,22 +614,35 @@ bool Date::isRelativeDate (const std::string& input)
else
today += (dow - today.dayOfWeek ()) * 86400;
mT = today.mT;
int m, d, y;
today.toMDY (m, d, y);
Date then (m, d, y);
mT = then.mT;
return true;
}
else if (found == "today")
{
mT = today.mT;
Date then (today.month (),
today.day (),
today.year ());
mT = then.mT;
return true;
}
else if (found == "tomorrow")
{
mT = today.mT + 86400;
Date then (today.month (),
today.day (),
today.year ());
mT = then.mT + 86400;
return true;
}
else if (found == "yesterday")
{
mT = today.mT - 86400;
Date then (today.month (),
today.day (),
today.year ());
mT = then.mT - 86400;
return true;
}
else if (found == "eom")

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2008, Paul Beckingham.
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -27,6 +27,7 @@
#ifndef INCLUDED_DATE
#define INCLUDED_DATE
#include <stdio.h>
#include <string>
class Date;
@@ -43,8 +44,10 @@ public:
void toEpoch (time_t&);
time_t toEpoch ();
std::string toEpochString ();
void toMDY (int&, int&, int&);
const std::string toString (const std::string& format = "m/d/Y") const;
static bool valid (const std::string&, const std::string& format = "m/d/Y");
static bool valid (const int, const int, const int);
static bool leapYear (int);
@@ -52,11 +55,13 @@ public:
static std::string monthName (int);
static void dayName (int, std::string&);
static std::string dayName (int);
static int weekOfYear (const std::string&);
static int dayOfWeek (const std::string&);
int month () const;
int day () const;
int year () const;
int weekOfYear (int) const;
int dayOfWeek () const;
bool operator== (const Date&);
@@ -76,6 +81,7 @@ public:
time_t operator- (const Date&);
private:
bool isEpoch (const std::string&);
bool isRelativeDate (const std::string&);
protected:

199
src/Duration.cpp Normal file
View File

@@ -0,0 +1,199 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <sstream>
#include <string>
#include <vector>
#include <stdlib.h>
#include "text.h"
#include "util.h"
#include "Duration.h"
////////////////////////////////////////////////////////////////////////////////
Duration::Duration ()
: mDays (0)
{
}
////////////////////////////////////////////////////////////////////////////////
Duration::Duration (time_t input)
{
mDays = input;
}
////////////////////////////////////////////////////////////////////////////////
Duration::Duration (const std::string& input)
{
parse (input);
}
////////////////////////////////////////////////////////////////////////////////
Duration::operator time_t ()
{
return mDays;
}
////////////////////////////////////////////////////////////////////////////////
Duration::operator std::string ()
{
std::stringstream s;
s << mDays;
return s.str ();
}
////////////////////////////////////////////////////////////////////////////////
bool Duration::operator< (const Duration& other)
{
return mDays < other.mDays;
}
////////////////////////////////////////////////////////////////////////////////
bool Duration::operator> (const Duration& other)
{
return mDays > other.mDays;
}
////////////////////////////////////////////////////////////////////////////////
Duration::~Duration ()
{
}
////////////////////////////////////////////////////////////////////////////////
bool Duration::valid (const std::string& input) const
{
std::string lower_input = lowerCase (input);
std::vector <std::string> supported;
supported.push_back ("daily"); // TODO i18n
supported.push_back ("day"); // TODO i18n
supported.push_back ("weekly"); // TODO i18n
supported.push_back ("weekdays"); // TODO i18n
supported.push_back ("sennight"); // TODO i18n
supported.push_back ("biweekly"); // TODO i18n
supported.push_back ("fortnight"); // TODO i18n
supported.push_back ("monthly"); // TODO i18n
supported.push_back ("bimonthly"); // TODO i18n
supported.push_back ("quarterly"); // TODO i18n
supported.push_back ("biannual"); // TODO i18n
supported.push_back ("biyearly"); // TODO i18n
supported.push_back ("annual"); // TODO i18n
supported.push_back ("semiannual"); // TODO i18n
supported.push_back ("yearly"); // TODO i18n
std::vector <std::string> matches;
if (autoComplete (lower_input, supported, matches) == 1)
return true;
// Support \d+ d|w|m|q|y
// Verify all digits followed by d, w, m, q, or y.
unsigned int length = lower_input.length ();
for (unsigned int i = 0; i < length; ++i)
{
if (! isdigit (lower_input[i]) &&
i == length - 1)
{
std::string type = lower_input.substr (length - 1, std::string::npos);
if (type == "d" || // TODO i18n
type == "w" || // TODO i18n
type == "m" || // TODO i18n
type == "q" || // TODO i18n
type == "y") // TODO i18n
return true;
}
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
void Duration::parse (const std::string& input)
{
std::string lower_input = lowerCase (input);
std::vector <std::string> supported;
supported.push_back ("daily"); // TODO i18n
supported.push_back ("day"); // TODO i18n
supported.push_back ("weekly"); // TODO i18n
supported.push_back ("weekdays"); // TODO i18n
supported.push_back ("sennight"); // TODO i18n
supported.push_back ("biweekly"); // TODO i18n
supported.push_back ("fortnight"); // TODO i18n
supported.push_back ("monthly"); // TODO i18n
supported.push_back ("bimonthly"); // TODO i18n
supported.push_back ("quarterly"); // TODO i18n
supported.push_back ("biannual"); // TODO i18n
supported.push_back ("biyearly"); // TODO i18n
supported.push_back ("annual"); // TODO i18n
supported.push_back ("semiannual"); // TODO i18n
supported.push_back ("yearly"); // TODO i18n
std::vector <std::string> matches;
if (autoComplete (lower_input, supported, matches) == 1)
{
std::string found = matches[0];
if (found == "daily" || found == "day") mDays = 1; // TODO i18n
else if (found == "weekdays") mDays = 1; // TODO i18n
else if (found == "weekly" || found == "sennight") mDays = 7; // TODO i18n
else if (found == "biweekly" || found == "fortnight") mDays = 14; // TODO i18n
else if (found == "monthly") mDays = 30; // TODO i18n
else if (found == "bimonthly") mDays = 61; // TODO i18n
else if (found == "quarterly") mDays = 91; // TODO i18n
else if (found == "semiannual") mDays = 183; // TODO i18n
else if (found == "yearly" || found == "annual") mDays = 365; // TODO i18n
else if (found == "biannual" || found == "biyearly") mDays = 730; // TODO i18n
}
// Support \d+ d|w|m|q|y
else
{
// Verify all digits followed by d, w, m, q, or y.
unsigned int length = lower_input.length ();
for (unsigned int i = 0; i < length; ++i)
{
if (! isdigit (lower_input[i]) &&
i == length - 1)
{
int number = ::atoi (lower_input.substr (0, i).c_str ());
switch (lower_input[length - 1])
{
case 'd': mDays = number * 1; break; // TODO i18n
case 'w': mDays = number * 7; break; // TODO i18n
case 'm': mDays = number * 30; break; // TODO i18n
case 'q': mDays = number * 91; break; // TODO i18n
case 'y': mDays = number * 365; break; // TODO i18n
}
}
}
}
if (mDays == 0)
throw std::string ("The duration '") + input + "' was not recognized."; // TODO i18n
}
////////////////////////////////////////////////////////////////////////////////

54
src/Duration.h Normal file
View File

@@ -0,0 +1,54 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_DURATION
#define INCLUDED_DURATION
#include <string>
#include <time.h>
class Duration
{
public:
Duration (); // Default constructor
Duration (time_t); // Default constructor
Duration (const std::string&); // Parse
bool operator< (const Duration&);
bool operator> (const Duration&);
~Duration (); // Destructor
operator time_t ();
operator std::string ();
bool valid (const std::string&) const;
void parse (const std::string&);
private:
time_t mDays;
};
#endif
////////////////////////////////////////////////////////////////////////////////

148
src/Filter.cpp Normal file
View File

@@ -0,0 +1,148 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <sstream>
#include "Filter.h"
#include "util.h"
#include "main.h"
////////////////////////////////////////////////////////////////////////////////
// For every Att in the filter, lookup the equivalent in Record, and perform a
// match. Aren't filters easy now that everything is an attribute?
bool Filter::pass (const Record& record) const
{
Record::const_iterator r;
// First do description/annotation matches.
foreach (att, (*this))
{
// Descriptions have special handling such that they are linked to
// annotations, and filtering on description implies identical filtering
// on annotations, and that both filter matches must succeed for the filter
// to succeed overall.
if (att->name () == "description")
{
bool description_result = true;
int annotation_pass_count = 0;
int annotation_fail_count = 0;
if ((r = record.find (att->name ())) != record.end ())
{
description_result = att->match (r->second);
foreach (ra, record)
{
if (ra->first.length () > 11 &&
ra->first.substr (0, 11) == "annotation_")
{
if (att->match (ra->second))
++annotation_pass_count;
else
++annotation_fail_count;
}
}
}
else if (! att->match (Att ()))
return false;
// This innocuous little if-else took significantly more thinking and
// debugging than anything else in task. Only change this code if you
// are willing to invest a week understanding and testing it.
if (att->modType (att->mod ()) == "positive")
{
if (! (description_result || annotation_pass_count > 0))
return false;
}
else
{
if (!description_result || annotation_fail_count > 0)
return false;
}
}
// Annotations are skipped, because they are handled above.
else if (att->name ().length () > 11 &&
att->name ().substr (0, 11) == "annotation_")
{
}
else
{
// An individual attribute match failure is enough to fail the filter.
if ((r = record.find (att->name ())) != record.end ())
{
if (! att->match (r->second))
return false;
}
else if (! att->match (Att ()))
return false;
}
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
void Filter::applySequence (std::vector<Task>& all, Sequence& sequence)
{
std::vector <Task> filtered;
foreach (task, all)
foreach (i, sequence)
if (task->id == *i)
filtered.push_back (*task);
if (sequence.size () != filtered.size ())
{
std::vector <int> filteredSequence;
foreach (task, filtered)
filteredSequence.push_back (task->id);
std::vector <int> left;
std::vector <int> right;
listDiff (filteredSequence, (std::vector <int>&)sequence, left, right);
if (left.size ())
throw std::string ("Sequence filtering error - please report this error");
if (right.size ())
{
std::stringstream out;
out << "Task";
if (right.size () > 1) out << "s";
foreach (r, right)
out << " " << *r;
out << " not found";
throw out.str ();
}
}
all = filtered;
}
////////////////////////////////////////////////////////////////////////////////

43
src/Filter.h Normal file
View File

@@ -0,0 +1,43 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_FILTER
#define INCLUDED_FILTER
#include <vector>
#include "Att.h"
#include "Task.h"
#include "Record.h"
class Filter : public std::vector <Att>
{
public:
bool pass (const Record&) const;
void applySequence (std::vector<Task>&, Sequence&);
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2008, Paul Beckingham.
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -60,6 +60,7 @@
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <stdlib.h>
#include <Grid.h>
////////////////////////////////////////////////////////////////////////////////
@@ -305,7 +306,7 @@ Grid::Cell::operator char () const
{
switch (mType)
{
case CELL_BOOL: return mBool ? 'Y' : 'N';
case CELL_BOOL: return mBool ? 'Y' : 'N'; // TODO i18n
case CELL_CHAR: return mChar;
case CELL_INT: return (char) mInt;
case CELL_FLOAT: return (char) (int) mFloat;
@@ -325,7 +326,7 @@ Grid::Cell::operator int () const
case CELL_INT: return mInt;
case CELL_FLOAT: return (int) mFloat;
case CELL_DOUBLE: return (int) mDouble;
case CELL_STRING: return mString.length ();
case CELL_STRING: return ::atoi (mString.c_str ());
}
return 0;
@@ -340,7 +341,7 @@ Grid::Cell::operator float () const
case CELL_INT: return (float) mInt;
case CELL_FLOAT: return mFloat;
case CELL_DOUBLE: return (float) mDouble;
case CELL_STRING: return (float) mString.length ();
case CELL_STRING: return (float) ::atof (mString.c_str ());
}
return 0.0;
@@ -355,7 +356,7 @@ Grid::Cell::operator double () const
case CELL_INT: return (double) mInt;
case CELL_FLOAT: return (double) mFloat;
case CELL_DOUBLE: return mDouble;
case CELL_STRING: return (double) mString.length ();
case CELL_STRING: return (double) ::atof (mString.c_str ());
}
return 0.0;
@@ -367,7 +368,7 @@ Grid::Cell::operator std::string () const
switch (mType)
{
case CELL_BOOL: return mBool ? "true" : "false";
case CELL_BOOL: return mBool ? "true" : "false"; // TODO i18n
case CELL_CHAR: sprintf (s, "%c", mChar);
return std::string (s);
case CELL_INT: sprintf (s, "%d", mInt);

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2008, Paul Beckingham.
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -27,6 +27,7 @@
#ifndef INCLUDED_GRID
#define INCLUDED_GRID
#include <stdio.h>
#include <string>
#include <vector>
@@ -44,6 +45,9 @@ public:
Cell (const double);
Cell (const std::string&);
Cell (const Cell&);
Cell& operator= (const Cell&);
operator bool () const;
operator char () const;
operator int () const;
@@ -71,6 +75,9 @@ public:
Grid ();
~Grid ();
Grid (const Grid&);
Grid& operator= (const Grid&);
void add (const unsigned int, const unsigned int, const bool);
void add (const unsigned int, const unsigned int, const char);
void add (const unsigned int, const unsigned int, const int);

66
src/Keymap.cpp Normal file
View File

@@ -0,0 +1,66 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <string>
#include "Keymap.h"
////////////////////////////////////////////////////////////////////////////////
Keymap::Keymap ()
{
}
////////////////////////////////////////////////////////////////////////////////
Keymap::Keymap (const Keymap& other)
{
throw std::string ("unimplemented Keymap::Keymap");
// mOne = other.mOne;
}
////////////////////////////////////////////////////////////////////////////////
Keymap& Keymap::operator= (const Keymap& other)
{
throw std::string ("unimplemented Keymap::operator=");
if (this != &other)
{
// mOne = other.mOne;
}
return *this;
}
////////////////////////////////////////////////////////////////////////////////
Keymap::~Keymap ()
{
}
////////////////////////////////////////////////////////////////////////////////
void Keymap::load (const std::string& file)
{
throw std::string ("unimplemented Keymap::load");
}
////////////////////////////////////////////////////////////////////////////////

51
src/Keymap.h Normal file
View File

@@ -0,0 +1,51 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_KEYMAP
#define INCLUDED_KEYMAP
#include <string>
class Keymap
{
public:
Keymap (); // Default constructor
Keymap (const Keymap&); // Copy constructor
Keymap& operator= (const Keymap&); // Assignment operator
~Keymap (); // Destructor
void load (const std::string&); // Load the map file
/*
real (); // Convert soft to real
soft (); // Convert real to soft
*/
private:
// TODO Structure for mapping strings to keys.
};
#endif
////////////////////////////////////////////////////////////////////////////////

73
src/Location.cpp Normal file
View File

@@ -0,0 +1,73 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include "Location.h"
////////////////////////////////////////////////////////////////////////////////
Location::Location ()
: path ("")
, pending (NULL)
, completed (NULL)
, undo (NULL)
{
}
////////////////////////////////////////////////////////////////////////////////
Location::Location (const std::string& p)
: path (p)
{
}
////////////////////////////////////////////////////////////////////////////////
Location::Location (const Location& other)
{
path = other.path;
pending = other.pending;
completed = other.completed;
undo = other.undo;
}
////////////////////////////////////////////////////////////////////////////////
Location& Location::operator= (const Location& other)
{
if (this != &other)
{
path = other.path;
pending = other.pending;
completed = other.completed;
undo = other.undo;
}
return *this;
}
////////////////////////////////////////////////////////////////////////////////
Location::~Location ()
{
}
////////////////////////////////////////////////////////////////////////////////

50
src/Location.h Normal file
View File

@@ -0,0 +1,50 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_LOCATION
#define INCLUDED_LOCATION
#include <string>
#include <stdio.h>
class Location
{
public:
Location (); // Default constructor
Location (const std::string&); // Default constructor
Location (const Location&); // Copy constructor
Location& operator= (const Location&); // Assignment operator
~Location (); // Destructor
public:
std::string path;
FILE* pending;
FILE* completed;
FILE* undo;
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,3 +1,11 @@
bin_PROGRAMS = task
task_SOURCES = Config.cpp Date.cpp T.cpp TDB.cpp Table.cpp Grid.cpp color.cpp parse.cpp task.cpp command.cpp report.cpp util.cpp text.cpp rules.cpp Config.h Date.h T.h TDB.h Table.h Grid.h color.h task.h
AM_CPPFLAGS = -Wall -pedantic -ggdb3 -fno-rtti
task_SOURCES = Att.cpp Cmd.cpp Config.cpp Context.cpp Date.cpp Duration.cpp \
Filter.cpp Grid.cpp Keymap.cpp Location.cpp Nibbler.cpp \
Record.cpp Sequence.cpp StringTable.cpp Subst.cpp Task.cpp \
TDB.cpp Table.cpp Timer.cpp Permission.cpp color.cpp edit.cpp \
command.cpp import.cpp interactive.cpp recur.cpp report.cpp \
custom.cpp rules.cpp main.cpp text.cpp util.cpp \
Att.h Cmd.h Config.h Context.h Date.h Duration.h Filter.h \
Grid.h Keymap.h Location.h Nibbler.h Record.h Sequence.h \
StringTable.h Subst.h Task.h TDB.h Table.h Timer.h \
Permission.h color.h i18n.h main.h text.h util.h

View File

@@ -1,433 +0,0 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = task$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/auto.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_task_OBJECTS = Config.$(OBJEXT) Date.$(OBJEXT) T.$(OBJEXT) \
TDB.$(OBJEXT) Table.$(OBJEXT) Grid.$(OBJEXT) color.$(OBJEXT) \
parse.$(OBJEXT) task.$(OBJEXT) command.$(OBJEXT) \
report.$(OBJEXT) util.$(OBJEXT) text.$(OBJEXT) rules.$(OBJEXT)
task_OBJECTS = $(am_task_OBJECTS)
task_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(task_SOURCES)
DIST_SOURCES = $(task_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
task_SOURCES = Config.cpp Date.cpp T.cpp TDB.cpp Table.cpp Grid.cpp color.cpp parse.cpp task.cpp command.cpp report.cpp util.cpp text.cpp rules.cpp Config.h Date.h T.h TDB.h Table.h Grid.h color.h task.h
AM_CPPFLAGS = -Wall -pedantic -ggdb3 -fno-rtti
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
task$(EXEEXT): $(task_OBJECTS) $(task_DEPENDENCIES)
@rm -f task$(EXEEXT)
$(CXXLINK) $(task_OBJECTS) $(task_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Config.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Date.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Grid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/T.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TDB.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Table.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/report.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rules.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

304
src/Nibbler.cpp Normal file
View File

@@ -0,0 +1,304 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include <ctype.h>
#include "Nibbler.h"
////////////////////////////////////////////////////////////////////////////////
Nibbler::Nibbler ()
: mInput ("")
, mCursor (0)
{
}
////////////////////////////////////////////////////////////////////////////////
Nibbler::Nibbler (const char* input)
: mInput (input)
, mCursor (0)
{
}
////////////////////////////////////////////////////////////////////////////////
Nibbler::Nibbler (const std::string& input)
: mInput (input)
, mCursor (0)
{
}
////////////////////////////////////////////////////////////////////////////////
Nibbler::Nibbler (const Nibbler& other)
{
mInput = other.mInput;
mCursor = other.mCursor;
}
////////////////////////////////////////////////////////////////////////////////
Nibbler& Nibbler::operator= (const Nibbler& other)
{
if (this != &other)
{
mInput = other.mInput;
mCursor = other.mCursor;
}
return *this;
}
////////////////////////////////////////////////////////////////////////////////
Nibbler::~Nibbler ()
{
}
////////////////////////////////////////////////////////////////////////////////
// Extract up until the next c, or EOS.
bool Nibbler::getUntil (char c, std::string& result)
{
if (mCursor < mInput.length ())
{
std::string::size_type i = mInput.find (c, mCursor);
if (i != std::string::npos)
{
result = mInput.substr (mCursor, i - mCursor);
mCursor = i;
}
else
{
result = mInput.substr (mCursor, std::string::npos);
mCursor = mInput.length ();
}
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getUntil (const std::string& terminator, std::string& result)
{
if (mCursor < mInput.length ())
{
std::string::size_type i = mInput.find (terminator, mCursor);
if (i != std::string::npos)
{
result = mInput.substr (mCursor, i - mCursor);
mCursor = i;
}
else
{
result = mInput.substr (mCursor, std::string::npos);
mCursor = mInput.length ();
}
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getUntilOneOf (const std::string& chars, std::string& result)
{
if (mCursor < mInput.length ())
{
std::string::size_type i = mInput.find_first_of (chars, mCursor);
if (i != std::string::npos)
{
result = mInput.substr (mCursor, i - mCursor);
mCursor = i;
}
else
{
result = mInput.substr (mCursor, std::string::npos);
mCursor = mInput.length ();
}
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::skipN (const int quantity /* = 1 */)
{
if (mCursor >= mInput.length ())
return false;
if (mCursor <= mInput.length () - quantity)
{
mCursor += quantity;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::skip (char c)
{
if (mCursor < mInput.length () &&
mInput[mCursor] == c)
{
++mCursor;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::skipAll (char c)
{
std::string::size_type i = mCursor;
while (i < mInput.length () && mInput[i] == c)
++i;
if (i != mCursor)
{
mCursor = i;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::skipAllOneOf (const std::string& chars)
{
if (mCursor < mInput.length ())
{
std::string::size_type i = mInput.find_first_not_of (chars, mCursor);
if (i == mCursor)
return false;
if (i == std::string::npos)
mCursor = mInput.length (); // Yes, off the end.
else
mCursor = i;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getQuoted (char c, std::string& result)
{
std::string::size_type start = mCursor;
if (start < mInput.length () && mInput[start] == c)
{
++start;
if (start < mInput.length ())
{
std::string::size_type end = mInput.find (c, start);
if (end != std::string::npos)
{
result = mInput.substr (start, end - start);
mCursor = end + 1;
return true;
}
}
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getInt (int& result)
{
std::string::size_type i = mCursor;
if (i < mInput.length ())
{
if (mInput[i] == '-')
++i;
else if (mInput[i] == '+')
++i;
}
while (i < mInput.length () && isdigit (mInput[i]))
++i;
if (i > mCursor)
{
result = ::atoi (mInput.substr (mCursor, i - mCursor).c_str ());
mCursor = i;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getUnsignedInt (int& result)
{
std::string::size_type i = mCursor;
while (i < mInput.length () && isdigit (mInput[i]))
++i;
if (i > mCursor)
{
result = ::atoi (mInput.substr (mCursor, i - mCursor).c_str ());
mCursor = i;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getUntilEOL (std::string& result)
{
return getUntil ('\n', result);
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::getUntilEOS (std::string& result)
{
if (mCursor < mInput.length ())
{
result = mInput.substr (mCursor, std::string::npos);
mCursor = mInput.length ();
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Nibbler::depleted ()
{
if (mCursor >= mInput.length ())
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////

62
src/Nibbler.h Normal file
View File

@@ -0,0 +1,62 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_NIBBLER
#define INCLUDED_NIBBLER
#include <string>
class Nibbler
{
public:
Nibbler (); // Default constructor
Nibbler (const char*); // Constructor
Nibbler (const std::string&); // Constructor
Nibbler (const Nibbler&); // Copy constructor
Nibbler& operator= (const Nibbler&); // Assignment operator
~Nibbler (); // Destructor
bool getUntil (char, std::string&);
bool getUntil (const std::string&, std::string&);
bool getUntilOneOf (const std::string&, std::string&);
bool skipN (const int quantity = 1);
bool skip (char);
bool skipAll (char);
bool skipAllOneOf (const std::string&);
bool getQuoted (char, std::string&);
bool getInt (int&);
bool getUnsignedInt (int&i);
bool getUntilEOL (std::string&);
bool getUntilEOS (std::string&);
bool depleted ();
private:
std::string mInput;
std::string::size_type mCursor;
};
#endif
////////////////////////////////////////////////////////////////////////////////

74
src/Permission.cpp Normal file
View File

@@ -0,0 +1,74 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include "Permission.h"
#include "Context.h"
#include "util.h"
#include "i18n.h"
extern Context context;
////////////////////////////////////////////////////////////////////////////////
Permission::Permission ()
: needConfirmation (false)
, allConfirmed (false)
{
// Turning confirmations off is the same as entering "all".
if (context.config.get ("confirmation", true) == false)
allConfirmed = true;
}
////////////////////////////////////////////////////////////////////////////////
bool Permission::confirmed (const Task& task, const std::string& question)
{
if (!needConfirmation)
return true;
if (allConfirmed)
return true;
std::cout << std::endl
<< "Task "
<< task.id
<< " \""
<< task.get ("description")
<< "\""
<< std::endl;
int answer = confirm3 (question);
if (answer == 2)
allConfirmed = true;
if (answer > 0)
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////

50
src/Permission.h Normal file
View File

@@ -0,0 +1,50 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_PERMISSION
#define INCLUDED_PERMISSION
#include <string>
#include "Task.h"
class Permission
{
public:
Permission ();
Permission (const Permission&);
Permission& operator= (const Permission&);
void bigChange () { needConfirmation = true; }
void bigSequence () { needConfirmation = true; }
bool confirmed (const Task&, const std::string&);
private:
bool needConfirmation;
bool allConfirmed;
};
#endif
////////////////////////////////////////////////////////////////////////////////

183
src/Record.cpp Normal file
View File

@@ -0,0 +1,183 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include "util.h"
#include "Nibbler.h"
#include "Context.h"
#include "i18n.h"
#include "Record.h"
extern Context context;
////////////////////////////////////////////////////////////////////////////////
Record::Record ()
{
}
////////////////////////////////////////////////////////////////////////////////
Record::Record (const std::string& input)
{
parse (input);
}
////////////////////////////////////////////////////////////////////////////////
Record::~Record ()
{
}
////////////////////////////////////////////////////////////////////////////////
// The format is:
//
// [ Att::composeF4 ... ] \n
//
std::string Record::composeF4 () const
{
std::string ff4 = "[";
bool first = true;
std::map <std::string, Att>::const_iterator it;
for (it = this->begin (); it != this->end (); ++it)
{
if (it->second.value () != "")
{
ff4 += (first ? "" : " ") + it->second.composeF4 ();
first = false;
}
}
ff4 += "]\n";
return ff4;
}
////////////////////////////////////////////////////////////////////////////////
//
// start --> [ --> Att --> ] --> end
// ^ |
// +-------+
//
void Record::parse (const std::string& input)
{
clear ();
Nibbler n (input);
std::string line;
if (n.skip ('[') &&
n.getUntil (']', line) &&
n.skip (']') &&
n.depleted ())
{
if (line.length () == 0)
throw context.stringtable.get (RECORD_EMPTY,
"Empty record in input");
Nibbler nl (line);
Att a;
while (!nl.depleted ())
{
a.parse (nl);
(*this)[a.name ()] = a;
nl.skip (' ');
}
std::string remainder;
nl.getUntilEOS (remainder);
if (remainder.length ())
throw context.stringtable.get (RECORD_EXTRA,
"Unrecognized characters at end of line");
}
else
throw context.stringtable.get (RECORD_NOT_FF4,
"Record not recognized as format 4");
}
////////////////////////////////////////////////////////////////////////////////
bool Record::has (const std::string& name) const
{
Record::const_iterator i = this->find (name);
if (i != this->end ())
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
std::vector <Att> Record::all ()
{
std::vector <Att> all;
foreach (a, (*this))
all.push_back (a->second);
return all;
}
////////////////////////////////////////////////////////////////////////////////
const std::string Record::get (const std::string& name) const
{
Record::const_iterator i = this->find (name);
if (i != this->end ())
return i->second.value ();
return "";
}
////////////////////////////////////////////////////////////////////////////////
int Record::get_int (const std::string& name) const
{
Record::const_iterator i = this->find (name);
if (i != this->end ())
return ::atoi (i->second.value ().c_str ());
return 0;
}
////////////////////////////////////////////////////////////////////////////////
void Record::set (const std::string& name, const std::string& value)
{
(*this)[name] = Att (name, value);
}
////////////////////////////////////////////////////////////////////////////////
void Record::set (const std::string& name, int value)
{
std::stringstream svalue;
svalue << value;
(*this)[name] = Att (name, svalue.str ());
}
////////////////////////////////////////////////////////////////////////////////
void Record::remove (const std::string& name)
{
Record::iterator it;
if ((it = this->find (name)) != this->end ())
this->erase (it);
}
////////////////////////////////////////////////////////////////////////////////

56
src/Record.h Normal file
View File

@@ -0,0 +1,56 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_RECORD
#define INCLUDED_RECORD
#include <vector>
#include <map>
#include <string>
#include "Att.h"
class Record : public std::map <std::string, Att>
{
public:
Record (); // Default constructor
Record (const std::string&); // Copy constructor
virtual ~Record (); // Destructor
std::string composeF4 () const;
std::string composeCSV () const;
void parse (const std::string&);
bool has (const std::string&) const;
std::vector <Att> all ();
const std::string get (const std::string&) const;
int get_int (const std::string&) const;
void set (const std::string&, const std::string&);
void set (const std::string&, int);
void remove (const std::string&);
};
#endif
////////////////////////////////////////////////////////////////////////////////

162
src/Sequence.cpp Normal file
View File

@@ -0,0 +1,162 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <map>
#include <string>
#include <algorithm>
#include <ctype.h>
#include "util.h"
#include "text.h"
#include "i18n.h"
#include "Context.h"
#include "Sequence.h"
extern Context context;
////////////////////////////////////////////////////////////////////////////////
Sequence::Sequence ()
{
}
////////////////////////////////////////////////////////////////////////////////
Sequence::Sequence (const std::string& input)
{
parse (input);
}
////////////////////////////////////////////////////////////////////////////////
Sequence::~Sequence ()
{
}
////////////////////////////////////////////////////////////////////////////////
bool Sequence::valid (const std::string& input) const
{
std::vector <std::string> ranges;
split (ranges, input, ',');
std::vector <std::string>::iterator it;
for (it = ranges.begin (); it != ranges.end (); ++it)
{
std::vector <std::string> range;
split (range, *it, '-');
if (range.size () < 1 ||
range.size () > 2)
return false;
if (range.size () <= 2 && !validId (range[0]))
return false;
if (range.size () == 2 && !validId (range[1]))
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
void Sequence::parse (const std::string& input)
{
std::vector <std::string> ranges;
split (ranges, input, ',');
std::vector <std::string>::iterator it;
for (it = ranges.begin (); it != ranges.end (); ++it)
{
std::vector <std::string> range;
split (range, *it, '-');
switch (range.size ())
{
case 1:
{
if (! validId (range[0]))
throw context.stringtable.get (SEQUENCE_BAD_SEQ, "Invalid ID in sequence");
int id = ::atoi (range[0].c_str ());
this->push_back (id);
}
break;
case 2:
{
if (! validId (range[0]) ||
! validId (range[1]))
throw context.stringtable.get (SEQUENCE_BAD_SEQ, "Invalid ID in range");
int low = ::atoi (range[0].c_str ());
int high = ::atoi (range[1].c_str ());
if (low > high)
throw context.stringtable.get (SEQUENCE_INVERTED, "Inverted sequence range high-low");
if (high - low >= SEQUENCE_MAX)
throw context.stringtable.get (SEQUENCE_RANGE_MAX, "ID Range too large");
for (int i = low; i <= high; ++i)
this->push_back (i);
}
break;
default:
throw context.stringtable.get (SEQUENCE_NOT_A_SEQUENCE, "Not a sequence.");
break;
}
}
}
////////////////////////////////////////////////////////////////////////////////
void Sequence::combine (const Sequence& other)
{
// Create a map using the sequence elements as keys. This will create a
// unique list, with no duplicates.
std::map <int, int> both;
foreach (i, *this) both[*i] = 0;
foreach (i, other) both[*i] = 0;
// Now make a sequence out of the keys of the map.
this->clear ();
foreach (i, both)
this->push_back (i->first);
std::sort (this->begin (), this->end ());
}
////////////////////////////////////////////////////////////////////////////////
bool Sequence::validId (const std::string& input) const
{
if (input.length () == 0)
return false;
for (size_t i = 0; i < input.length (); ++i)
if (!isdigit (input[i]))
return false;
return true;
}
////////////////////////////////////////////////////////////////////////////////

51
src/Sequence.h Normal file
View File

@@ -0,0 +1,51 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_SEQUENCE
#define INCLUDED_SEQUENCE
#include <vector>
#include <string>
#define SEQUENCE_MAX 1000
class Sequence : public std::vector <int>
{
public:
Sequence (); // Default constructor
Sequence (const std::string&); // Parse
~Sequence (); // Destructor
bool valid (const std::string&) const;
void parse (const std::string&);
void combine (const Sequence&);
private:
bool validId (const std::string&) const;
};
#endif
////////////////////////////////////////////////////////////////////////////////

98
src/StringTable.cpp Normal file
View File

@@ -0,0 +1,98 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the
//
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <fstream>
#include <sstream>
#include <text.h>
#include <util.h>
#include <stdlib.h>
#include "StringTable.h"
////////////////////////////////////////////////////////////////////////////////
StringTable::StringTable ()
{
}
////////////////////////////////////////////////////////////////////////////////
StringTable::~StringTable ()
{
}
////////////////////////////////////////////////////////////////////////////////
// UTF-8 encoding
//
// 123 This is the string
// 124 This is another string
// ...
void StringTable::load (const std::string& file)
{
this->clear (); // Allows dynamic reload.
std::ifstream in;
in.open (file.c_str (), std::ifstream::in);
if (in.good ())
{
std::string line;
while (getline (in, line))
{
// Remove comments.
std::string::size_type pound = line.find ("#"); // no i18n
if (pound != std::string::npos)
line = line.substr (0, pound);
line = trim (line, " \t"); // no i18n
// Skip empty lines.
if (line.length () > 0)
{
std::string::size_type equal = line.find (" "); // no i18n
if (equal != std::string::npos)
{
int key = ::atoi (trim (line.substr (0, equal), " \t").c_str ()); // no i18n
std::string value = trim (line.substr (equal+1, line.length () - equal), " \t"); // no i18n
(*this)[key] = value;
}
}
}
in.close ();
}
else
throw std::string ("Could not read string file '") + file + "'"; // TODO i18n
}
////////////////////////////////////////////////////////////////////////////////
std::string StringTable::get (int id, const std::string& alternate)
{
// Return the right string.
if (this->find (id) != this->end ())
return (*this)[id];
return alternate;
}
////////////////////////////////////////////////////////////////////////////////

Some files were not shown because too many files have changed in this diff Show More