Compare commits

...

908 Commits

Author SHA1 Message Date
Federico Hernandez
60a99725b8 Release date for 1.9.1 2010-05-23 00:03:53 +02:00
Federico Hernandez
635c6432d4 Release date for 1.9.1 2010-05-23 00:03:05 +02:00
Paul Beckingham
eb1304ec41 Unit Tests - fix
- Fixed incorrect regex in hook format unit tests.  Note that this
  doesn't show up in the tinderbox, because that version of task is
  not built with Lua support.
2010-05-22 14:02:33 -04:00
Paul Beckingham
a5b57ec2ac Bug Fix - #395
- When a recurrence period is added to a pending task, the status should
  change from pending to recurring, and a mask attribute should be added.
  The lack of those changes meant that "task 1 recur:1w" did not do what
  was expected.  Thanks to T. Charles Yun.
2010-05-22 13:50:20 -04:00
Federico Hernandez
783225cd70 Typo fixes in ChangeLog 2010-05-13 21:19:18 +02:00
Paul Beckingham
804b6a8cdb Bug Fix - #401
- Fixed bug that ignored the search.case.sensitive configuration
  setting when filtering on project names (thank to John Florian).
2010-05-12 23:13:15 -04:00
Paul Beckingham
a31e9a5a3c Bug Fix - #404
- Refixed #404 that got lost in a recent merge.
2010-05-11 23:52:12 -04:00
Federico Hernandez
8553811889 Automatic computation of easter and related holidays for the calendar 2010-05-11 00:01:17 +02:00
Federico Hernandez
68ae9173ae Added documentation for 'include' to taskrc.5 2010-05-10 23:15:46 +02:00
Federico Hernandez
72763f2a2b Bug Fix
- wrong regexp in cal.t when matching '$month $year'
2010-05-10 21:59:10 +02:00
Paul Beckingham
89267846ca Bug Fix - #404 Compile error on current archlinux
- Applied patch sent by Johannes Schlatow to fix build on Arch Linux.
2010-05-09 18:30:12 -04:00
Paul Beckingham
38d82f6564 Bug Fix
- Deleting a task no longer clobbers any recorded end date (thanks to
  Seneca Cunningham).
2010-04-25 00:57:50 -04:00
Paul Beckingham
ac431ac5c9 Enhancement
- Applied patch from Cory Donnelly to provide default current date to the
  edit command, for new annotations.
2010-04-12 18:19:35 -04:00
Paul Beckingham
fa7ea5cad5 Holidays
- Removed Christmas Eve, which is not really a holiday.
2010-04-12 18:17:24 -04:00
Paul Beckingham
17069843d9 Documentation Update
- Added example of using DeMorgan's theorem when constructing multi-term filters
  to task-faq.5 (thanks to Rich Mintz).
2010-04-12 18:16:59 -04:00
Paul Beckingham
d6251142a2 Unit Tests
- Fixed unit tests that broke because the unit test script took more
  than one second to run.  Ordinarily is a test script does this:

    $ task add foo
    $ task list

  Then the age of the task is listed as '-', which means under one
  second.  But if the test does this:

    $ task add foo
    $ sleep 1
    $ task list

  Then the age is listed as '1 sec'.  Sometimes, as in these tests,
  the host may be just slow enough that the test script expects '-',
  but gets '1 sec'.
2010-04-04 10:00:01 -04:00
Paul Beckingham
a3a941fd92 Documentation
- Correct task-faq.5 so that the sequence \033 shows up properly when
  rendered by 'man', rather than 033.
2010-03-28 23:59:34 -04:00
Paul Beckingham
b6e9b84c80 Portability
- Applied patch from Emil Sköldberg.

Replace 'test ... == ...' with 'test ... = ...',
since [quoted from pkgsrc error message]:

The "test" command, as well as the "[" command, are not required to know
the "==" operator. Only a few implementations like bash and some
versions of ksh support it.

When you run "test foo == foo" on a platform that does not support the
"==" operator, the result will be "false" instead of "true". This can
lead to unexpected behavior.
2010-03-25 17:36:43 -04:00
Paul Beckingham
2791578410 Summary Report
- Made the summary bar colors configurable.
2010-03-25 17:33:43 -04:00
Federico Hernandez
d3628c04db Made easter algorithm static in Date 2010-03-23 02:51:31 +01:00
Federico Hernandez
10450963cb Eeaster algorithm 2010-03-23 02:13:35 +01:00
Paul Beckingham
fa8c33da45 Merge branch '1.9.1' of tasktools.org:task into 1.9.1
Conflicts:
	src/tests/record.t.cpp
2010-03-22 20:35:36 -04:00
Paul Beckingham
e8942d11ee Documentation Update
- Fixed typo.
2010-03-22 20:32:12 -04:00
Paul Beckingham
078e612de0 Unit Tests
- Test claimed to call Record::get_ulong, but was calling Record::get_int.
2010-03-22 20:31:37 -04:00
Federico Hernandez
70da455f1a From: Paul Beckingham <paul@beckingham.net>
Date: Sun, 28 Feb 2010 12:10:06 -0500
Subject: [PATCH] Enhancement - time support in the Date object.

- Added ability to parse and display time, using:
    h - single digit hour
    H - double digit hour
    N - double digit minutes
    S - double digit seconds
- Added a request for mktime() to automatically determine whether
  summer time should be considered.
- Added Date::Date (m, d, y, hr, mi, se) constructor.
- Added Date::sameHour comparison method.
- Added unit tests.
2010-03-22 23:56:45 +01:00
Paul Beckingham
e5f7e18d56 Enhancement - Hooks
- Implemented API calls: task_get_due, task_get_end, task_get_entry,
  task_get_start, task_get_until and task_get_wait.
- Implemented unit tests for API calls.
- Implemented new Record::get_ulong method.
- Implemented unit tests for get_ulong.
2010-03-01 20:53:44 -05:00
Paul Beckingham
98ebe8b7cc Build - with_lua
- Added code to dynamically run different configure scripts depending
  on the OS.
2010-03-01 18:17:14 -05:00
Paul Beckingham
6304ca7c1f Unit Tests - run_all
- Added better formatting of the results.
- Added a count of the skipped tests.
2010-03-01 18:16:29 -05:00
Paul Beckingham
f6ff18e31d Enhancement - Hooks
- Added many more format hooks.
- Added unit tests for all added hooks.
- Added unit tests for format-countdown and format-countdown_compact.
2010-03-01 18:14:06 -05:00
Paul Beckingham
dbf8def7db Unit Tests - record.t
- Cast to size_t to use a (pseudo) appropriate UnitTest::is method.
2010-02-14 12:58:59 -05:00
Paul Beckingham
df8eb7d5ef Unit Tests - record.t
- Fixed bug in unit tests that claimed to be calling Record::get_ulong,
  but was calling Record::get_int instead.  Silly error.
2010-03-14 11:23:15 -04:00
Federico Hernandez
485734e107 Removed space between minus and number in the countdown 2010-03-06 00:19:42 +01:00
Federico Hernandez
f4dc5c3674 Removed space between minus and number in the countdown 2010-03-05 23:47:01 +01:00
Paul Beckingham
95e420bb15 Build - Lua
- Modified the with_lua script to include Ubuntu 9.10 details.
2010-02-14 12:41:56 -05:00
Paul Beckingham
409c6ee9b9 Enhancement - .taskrc timestamp
- Added a "created by ..." entry with timestamp inside the generated
  .taskrc file.
2010-02-28 11:16:35 -05:00
Paul Beckingham
fa195a3cb2 Unit Tests - grid
- Corrected mix of signed and unsigned ints which confuse certain
  combinations of GCC and OS.
2010-02-23 20:38:59 -05:00
Paul Beckingham
cda959a658 Bug Fix - #382
- Changed from testing the ID to testing the sequence size.
2010-02-23 18:07:05 -05:00
Federico Hernandez
a5d8ef524e Bug Fix - #382 task annotate doesn't complain when a task id is omitted
- added error msg when annotating without a task id
2010-02-23 22:50:59 +01:00
Paul Beckingham
cb1b1510a9 Copyright
- Bumped year to 2010.
2010-02-23 01:06:45 -05:00
Paul Beckingham
3f2c68377c Merge branch 'unit-tests' into 1.9.1 2010-02-23 01:05:57 -05:00
Paul Beckingham
846d9bfd83 Merge branch 'config-highlight' into 1.9.1 2010-02-23 01:02:44 -05:00
Paul Beckingham
eac6c3fca9 Merge branch 'lua-test' into 1.9.1 2010-02-23 01:00:08 -05:00
Federico Hernandez
d082a6baad Bumped version number to 1.9.1 2010-02-23 00:21:56 +01:00
Federico Hernandez
251f8e5704 Added SHA1 of tagged release commit 2010-02-23 00:15:41 +01:00
Paul Beckingham
0282e2be28 Packaging - OSX
- Updated packaging files.
2010-02-22 16:12:17 -05:00
Federico Hernandez
dd758f8b33 Release 1.9.0
- Bumped version number to 1.9.0
- Added release date to ChangeLog
- Included Debian in NEWS
2010-02-22 09:46:01 +01:00
Paul Beckingham
8229a96252 Unit Tests - grid
- Added unit tests for Grid object.
2010-02-21 13:32:14 -05:00
John Florian
adf07a9af0 Enhancement - improved vim highlighting of .taskrc
- Added a few more new keywords to bring up to date with current feature set:
    + active.indicator
    + tag.indicator
    + recurrence.indicator
    + color.due.today
    + color.calendar.due.today
2010-02-20 14:21:29 -05:00
Paul Beckingham
be62157308 Documentation Update
- Improved wording in some of the FAQ entries.
2010-02-20 09:05:37 -05:00
Paul Beckingham
061639a370 Bug Fix - #380 Configuration values can no longer be commented out
- Added an explanatory comment to reinforce what is said in the taskrc.5
  man page, about how to deal with defaults, overrides and blanks.
2010-02-17 18:15:24 -05:00
Paul Beckingham
ad7abec3d7 Unit Tests - next.t
- Tests no longer assume that a set of added tasks will show an age
  of /-/, and now uses /(:?-|\d secs?)/.
2010-02-16 07:38:15 -05:00
Paul Beckingham
c34aeba5a4 Enhancement - config error highlights
- Configuration variables that are unrecognized are now highlighted
  in color, as well as being listed out.
2010-02-16 00:16:51 -05:00
Paul Beckingham
816f0533be Unit Tests - Lua
- Added -llua to src/tests/Makefile, to improve the quality of test results.
2010-02-16 00:05:19 -05:00
Paul Beckingham
e923282181 Portability - Haiku
- Added build notes for Haiku, requiring a 'setgcc gcc4' command.
- Modified directory code to accomodate Haiku's struct dirent
  anomalies (same as Solaris).
2010-02-15 23:55:03 -05:00
Paul Beckingham
6554e4d0f4 Packaging
- Latest changes for beta3 package on OSX.
2010-02-15 22:41:06 -05:00
Federico Hernandez
eb65dd42e4 Changes for beta3 2010-02-16 00:09:11 +01:00
Paul Beckingham
d917215417 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-02-15 11:12:30 -05:00
Paul Beckingham
69f2669bee Documentation Update
- Now includes a README.build file that helps troubleshoot problems
  with configure and make.
2010-02-15 11:08:40 -05:00
Federico Hernandez
dfc35f3744 Missing doc for color.due.today and countdown 2010-02-14 23:25:01 +01:00
Federico Hernandez
56dee6975e Fixed failing cal.t unit test due to color blending 2010-02-14 22:11:48 +01:00
Paul Beckingham
9b80017323 Portability - Solaris
- Added include of auto.h to allow #ifdef SOLARIS to work.
- Put #ifdef around glob arguments that aren't supported on Solaris.
- Fixed uninitialized variable that only gcc on Solaris spotted.
2010-02-12 20:58:56 -05:00
Paul Beckingham
75666c56cc Portability - Solaris
- Added a SOLARIS workaround for the lack of de_type member in struct dirent
  that other OSes have.
2010-02-12 01:35:20 -05:00
Paul Beckingham
0a3ee9f0a7 Portability
- Removed obsolete COLOR_* definitions from i18n.h that conflict on Cygwin.
2010-02-12 00:39:07 -05:00
Paul Beckingham
67546f8163 Configuration
- Allows rc.tag.indicator to replace the default + indicator.
- Allows rc.active.indicator to replace the default * indicator.
- Allows rc.recurrence.indicator to replace the default R indicator.
2010-02-11 23:50:55 -05:00
Paul Beckingham
22d99806d0 Build System - with_lua
- Added Cygwin 1.5, 1.7 commands.
2010-02-11 23:34:04 -05:00
Federico Hernandez
883e264319 2 new report columns
- countdown and countdown_compact
2010-02-12 03:01:03 +01:00
Federico Hernandez
e80769794e Added color blending to cal report 2010-02-12 01:15:19 +01:00
Federico Hernandez
4adfec4482 color.due.today and color.calendar.due.today
- tasks due on the current day ("today") can now be colorized with
  their own color.
- this is for reports and the calendar
2010-02-12 00:21:52 +01:00
Paul Beckingham
adb72ef023 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-02-10 23:45:26 -05:00
Paul Beckingham
69e0893c61 Build System
- Modified configure.ac to allow inclusion/exclusion of both ncurses
  and Lua.
- Also allows specification of include and lib directories for ncurses
  and Lua separately.
- This addresses a recent problem with Cygwin 1.7, where the most recent
  patches relocated ncurses from /usr/include to /usr/include/ncurses,
  and consequently broke task's default configuration, which was not
  very clever.
2010-02-10 18:16:46 -05:00
Federico Hernandez
10318fd19e Added Alexander to the AUTHORS file (as he has uploaded task into Debian) 2010-02-09 21:19:20 +01:00
Paul Beckingham
756200676d Packaging
- Modified task.pmdoc for 1.9.0
- Added README.txt and COPYING.txt files for installer to update script.
2010-02-08 22:48:50 -05:00
Paul Beckingham
73d8fb96cb Packaging
- Create 'update' script to handle the population of the tree used to
  create OSX packages.
- Cleaned out the old tree, because it can now be recreated at will.
2010-02-08 22:36:49 -05:00
Federico Hernandez
e9cbedd042 Fixing lintian warning when building deb package.
A man page row should not start with .taskrc as it is mis-interpreted
as groff macro.
2010-02-09 00:37:43 +01:00
Federico Hernandez
b22869f9ef Bumped version number to 1.9.0.beta2 2010-02-08 20:59:20 +01:00
Paul Beckingham
1a02cacc53 Enhancement - Hooks
- Implemented a few hooks.
- Implemented several Lua API calls.
- Unit tests for all hooks and API calls.
2010-02-07 00:22:02 -05:00
Paul Beckingham
cb952329d3 Documentation Update
- Added latest movie script.
2010-02-06 17:09:47 -05:00
Paul Beckingham
579ebe6130 Bug Fix - #372 Color blending/mapping broken
- Corrected problem in unit test that expected the wrong result.
- Fixed Color::Color (const std::string&) so that the foreground and
  background are now considered two different colors, are upgraded
  separately, if necessary, and then blended.  The problem affected
  all instances of "<256-color> on <16-color>".  Hooray for unit
  tests.
2010-02-06 16:59:22 -05:00
Paul Beckingham
89ae64c5fb Unit Tests - color
- Oddly, there were no unit tests for the Color object.  Now there are
  1,033.
- Three of these tests fail, which justifies adding them in the first place.
2010-02-06 15:40:44 -05:00
Paul Beckingham
ad9f318e10 Documentation Update
- Added task-color to the list of man pages referenced in several places.
2010-02-06 15:40:06 -05:00
Paul Beckingham
0e411cd646 Documentation Update
- Changed the default .taskrc file to have the color rules listed
  in their precedence order, along with a comment to that effect
  (thanks to John Florian)
2010-02-06 12:58:09 -05:00
Paul Beckingham
2b2795077b Bug Fix - #371 color.due clobbered by color.alternate
- Fixed bug #371 which caused task to mis-apply certain color rules, like
  color.alternate, which was (a) not applied first, and (b) not blended
  with the other color rules (thanks to Richard Querin).
2010-02-06 12:23:46 -05:00
Paul Beckingham
58910b07ef Unit Tests - hook.*.t
- Some hook tests were using the _version command, and assuming the
  version was \d.\d+.\d+, whereas it was '1.9.0.beta1'.
2010-02-05 18:40:05 -05:00
Paul Beckingham
5567b04277 Bug Fix - #370
- Task was preventing removal of due date from any task that had a due date,
  which is wrong.  It should be any task with a recur: value and a due date
  (thanks to John Florian).
2010-02-05 18:34:12 -05:00
Paul Beckingham
73d6e05c0e Bug Fix - #369 task config color.alternate does not take multiple args
- Fixed bug that meant these commands would not work:
    $ task config name 'one two three'
    $ task config name one two three
  (thanks to Richard Querin).
2010-02-05 18:22:36 -05:00
John Florian
0642c37c04 Documentation Update
- Indicate how to disable a color rule for which there is a built-in default.
- Added description for the new color.alternate configuration setting.
2010-02-03 21:17:30 -05:00
Paul Beckingham
45b66cd785 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-02-03 19:21:04 -05:00
Paul Beckingham
ed7c3fad57 Enhancement - Hooks
- Added more format hooks.
2010-02-03 19:20:45 -05:00
Paul Beckingham
fa37e002f0 Enhancement - Color
- Improved the labelling of colors in the color report.
2010-02-03 19:18:10 -05:00
Federico Hernandez
f99cd158dd Bumping to 1.9.0.beta1 2010-02-04 00:06:52 +01:00
John Florian
a790958daa Fix - vim syntax errors for taskrc
- calendar.details.report missing expected final '.'
- dateformat.holiday and dateformat.report not handled
- Updated header wasn't updated
2010-02-03 13:36:20 -05:00
John Florian
3341f74374 Enhancement - improved vim highlighting of .taskrc
- Added many new keywords to bring up to date with current feature set.
- Fixed incorrect highlighting of 'due' in report definitions.
2010-02-02 20:52:38 -05:00
Federico Hernandez
1505743fbf Merge branch 'master' into 1.9.0
Conflicts:
	package-config/osx/local/share/doc/task-1.8.5/COPYING
	package-config/osx/local/share/doc/task-1.8.5/README
2010-02-02 00:12:42 +01:00
Paul Beckingham
625ad3d7cf Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-01-31 23:32:43 -05:00
Paul Beckingham
f351e17a63 Enhancement - Hooks
- Implemented all command hooks.
- Implemented several field hooks.
- Implemented several task hooks.
- Reorganized event validation code.
- Finalized Hooks -> API::call* mechanism.
- Implemented several hook unit tests.
- Corrected unit tests that didn't specify rc.hooks=on.
- Corrected builds that include Lua.
2010-01-31 23:29:22 -05:00
Federico Hernandez
c1360506c9 Note on task-tutorial 2010-01-31 23:33:36 +01:00
Paul Beckingham
50f27e0952 Merge branch 'special_tags' into 1.9.0
Conflicts:
	ChangeLog
	src/recur.cpp

- Implemented unit tests for the +nonag and +nocolor special tags.
2010-01-31 12:17:55 -05:00
Paul Beckingham
dd423d315b Enhancement - Hooks
- Implemented lots of command hooks.
2010-01-30 23:39:51 -05:00
Paul Beckingham
78c7408380 Build
- Added new theme files to the dist.
- Added new holiday files to the dist.
2010-01-30 21:16:47 -05:00
Paul Beckingham
d09a079199 Enhancement - Hooks
- Implemented a master switch rc.hooks=off that can shut off all
  hooks.  Seems like a good idea.
- Added support for 'hooks' and 'hook.*' as valid configuration
  entries.
2010-01-30 17:43:33 -05:00
Paul Beckingham
ea8b4beede Documentation Update
- Updated the taskrc.5 man page to match 1.9.0 functionality.
- Removed obsolete colorizeMessage code.
2010-01-30 16:08:42 -05:00
Paul Beckingham
30e8b03038 Enhancements - Hooks
- The config command now reports missing or unreadable hook scripts.
2010-01-30 13:34:25 -05:00
Paul Beckingham
79050c29d7 Enhancement - Hooks
- Added timing information for event trigger calls.
2010-01-30 13:25:25 -05:00
Paul Beckingham
98f4e22950 Enhancement - Hooks
- Started to make the 'with_lua' script multi-platform.
2010-01-30 12:53:53 -05:00
Paul Beckingham
47f5a45e47 Bug Fix - #368 Recur until date in task info table displays epoch seconds
- Fixed bug.
- Added unit tests to prevent recurrence.
2010-01-28 09:53:26 -05:00
Paul Beckingham
c37f36510a Documentation Update
- Added a couple of good questions to the task-faq man page.  One is
  a discussion of the ID number resequencing, which really should have
  been addressed in this way years ago.
2010-01-27 23:58:18 -05:00
Paul Beckingham
c65cb536cc Documentation Update
- Added description of the new search.case.sensitive configuration
  setting.
2010-01-27 23:36:44 -05:00
Paul Beckingham
4a8b356867 Documentation update - script-hooks.txt
- Included the script for the hooks movie.
2010-01-27 22:56:41 -05:00
Paul Beckingham
ea2d57edd3 Enhancements - Hooks
- Make the hooks unit tests pass if Lua support is not included.
  We don't like yellow in the tinderbox.
2010-01-27 22:54:40 -05:00
Paul Beckingham
585cbdfcac Merge branch 'hooks' into 1.9.0
Conflicts:
	src/command.cpp
	src/report.cpp
2010-01-27 22:46:20 -05:00
Paul Beckingham
572a833a51 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-01-27 16:53:41 -05:00
Paul Beckingham
b1700f3cf6 Enhancement - caseless compare
- Fixed bug detecting multiple failed negative attribute matches.
2010-01-27 16:52:54 -05:00
Paul Beckingham
4f1183a358 Enhancement - caseless compare
- Fixed bug in text.cpp:find that failed to locate a substring if it occurred
  at the end of the string.
2010-01-27 16:28:57 -05:00
Federico Hernandez
180d4ece77 Spelling... 2010-01-27 18:42:16 +01:00
Paul Beckingham
0c5a71b02f Enhancement - caseless substitution
- Substitutions "task <id> /from/to/" now obey the rc.search.case.sensitive
  setting.
2010-01-27 12:26:06 -05:00
Paul Beckingham
9cab749016 Enhancement - caseless find
- Fixed bug that didn't properly consider the starting offset in find.
2010-01-27 10:38:38 -05:00
Paul Beckingham
06ecef76d3 Enhancement - caseless find
- Added support for a starting offset.
2010-01-27 09:50:10 -05:00
Paul Beckingham
2dfe144236 Enhancement - caseless string compare, find
- Switched the sense of the Boolean parameter to match a more natural
  name in the .taskrc file.
2010-01-27 09:33:26 -05:00
Paul Beckingham
3e5ea8cb6c Enhancement - Caseless string compare, find
- Merged compare and find functions in from metatask.
- Merged unit tests in from metatask.
2010-01-27 09:12:06 -05:00
Federico Hernandez
56edf73d93 Wrong Pingstdagen in holidays-SE.rc 2010-01-25 22:51:34 +01:00
Federico Hernandez
2b63f781e9 Edited ChangeLog according to changes in 401f1b6496 2010-01-25 01:14:49 +01:00
Federico Hernandez
ccb6327131 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-01-25 01:09:43 +01:00
Federico Hernandez
401f1b6496 Holidays and dates
- improved dateformat handling now defaulting to YMD set via
  dateformat.holiday variable
- fixed missing sorting in holiday table output when running
  calendar.holidays=full
- renamed reportdateformat to dateformat.report
- added config file checking for calendar.holidays and calendar.details
- added 2 holiday files for SE and US (watertown, MA)
2010-01-25 01:06:15 +01:00
Paul Beckingham
48bf9d9f85 Bug Fix - #299 Can't use multiple project.hasnt:foo
- Fixed bug that prevented a filter from containing multiple references
  to the same attribute (thanks for John Florian).
- Added unit tests to verify.
2010-01-24 18:40:04 -05:00
Paul Beckingham
cc82823c47 Documentation Update - task-color.5
- Added the new task-color man page to the makefile, so it gets installed
  properly.
- Added the new man page in the ChangeLog file.
2010-01-24 17:48:49 -05:00
Paul Beckingham
383962173e Bug Fix - #360 Huh? "You cannot remove the recurrence from a recurring task. "
- The logic for detecting changes to a recurring task was wrong.
- Added unit tests for this bug.
2010-01-24 17:35:37 -05:00
Paul Beckingham
c8d208b9be Enhancement - Hooks
- Implemented pre-info-command, post-info-command hook.
2010-01-23 13:57:38 -05:00
Paul Beckingham
d6daa336ca Enhancement - Hooks
- Implemented pre-delete, post-delete events.
- Implemented pre-delete-command, post-delete-command events.
2010-01-23 13:43:50 -05:00
Paul Beckingham
b02374c3f5 Enhancement - Hooks
- Implemented pre-completed, post-completed events.
- Added debug info for event triggers.
- Removed support for pre-file-unlock, post-file-unlock, as they are
  called from TDB::~TDB in Context::~Context, which is after Hooks::~Hooks,
  which means segfault.
2010-01-23 13:12:49 -05:00
Paul Beckingham
03f7e0686f Enhancement - Hooks
- Implemented API::callTaskHook.
- Implemented Hook object inside Hooks.cpp, not Hooks.h.
- Implemented Hooks.setTaskId to provide context for task hooks.
- Implemented pre-tag, post-tag, pre-detag, post-detag
  events.
- Implemented pre-file-lock, post-file-lock, pre-file-unlock, post-file-unlock
  events.
2010-01-23 12:47:48 -05:00
Paul Beckingham
545013e839 Enhancement - config command
- Added validation of rc.annotations and rc.default.priority to the config
  command.
2010-01-23 00:12:34 -05:00
Federico Hernandez
4025488cf8 Updated ChangeLog and NEWS 2010-01-22 01:57:01 +01:00
Federico Hernandez
4ce2a1d071 Merge branch '1.9.0' of tasktools.org:task into helg 2010-01-22 01:45:33 +01:00
Federico Hernandez
a7244a999e Holidays
- added displaying of holidays in 'task cal'
  via calendar.holidays
- the legend in the calendar can now be turned off
- weeknumbers in the calendar can now be color-coded
2010-01-22 01:42:32 +01:00
Paul Beckingham
5b2cde4e30 Documentation - task-color.5
- Added new color tutorial man page.
2010-01-20 20:45:17 -05:00
Paul Beckingham
21d5607af2 Unit Tests - post-start, pre-exit
- Implemented unit tests for the post-start and pre-exit hooks.
2010-01-19 23:24:24 -05:00
Paul Beckingham
1cd6d4c7e7 Enhancement - Hooks
- Implemented pre-debug, post-debug.
- Implemented pre-header, post-header.
- Implemented pre-output, post-output.
- Implemented pre-footnote, post-footnote.
- Implemented pre-gc, post-gc.
- Implemented pre-undo, post-undo.
- Implemented pre-add-command, post-add-command.
2010-01-19 23:01:52 -05:00
Paul Beckingham
8540cab0a6 Enhancement - hooks
- Improved diagnostics of C++ side of the Lua API.
2010-01-19 22:19:40 -05:00
Federico Hernandez
e3c28f3fb3 Include statement for Linux 2010-01-20 00:31:41 +01:00
Paul Beckingham
f6f84aaf42 Tweak - default.command
- Trims whitespace off the default command that is reported via Context::header.
2010-01-19 18:04:47 -05:00
Paul Beckingham
b927d95d58 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-01-19 17:53:53 -05:00
Paul Beckingham
dd5623be65 Unit Tests
- Fixed tests that were broken when the config defaults changed.
2010-01-19 17:53:17 -05:00
Paul Beckingham
78063c4df7 Enhancement - Hooks
- Multiple hooks for the same event are now triggered, in the sequence
  they are found in .taskrc
- Program hooks can now cause task to exit.
2010-01-18 20:19:51 -05:00
Federico Hernandez
ab86490b37 Clean up annotation details
- changed variable name from annotation.details to annotations
- added report.X.annotations
- changed values from 2, 1, 0 to full, sparse, none
- made reportdateformat available in timesheet
2010-01-19 00:46:25 +01:00
Paul Beckingham
69cae7731f Enhancement - Hooks
- First fully functioning Lua hooks.  Woohoo.
2010-01-18 18:03:31 -05:00
Paul Beckingham
eeefc8a992 Color
- Removed coloring of only the due date, which is operating outside of
  the colorization rules.
- Removed commented out code.
2010-01-18 00:53:01 -05:00
Paul Beckingham
77e98c8c03 Enhancement - Hooks
- Improved the conditional compilation.
2010-01-17 23:41:02 -05:00
Federico Hernandez
fccd0d6c96 Report date format
Added report.X.dateformat which gives each report the possibility
to have a custom format for the due dates.
2010-01-18 03:45:49 +01:00
Federico Hernandez
4f70969306 Modification of the confirmation dialog for task config name value 2010-01-17 21:30:16 +01:00
Paul Beckingham
57e94585e8 Enhancement - Hooks
- Added Lua copyright notice to the version command.
- Added Lua copyright details to API.cpp, which is the only file that
  interacts with Lua.
- Added hook-type detection.
- Added a hook-type calling mechanism in Hooks.
- Implemented the post-start and pre-exit event triggers.
- Context::initialize now calls Hooks::initialize, which in turn calls
  API::initialize.  We have liftoff!
2010-01-17 14:24:40 -05:00
Paul Beckingham
c66d6b0500 Enhancement - Hooks
- Added bare bones autoconf changes to support Lua.
- Added API class from metatask.git.
- Added skeleton Hooks class.
- Added 'with_lua' helper script.
2010-01-17 01:12:28 -05:00
Paul Beckingham
31055360dc Merge branch '1.9.0' into hooks 2010-01-17 00:35:08 -05:00
Paul Beckingham
229a3d309c Feature - #296 Setting configuration variables in .taskrc
- Now supports 'task config name value', 'task config name ""', and
  'task config name' to directly modify the .taskrc file.
- Updated man page.
- Added unit tests.
- Modified existing config command to also display configuration
  variables that have no values.
2010-01-17 00:13:19 -05:00
Paul Beckingham
c82469fa2c Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-01-16 17:47:22 -05:00
Paul Beckingham
5a886f6e58 Unit Tests
- Now sorts the results of a glob, so that the results are in a
  consistent order on all platforms.
2010-01-16 17:46:32 -05:00
Paul Beckingham
abffaa184b Enhancement - Path integration
- Obsoleted util.cpp spit, slurp calls
2010-01-16 17:45:45 -05:00
Federico Hernandez
70a0cd670b Merge branch '1.9.0' of tasktools.org:task into 1.9.0
Conflicts:
	src/Context.cpp
2010-01-16 23:45:07 +01:00
Federico Hernandez
720f28c09c Clean up in Context.cpp 2010-01-16 23:37:37 +01:00
Paul Beckingham
a8f03679ed Demo - color
- Preparing a script for a movie demonstrating color.
2010-01-16 16:05:28 -05:00
Paul Beckingham
0b67dfa38c Review - Config defaults
- Pass 1 of the review, identifying variables that may need to be
  changed.
2010-01-16 14:58:50 -05:00
Paul Beckingham
e53ba8110b Enhancement - Path integration
- Implemented Path::operator (std::string) const, to provide an
  automatic cast to std::string for any Path, File or Directory.
- Made use of new cast in various code.
- Changed use of spaces in atoi () calls.
- Switched from std::string::data () to std::string::c_str () calls.
2010-01-16 14:42:36 -05:00
Paul Beckingham
a6875ced6e Copyright etc
- Added Federico Hernandez to the task copyright, based on the amount
  of work and commits to the project, in the areas of Date handling and
  the calendar report.
- Bumped Cory Donnelly up to Contributing Author for the large quantity
  of ideas, suggestions and testing.
2010-01-16 13:51:11 -05:00
Paul Beckingham
57cac49362 Documentation Update
- Added more Qs the FAQ.
2010-01-16 12:26:59 -05:00
Paul Beckingham
81acaa6ae0 Enhancement
- Eliminated all unlink calls.
2010-01-16 10:35:18 -05:00
Paul Beckingham
b596e96b43 Enhancement - Path, File, Directory integration
- Replaced all access calls.
- Replaced all stat calls.
- Obsoleted util.cpp isAbsoluteDirectory calls.
- Obsoleted util.cpp expandPath calls.
2010-01-16 10:27:31 -05:00
Paul Beckingham
8e47342a18 Unit Tests
- Modified config.t.cpp according to the recent Config.cpp changes.
2010-01-15 22:04:41 -05:00
Paul Beckingham
cb821c2a25 Config - defaults
- Implemented replacement Config::get* methods.
- Replaced all calls throughout the code, with the new methods which
  have no static values as defaults.
2010-01-15 20:55:06 -05:00
Paul Beckingham
0faf7fa8ee Config - defaults
- Config is now providing a default set of all configuration variables.
- The default set is used to both initialize a Config object, and to
  create a sample .taskrc.
2010-01-15 02:50:46 -05:00
Paul Beckingham
0002376f2a Color Themes
- Better names.
2010-01-14 23:44:58 -05:00
Paul Beckingham
f87b2ee636 Color Themes
- Created the four basic themes, with no contents yet.  TBD.
2010-01-14 23:43:00 -05:00
Federico Hernandez
3aae7b180b Feature - #283 verbosity of annotations
- the configuration variable annotation.details now controls the
  verbosity of the output of annotations.
2010-01-14 00:03:52 +01:00
Federico Hernandez
b001c2f40b Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2010-01-12 23:15:19 +01:00
Federico Hernandez
660d0cca3e Report date format
- added new reportdateformat to extend the formatting of due dates
  in the reports and "task info"
- added new conversion sequences a, A, b, B and Y to be used with
  reportdateformat
2010-01-12 23:12:22 +01:00
Paul Beckingham
db1a6601eb Merge branch '1.8.5' of tasktools.org:task into 1.8.5 2010-01-12 08:24:30 -05:00
Paul Beckingham
78778c2819 Packaging
- This is the structure that the OSX package requires.  Note that the
  task binary is 'represented' by an empty file.
- With more time, this could possibly be converted to a tree of symlinks,
  but I'm not sure whether PackageManager deals with them as expected.
2010-01-12 08:22:29 -05:00
Paul Beckingham
585020ef97 Documentation
- Added a few questions to the FAQ.
2010-01-12 08:16:06 -05:00
Paul Beckingham
e1f3f2355a Enhancement
- Added Path::is_absolute, and corresponding unit tests.
- Replaced expandPath and isAbsolutePath call in Config.cpp.
2010-01-12 01:30:59 -05:00
Paul Beckingham
c02cfd594c Path Integration
- Replaced calls to ::access
2010-01-12 01:18:55 -05:00
Paul Beckingham
5dbadda512 Build
- Removed duplicate entry.  Oops.
2010-01-12 01:16:59 -05:00
Paul Beckingham
c73376cb2f Build
- Removed obsolete files that will be replaced soon by the new OSX
  packaging currently on the 1.8.5 branch.
2010-01-12 01:06:29 -05:00
Paul Beckingham
0b5a105b9b Build
- Included the new scripts/vim/syntax/taskrc.vim file in the distribution
  (thanks to John Florian).
2010-01-12 00:58:55 -05:00
Federico Hernandez
e92fb9287a Man pages
- Bumped rest of man pages to same date as FAQ man page.
- Added name section to FAQ man page.
2010-01-10 21:42:34 +01:00
Paul Beckingham
875c5c1880 Build Error
- Fixed missing include.
2010-01-10 01:34:16 -05:00
Paul Beckingham
2b71317e09 Build Error
- Fixed build error on Ubuntu caused by using a Darwin-specific struct
  member.
2010-01-10 01:32:28 -05:00
Paul Beckingham
44aeea8e45 Hooks - starting...
- Tried to include an autoconf Lua detector.  Failed.  Waiting on mailing
  list response.
2010-01-10 01:11:38 -05:00
Paul Beckingham
f435eeed7a Documentation Update
- Changed the official code repo URL from github to tasktools.org.
  The github copy is going away.
- Added an FAQ about recreating a .taskrc, or creating a second one
  for comparison.
2010-01-09 21:30:23 -05:00
Paul Beckingham
a5cb041ef2 Code Reorganization
- Merged Path, File and Directory handling objects from metatask.git.
- Merged unit tests.
- These objects will replace a fair amount of code in task 1.9 and
  more in 2.0.
2010-01-09 17:48:32 -05:00
Paul Beckingham
bfdeee2cea Unit Tests - shell.t
- Began a set of unit tests for shell mode.  Needs work.
2010-01-09 15:17:44 -05:00
Paul Beckingham
414cdf8669 Documentation Update
- Added new 'task-faq' man page.
- Added references to the new man page in various places.
2010-01-09 11:01:06 -05:00
Paul Beckingham
3b52b75d2a Report - minimal
- Added a really minimal report.
2010-01-08 17:01:36 -05:00
Federico Hernandez
f56e1bef54 Minor cleanup. 2010-01-08 22:29:58 +01:00
Federico Hernandez
1b60c20bad Calendar coloring
- Now all due tasks are colorized.
- Setting due=0 now colorizes all due tasks in reports.
2010-01-08 16:49:18 +01:00
Federico Hernandez
7ef5233547 Calendar coloring
- Added 1 new color configuration variables to colorize weekend days
  in the calendar: 'calendar.color.weekend'.
- Changed the default colors in the calendar.
2010-01-08 16:21:27 +01:00
Federico Hernandez
d552b208dd Calendar coloring
- Added 3 new color configuration variables to colorize today, days with due tasks
  and days with overdue tasks in the calendar:
  'calendar.color.today', 'color.calendar.due' and 'calendar.calendar.overdue'
2010-01-08 12:23:26 +01:00
Federico Hernandez
6dd00f41e9 Calendar details
- added 2 new configuration variables 'calendar.details' and
   'calendar.details.report' that make it possible to display
   details of task with due date when doing 'task cal'
2010-01-08 00:15:00 +01:00
Paul Beckingham
a75e7978ab Color Command
- Added support for displaying color samples.  If you run the command
  'task color red on grey12' then task will show you a sample of this
  color, along with other examples.  This is helpful if you are trying
  to choose colors for auto colorization rules.
2010-01-03 12:35:53 -05:00
Paul Beckingham
6abc40ef46 Documentation Update
- Edited and improved the task tutorial, with mention of --, and tips
  on tricking task into allowing special arguments into the description.
2010-01-03 11:36:02 -05:00
Paul Beckingham
0ab2169c65 Documentation Update
- Added a task-tutorial man page mention to the help and version command.
- Corrected comment about attribute entity encoding/decoding.
2010-01-02 22:35:56 -05:00
Federico Hernandez
93067f3c3b Fixed floating point arithmetic when type casting.
See http://stackoverflow.com/questions/1989708/type-casting-with-printf-statements-under-mac-osx-and-linux
2010-01-01 23:58:15 +01:00
Federico Hernandez
8d8f7ddb40 Fixed 2 unit tests that behaved wrong at the end/beginning of a year. 2010-01-01 22:11:10 +01:00
Federico Hernandez
be75b4bf3a Fixed 2 unit tests that behaved wrong at the end/beginning of a year. 2010-01-01 22:05:08 +01:00
Paul Beckingham
3031cf8da9 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2009-12-31 13:02:03 -05:00
Paul Beckingham
db707d5e15 Feature - new field 'priority_long'
- The new 'priority_long' field can be shown in custom reports, and will
  display 'High' rather than the abbreviated 'H'.
- Unit tests.
2009-12-31 12:57:03 -05:00
Federico Hernandez
065384027e Added ChangeLog entry for new 'config' command. 2009-12-29 21:48:12 +01:00
Federico Hernandez
dca4772f33 New command config
- version now only displays the version number and copyright notice
- config displays the task configuration that version used to show
- configuration variable longversion is not longer needed
2009-12-29 02:46:16 +01:00
Federico Hernandez
48daf13d7f Copyright
- Updated the copyright notices to 2010, for the 1.9.0 release.
- added "unmaintained" comment to zsh completion script asking for
  contributions
2009-12-28 21:37:55 +01:00
Paul Beckingham
79113668cd Feature - color rules for partial project names
- The color.project.foo colorization rules now matches on partial
  project names (like foobar), matching the functionality of filters.
2009-12-27 13:46:55 -05:00
Paul Beckingham
167b9aa8eb Documentation Update
- Reorganized entries in ChangeLog.
- Added missing rc.name= feature description.
2009-12-27 13:43:50 -05:00
Paul Beckingham
9ce55bcf67 Copyright
- Updated the copyright notices to 2010, for the 1.9.0 release.
2009-12-27 12:39:42 -05:00
Paul Beckingham
6cfb913e45 Unit Tests - benchmark2.t
- Gathers timing for runs of the list report for 1, 10, 100 and 1000
  tasks.  This will create a history of data in the tinderbox runs
  for later analysis.
2009-12-27 10:14:45 -05:00
Paul Beckingham
5ef3bcc243 Unit Tests - benchmark2
- Fixed Timer class to use a fixed precision, that for some reason,
  does not work on Haiku.  Put a conditional compile around it for
  now - perhaps later Haiku alpha releases will change things?
- Added benchmark2.t, which enables high-resolution timers for a
  single 'list' command, with 10, 100 and 1000 task databases. Then
  it emits readily-found and parsed data for charts.
- Eliminated obsolete benchmark data for hardware I no longer own.
2009-12-26 19:44:52 -05:00
Paul Beckingham
f43e093515 Unit Tests - util.t
- Added unit tests to make sure formatSeconds is doing the right thing.
  It isn't, and it needs to change, but at least now we can see what is
  wrong with it.
2009-12-22 13:36:47 -05:00
Federico Hernandez
ecb4190e0b Added unknown OS clause for the version command output 2009-12-22 01:03:24 +01:00
Federico Hernandez
338e4dfbc7 basic.t
- check version number against configure.ac
- added test for _version command
2009-12-22 00:18:26 +01:00
Paul Beckingham
1046555c9c Unit Tests - abbreviation.t, basic.t
- Fixed broken unit tests that relied on the string 'ABSOLUTELY NO
  WARRANTY' being present in the output of the version command.  The
  tests now rely upon 'GNU General Public License' instead.
2009-12-20 10:51:51 -05:00
Paul Beckingham
b8377b7e5c Feature - version command
- Added FreeBSD as a recognized operating system.
2009-12-20 10:51:03 -05:00
Paul Beckingham
2a8acaf351 Feature - version command
- Rearranged output of the version command.
- Added build information (OS) and packages (ncurses ...).
2009-12-18 22:31:54 -05:00
Paul Beckingham
2ec5a315cb Feature - simple version report for scripts
- Added a simple _version command that displays only the version
  number and a newline.  This makes it easier for external task support
  scripts to determine which version of task is installed - easier than
  parsing the version command output.
2009-12-18 21:41:48 -05:00
Paul Beckingham
be86c52dc0 Bug Fix - typo
- Typo in message after prepend has finished.
2009-12-16 22:03:35 -05:00
Paul Beckingham
2cf25b7c35 Code Cleanup
- Used the shorter form of std::string::substr that defaults the second
  argument to std::string::npos.
2009-12-13 16:59:28 -05:00
Paul Beckingham
75e738a9c9 Unit Tests - list.t
- Added listIntersect and a Boolean listDiff implementation in main.h.
- Added a set of unit tests for the above.
2009-12-13 12:30:49 -05:00
Paul Beckingham
42981c746e Completion Script - zsh
- With P.C. Shyamshankar's blessing, updated the _task script for zsh
  by using the new task built-in _commands command to enumerate all
  supported commands.  This replaces code that forces task usage output,
  and parses it for commands.
- Note that _task for zsh lacks attribute completion.  We need a zsh
  developer to make this enhancement.
2009-12-13 10:03:59 -05:00
Paul Beckingham
5a66ac94ee Bug Fix - unit tests util.t
- Algorithm uses different numbers to represent a year in the same
  condition.  Bad.
2009-12-12 11:41:47 -05:00
Paul Beckingham
eaeca45eae Bug Fix - broken unit tests on Ubuntu
- Fixed util.cpp formatSeconds and formatSecondsCompact, that were using
  an algorithm that accentuated rounding errors.
- Fixed unit tests that were expecting wrong answers from the wrong
  algorithm above.
2009-12-12 11:30:20 -05:00
Paul Beckingham
37411c7521 Documentation Update - Config
- Updated the generated config file to include examples of the new
  report columns.
2009-12-11 20:44:44 -05:00
Paul Beckingham
4ea71c939a Enhancement - New columns for custom reports
- Added 'entry_time', 'start_time' and 'end_time' columns that include
  the time as well as the date.
2009-12-11 19:08:45 -05:00
John Florian
81ce844d79 Feature - #307 vim support for taskrc
- Added support for syntax highlighting of taskrc within vim.
2009-12-10 18:39:24 -05:00
Paul Beckingham
0780919c2e Feature - #352 rc file should support includes
- Added include file support to Config.cpp.
- Implemented isAbsolutePath helper.
- Added unit tests for isAbsolutePath.
- Fixed small bug in bug.bulk.t.
- Added TODO items to config.t.cpp.
2009-12-09 17:21:09 -05:00
Paul Beckingham
8d43a35ca4 Unit Tests - util.t
- Added unit tests for formatSeconds and formatSecondsCompact.
- Fixed small boundary but in formatSeconds.
2009-12-09 17:12:50 -05:00
Paul Beckingham
42c1b30c31 Feature - Config validation
- The 'version' command now complains about use of deprecated color names and
  duplicate entries.
- Unit tests verify duplicate detection.
- Unit tests verify deprecated color detection.
- Most validation code moved from command.cpp to Config.cpp.
2009-12-08 22:56:01 -05:00
Federico Hernandez
b032a00283 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2009-12-09 01:16:18 +01:00
Federico Hernandez
b684ded845 Bug #347 - Confirmation dialog is lowercase for "all"
- changed confirmation to be now "All" for multiple changes
- added unit tests for all answers to multiple changes
2009-12-09 01:15:31 +01:00
Federico Hernandez
780d9bb7e7 Bug #347 - Confirmation dialog is lowercase for "all"
- changed confirmation to be now "All" for multiple changes
- added unit tests for all answers to multiple changes
2009-12-09 01:11:14 +01:00
Paul Beckingham
7acef0c9fd Enhancement - related to, but not fixing bug #293
- Added new attribute modifiers 'word' and 'noword' which find the existence
  of whole words, or prove the non-existence of whole words.  If a task has
  the description "Pay the bill", then "description.word:the" will match, but
  "description.word:th" will not.  For partial word matches, there is still
  "description.contains:th".
- Added unit tests for the text.cpp functions.
- Added unit tests including the new modifiers in filters.
- Added unit tests to parse the new modifiers.
- Modified man page.
- Modified the Context::autoFilter processing to use the new modifiers for
  +tag and -tag filtering.
- Added a support email to an error message, while looking at the filter code.
- Added new modifiers to the help report.
- Modified a utf8.t unit test to include an alphanumeric tag, rather than a
  smiley face.
2009-12-07 01:35:47 -05:00
Paul Beckingham
d019126086 Documentation Update
- Included sample maximal taskrc for inclusion as the auto-generated
  .taskrc.  It will be complete, self-documenting, and nicely formatted.
2009-12-06 20:21:22 -05:00
Paul Beckingham
a7feed2ae9 Documentation Update - NEWS
- Cleared out 1.8 NEWS items, added 1.9 items.
- Mentioned 256 color support
- Mentioned Richard Querin's alternate line coloration feature
2009-12-06 13:41:47 -05:00
Paul Beckingham
64c643920f Feature - Special tags
- Implemented the 'nonag' tag that prevents nag messages for a task.
2009-12-06 11:54:23 -05:00
Paul Beckingham
2c5f590fed Feature - Special tags
- Implemented the 'nocolor' special tag.
2009-12-06 11:48:09 -05:00
Paul Beckingham
3003cdaf08 Code Cleanup
- Clarified autoComplete special case comment.
2009-12-06 11:40:19 -05:00
Paul Beckingham
5f353f800d Unit Tests - cal.t
- Fixed a broken fix (e7c8114dff) for
  the calendar command - previously if task could find no tasks with
  due dates, no calendar was displayed, and an error message shown.
  That broken fix was only on the 1.9.0 branch and never released.
  The correct behavior is to show a line of months.  This bug broke
  15 unit tests.
- Fixed minor problem in unit tests where the output was not captured,
  although this has no bearing on the results.
2009-12-06 11:30:51 -05:00
Federico Hernandez
f3d31834ee Merge branch 'master' into 1.9.0
due to release of 1.8.5

Conflicts:
	ChangeLog
	configure.ac
	doc/man/task-tutorial.5
	doc/man/task.1
	doc/man/taskrc.5
	src/Config.cpp
	src/rules.cpp
2009-12-06 04:30:56 +01:00
Federico Hernandez
28377502f6 Added SHA1 of taged release commit 2009-12-06 04:14:40 +01:00
Federico Hernandez
a6c7236ff3 Release date for 1.8.5 2009-12-06 01:49:05 +01:00
Paul Beckingham
204d287b20 Feature - #341 man pages
- Added feature #341 that makes explicit references to the task and taskrc
  man pages, both in the auto-generated .taskrc file and the version command
  output (thanks to Cory Donnelly).

Signed-off-by: Federico Hernandez <ultrafredde@gmail.com>
2009-12-05 22:49:30 +01:00
Paul Beckingham
6fc34eef42 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2009-12-05 13:43:47 -05:00
Paul Beckingham
e99c01c92c Enhancement - deprecated color
- Improved the warning about deprecated color usage to include actual
  examples from .taskrc.
2009-12-05 13:43:00 -05:00
Paul Beckingham
b3e3c36d50 Documentation Update
- Added missing ChangeLog entry for #310.
2009-12-05 12:46:29 -05:00
Paul Beckingham
e717345f20 Feature - #310 'task add' with external editor
- Simplified and make clearer and error message that complained about
  things that were beyond user control (thanks to John Florian).
(cherry picked from commit a2152628251c6d8c9bc840b8f36851f4ce680c99)

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2009-12-05 12:23:32 -05:00
Paul Beckingham
850135376d Feature - #341 man pages
- Added feature #341 that makes explicit references to the task and taskrc
  man pages, both in the auto-generated .taskrc file and the version command
  output (thanks to Cory Donnelly).
2009-12-05 11:24:05 -05:00
Paul Beckingham
5d0e6c3435 Feature - #336 prepend command
- Added feature #336 which gives task a 'prepend' command for symmetry
  with the 'append' command.
2009-12-04 22:47:44 -05:00
Federico Hernandez
3b354b6d47 Bug Fix - #332 output field "recur_ind" not valid?
- changed man page to include the correct fields
2009-12-02 21:41:20 +01:00
Paul Beckingham
2c0da35225 Bug Fix - #319 Removing tag from many tasks, incorrect change summary
- Fixed bug that caused task to not properly detect the removal of a
  tag when obtaining confirmation from the user fora bulk modification
  (thanks to Cory Donnelly).
2009-12-02 00:14:17 -05:00
Paul Beckingham
13955bc6ae Unit Tests - text.t
- Added more unit tests to cover the new split_minimal function.
2009-12-01 23:41:44 -05:00
Paul Beckingham
1d80a2ebdc Unit Tests - default.t
- The fix to bug #322 means the way default commands are specified
  is now a little different.  If the command "task rc:x" is run, the
  default command no longer needs to also include "rc:x".
2009-12-01 23:29:01 -05:00
Paul Beckingham
d4910f65eb Bug Fix - #332 output field "recur_ind" not valid?
- Fixed bug #332 where task complained that the 'recur_ind' custom report
  column was invalid.  It was misnamed in the documentation, which should
  have read 'recurrence_indicator'.  Also, the 'tag_indicator' column was
  not mentioned anywhere (thanks to T. Charles Yun).
- Added ChangeLog entry for the #333 fix.
2009-12-01 22:12:59 -05:00
Federico Hernandez
2b44d513e8 Added unit tests for bug fix #333 2009-12-02 00:28:34 +01:00
Federico Hernandez
7f11f1b560 Bug Fix - #333 duplicate command should display the ID of the created task
- Added missing "Created task" output to duplicate command (thanks to
  Cory Donnelly).
2009-12-01 23:00:40 +01:00
Paul Beckingham
b246fae889 Unit Tests - fixing broken tests
- The split tests are all broken after a recent change.  They need
  to be extended to accommodate the new split_minimal functions.
2009-11-29 22:41:55 -05:00
Federico Hernandez
8c5508de4b Merge branch '1.8.5' of tasktools.org:task into 1.8.5 2009-11-30 00:16:40 +01:00
Federico Hernandez
b3db2245fa Updated OS that task runs on 2009-11-30 00:16:10 +01:00
Paul Beckingham
00b246ce8a Bug Fix - shell mode
- Removed redundant messages when exiting shell mode.
2009-11-29 16:17:26 -05:00
Paul Beckingham
b94706c56e Bug Fix - #322 rc: override for shell command does not propagate
- Fixed bug #322 which failed to propagate rc overrides to shell commands.
- Context now properly records overrides to file and variables.
- The text.cpp:split (...) functions can now skip trivial split results.
2009-11-29 14:23:22 -05:00
Paul Beckingham
8d784da0ae Bug Fix = #317, sorting
- Fixed bug #317 which colored tasks in the 'completed' report according to
  due dates, which are no longer relevant to a completed task (thanks to
  Cory Donnelly).
- Fixed bug that was causing the 'completed' report to sort incorrectly.
2009-11-29 08:21:33 -05:00
Paul Beckingham
b5f65850f8 Bug Fix - #327 Deleting due date on recurring task wraps to 1969
- Task now prevents removal of either a due date or a recurrence
  from a recurring task.
2009-11-28 09:53:15 -05:00
Paul Beckingham
b7726bce21 Bug Fix - #329 task shell convert all characters to lowercase
- Fixed bug that inadvertently converted the entire command line to
  lower case in the shell, rather than just the command, for testing
  against the "quit" string (thanks to Juergen Daubert).
2009-11-26 09:41:47 -05:00
Paul Beckingham
d44e9363f0 Enhancement - better confirmation
- Added feature to allow the user to quit when asked to confirm multiple
  changes.  Now task asks "Proceed with change? (Yes/no/all/quit)".
2009-11-21 17:39:50 -05:00
Paul Beckingham
5e905742ad Bug Fix - #317, timesheet report
- Fixed bug #317 which colored tasks in the 'completed' report according to
  due dates, which are no longer relevant to a completed task (thanks to
  Cory Donnelly).
- Fixed bug that was causing the 'completed' report to sort incorrectly.
2009-11-18 20:29:45 -05:00
Paul Beckingham
549e700bc8 Bug Fix - timesheet
- The timesheet report was being sorted as though the 'end' date was
  not being considered a date, but simply a string.
2009-11-18 20:28:25 -05:00
Paul Beckingham
b2fc4969b9 Documentation Update
- Minor doc edits.
2009-11-18 20:27:54 -05:00
Federico Hernandez
e319359935 Merge branch 'master' into 1.9.0
Conflicts:
	AUTHORS
	ChangeLog
	configure.ac
	doc/man/task-tutorial.5
	doc/man/task.1
	doc/man/taskrc.5
2009-11-18 10:44:35 +01:00
Federico Hernandez
331b08055a Bumped version number to 1.8.5 2009-11-18 10:22:33 +01:00
Federico Hernandez
847a8b6d49 Added SHA1 of taged release commit 2009-11-18 09:56:14 +01:00
Paul Beckingham
3abce22f0c Bug Fix - color
- Fixed bug that failed to upgrade from 16- to 256-color mode when
  a color like "black on rgb003" was parsed.
2009-11-18 00:36:57 -05:00
Paul Beckingham
c090367eb8 Enhancement - warns on deprecated color use
- If a color is specified using the deprecated 'on_red' instead of
  'on red', generate a warning in the version report.  The version
  report is becoming a report where .taskrc sanity checks occur.
  Is this good?
2009-11-17 23:56:21 -05:00
Paul Beckingham
fff789a509 Bug Fix - #316 timesheet report oddly sorted
- Fixed bug #316 which caused the timesheet report to display an
  oddly sorted list.  Mistakenly used 'std::cout << ...' instead of
  'out << ...'
2009-11-17 22:55:29 -05:00
Paul Beckingham
e7c8114dff Bug Fix - calendar
- Fixed bug that showed a calendar for the year 2037 when 'task calendar due'
  was run, and there are no tasks with due dates.
2009-11-17 22:41:55 -05:00
Paul Beckingham
fbb217538e Code Cleanup
- Removed unnecessary use of the scope resolution operator.
2009-11-17 22:34:28 -05:00
Federico Hernandez
12c4983936 Release date for 1.8.4 2009-11-17 12:00:36 +01:00
Paul Beckingham
39d9f235de HACK - case-insensitive file system problem again. 2009-11-16 23:42:32 -05:00
Paul Beckingham
7aa0c3698a HACK - case-insensitive file system problem again. 2009-11-16 23:42:00 -05:00
Paul Beckingham
bc40ab63b3 Bug Fix - #312 Changing one task changes another
- Added a warning when modifying recurring tasks, that all instances of
  that task may be modified.  When task confirms a bulk edit the
  recurrence is again indicated (thanks to Cory Donnelly).
2009-11-16 23:24:47 -05:00
Paul Beckingham
6e673d2834 Bug Fix - #313 Edit command fails when data.location includes spaces
- Applied patch from Cory Donnelly.
2009-11-16 22:10:47 -05:00
Federico Hernandez
30c6dd0047 Added Joe to AUTHORS file 2009-11-13 23:32:40 +01:00
Paul Beckingham
64bc2a165a Bug fix - hang on cygwin when task updated.
- Fixed bug that caused a hang on cygwin, when a task with multiple
  annotations was edited (thanks to Joe Pulliam).
2009-11-09 22:35:51 -05:00
Paul Beckingham
5b96dbbce8 Bug Fix - wait date editing
- The "wait" date was not being properly formatted, as are all the other
  dates, in the "edit" command.  The result is that an epoch integer date
  was rendered, instead of something readable and in the preferred format.
2009-11-09 18:19:04 -05:00
Paul Beckingham
3214dc5d37 Merge branch '1.9.0' of tasktools.org:task into 1.9.0 2009-11-08 12:54:24 -05:00
Paul Beckingham
bb89e1a70f Unit Tests - annotate.t
- Fixed bug in annotate.t, where a custom report named 'r' was used
  in the unit tests.  This name had to be lengthened to 'rrr' to avoid
  conflict with the 'recurring' report.  This, in itself, is a different
  bug.
2009-11-08 12:51:57 -05:00
Federico Hernandez
a16122bbe9 Fixed regexp matching for colorcoded duedates in unit test 2009-11-06 23:03:47 +01:00
Federico Hernandez
57ef35441d Fixed bug in regexp matching of whitespace between month and year. 2009-11-05 21:37:47 +01:00
Federico Hernandez
77dd930574 Fixed bug in regexp matching of whitespace between month and year. 2009-11-05 21:36:46 +01:00
Paul Beckingham
e222090d1f Feature - default alias
- Added a default alias of "rm" as a synonym of "delete" (thanks to
  Ivo Jimenez).
2009-11-05 01:08:54 -05:00
Federico Hernandez
bf077c0f97 Merge branch 'master' (1.8.3) into 1.9.0
Conflicts which were fixed:
	ChangeLog
	configure.ac
	doc/man/task-tutorial.5
	doc/man/task.1
	doc/man/taskrc.5
	src/report.cpp
2009-10-22 22:55:01 +02:00
Federico Hernandez
f6842941f3 Bumped version number to 1.8.4 2009-10-22 22:40:18 +02:00
Federico Hernandez
e2e0851a69 Merge branch '1.8.3' 2009-10-22 22:27:21 +02:00
Federico Hernandez
1299fe468b Added sha1 for 1.8.3 to Changelog 2009-10-22 22:09:53 +02:00
Federico Hernandez
de50b2902c Merge branch '1.8.3' 2009-10-22 22:02:32 +02:00
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
d321ee242d Bug Fix - Layout on color report
- Fixed layout to include a \n between basic colors and effects.
2009-10-13 11:30:13 -04:00
Paul Beckingham
9f9c19d4ae Unit Tests - fix
- The unit tests for color were still linking against color.o, instead
  of the new Color.o.  Subtle, but wrong.
2009-10-11 16:17:26 -04:00
Paul Beckingham
179b51278f Bug Fix - Color endianness
- Fixed "bug" that caused "red on black" to be emitted as ^[[40;31m
  instead of the expected ^[[31;40m, which is what the unit tests are
  looking for.
2009-10-11 11:49:35 -04:00
Paul Beckingham
1bb907f76d Unit tests - rc.t
- Added tests for the new rc.name=value form, in addition to the
  existing rc.name:value form.
2009-10-10 11:18:38 -04:00
Paul Beckingham
99641e7b0b Enhancement - rc.name=value
- Task now supports both "rc.name:value" and "rc.name=value", not because
  this is generally a good idea, but because it is a very common mistake
  that we are all making, and shouldn't the software be forgiving in an
  unambiguous case like this?
2009-10-10 11:15:32 -04:00
Paul Beckingham
d7bded0d73 Enhancement - Color::colorize
- Made Color::colorize (const std::string&, const std::string&) static,
  so that it is now simple to colorize a string:

      std::cout << Color::colorize ("text", "red");

- Added sample foreground and background colors to the "color" command,
  and used the above shortcut to simplify handleOnColor.
2009-10-10 10:55:48 -04:00
Paul Beckingham
80a3196097 Bug Fix - color.alternate ignoring color/forcecolor overrides
- Fixed bug that caused the alternate line coloration to ignore whether
  color was enabled or not.  This (once again) added color codes to the
  shadow file.  This happens repeatedly - I think a unit test for this
  mistake is needed.
2009-10-06 10:12:07 -04:00
Paul Beckingham
010ef7cd07 Bug Fix - Color::Color (color_id, color_id)
- Removed temporary fix from task code to accommodate above bug.
2009-10-06 00:20:50 -04:00
Paul Beckingham
e5fce9ac08 Bug Fix - missing color
- There's something wrong with Color::Color (int, int), so this is a
  temporary fix.
2009-10-05 23:53:28 -04:00
Paul Beckingham
175dd3eb4f Feature - #292 Alternate line coloration
- Implemented alternate line coloration, triggered by the 'color.alternate'
  configuration variable.
2009-10-05 22:09:19 -04:00
Paul Beckingham
3cd45c3acd Feature - 256 color support
- Inverted the _COLOR_NOFG to be _COLOR_HASFG, for better readability and
  the added benefit of having newly constructed color with no specification
  having a value of 0.
2009-10-04 09:55:06 -04:00
Paul Beckingham
157b32e93b Documentation Update
- Tweaked the output of the "color" command.
2009-10-03 16:03:32 -04:00
Paul Beckingham
0b187f3ff8 Feature - 256-color support
- Improved blending algorithm.
- Added 16- to 256-color upgrade algorithm.
2009-09-27 22:58:40 -04: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
Paul Beckingham
bb2eb5f266 Feature - 256-color support
- Added precautionary bit reset for bold and bright in 256-color mode.
  Not sure if it is important, but it's cleaner.
2009-09-23 23:26:39 -04:00
Paul Beckingham
675df6487a Feature - 256-color support
- Added the colorN variants to the rgbRGB and grayN labels.
2009-09-23 23:21:46 -04:00
Paul Beckingham
b2b4fc6b54 Feature - 256-color support
- Implemented new "task color" command to showcase 256-color support.
2009-09-23 23:12:07 -04:00
Paul Beckingham
2074c8bb27 Feature - 256-color support
- Fixed bug that caused \033[m sequences to be emitted when no color
  is specified, in 16-color mode.
2009-09-22 21:36:36 -04:00
Paul Beckingham
ff3b7cf337 Feature - 256-color support
- Integrated new Color object into task.
- Debugging needed - the cyan, green, and yellow colors are mixed up!
2009-09-22 17:01:59 -04:00
Paul Beckingham
58730a48b3 Feature - 256-color support
- Eliminated old color implementation.
- Integration, debugging remains.
2009-09-22 16:42:46 -04:00
Paul Beckingham
37436071a0 Feature - 256-color support
- Added new Color object.
2009-09-22 12:10:13 -04:00
Paul Beckingham
de8a2c36a0 Feature - 256-color support
- Temporary reorganization of files to prepare for a case change in
  from color.* -> Color.* on a Mac.
2009-09-22 12:07:56 -04:00
Federico Hernandez
1d4c942675 Bumped version number to 1.9.0 2009-09-07 16:25:40 +02:00
Federico Hernandez
fba076a0d0 Bumped version number to 1.8.3 2009-09-07 16:13:37 +02:00
Federico Hernandez
09d7940dd3 Revert "Bumping version number to 1.8.3"
This reverts commit 00031dc1ab.
2009-09-07 16:04:24 +02:00
Federico Hernandez
00031dc1ab Bumping version number to 1.8.3 2009-09-07 15:52:51 +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
2f18c512e0 Began 1.7.0 work 2009-04-12 23:39:47 -04:00
324 changed files with 32383 additions and 13319 deletions

7
.gitignore vendored
View File

@@ -5,10 +5,15 @@ config.h.in
config.status
src/.deps
src/Makefile
*/task
*/*task
stamp-h1
Makefile
Makefile.in
configure
config.log
www.xls
src/tests/all.log
src/tests/*.data
*~
.*.swp
package-config/osx/binary/task

31
AUTHORS
View File

@@ -1,7 +1,11 @@
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)
Cory Donnelly (Contributing Author)
Contributing Authors:
The following submitted code, packages or analysis, and deserve special thanks:
Damian Glenny
Andy Lester
H. İbrahim Güngör
@@ -10,9 +14,16 @@ Contributing Authors:
Benjamin Tegarden
Chris Pride
Richard Querin
Federico Hernandez
T. Charles Yun
P.C. Shyamshankar
Johan Friis
Steven de Brouwer
Pietro Cerutti
Alexander Neumann
Emil Sköldberg
Johannes Schlatow
With thanks to:
Thanks to the following, who submitted detailed bug reports and excellent suggestions:
Eugene Kramer
Srijith K
Bruce Israel
@@ -21,7 +32,6 @@ With thanks to:
galvanizd
Stas Antons
Vincent Fleuranceau
T. Charles Yun
ArchiMark
Carlos Yoder
Russell Friesenhahn
@@ -29,4 +39,13 @@ With thanks to:
Eric Farris
Bruce Dillahunty
Askme Too
Mike Adonay
Thomas@BIC
Ian Mortimer
Zach Frazier
Ivo Jimenez
Joe Pulliam
Juergen Daubert
Rich Mintz
Seneca Cunningham

345
ChangeLog
View File

@@ -1,7 +1,339 @@
------ current release ---------------------------
1.6.0 (4/12/2009)
1.9.1 (5/22/2010)
+ Summary report bar colors can now be specified with color.summary.bar
and color.summary.background configuration variables.
+ The 'edit' command now conveniently fills in the current date for new
annotations.
+ Deleting a task no longer clobbers any recorded end date (thanks to
Seneca Cunningham).
+ The following holidays are now computed automatically and can be used
in the definitions for the calendar holidays:
Good Friday (goodfriday), Easter (easter), Easter monday
(eastermonday), Ascension (ascension), Pentecost (pentecost)
The date is configured with the given keyword.
+ The configure script is more portable (thanks to Emil Sköldberg).
+ Updated task-faq.5 man page.
+ Fixed bug #382 in which the annotate command didn't return an error
message when called without an ID.
+ Fixed bug #402 which failed compilation on Arch Linux (thanks to
Johannes Schlatow).
+ Fixed bug #401 that ignored the search.case.sensitive configuration
setting when filtering on project names (thanks to John Florian).
+ Fixed bug #395 that prevented the upgrade of a pending task to a
recurring task (thanks to T. Charles Yun).
------ old releases ------------------------------
1.9.0 (2/22/2010) dd758f8b33de110a633e2ff3ebdac73232b8ff44
+ Added feature #283 that makes it possible to control the verbosity
of the output of annotations.
+ Added feature #254 (#295) which gives task a second date format to be
used in the reports with more conversion sequences like weekday name
or weeknumber. The date format is set with variable "dateformat.report".
+ Added feature #292 that permits alternate line coloration in reports
(thanks to Richard Querin).
+ Added feature #307 that provides vim with syntax highlighting for .taskrc.
+ Added feature #336 which gives task a 'prepend' command for symmetry
with the 'append' command.
+ Added feature #341 that makes explicit references to the task and taskrc
man pages, both in the auto-generated .taskrc file and the version command
output (thanks to Cory Donnelly).
+ The 'delete' command is now aliased to 'rm' (thanks to Ivo Jimenez).
+ Added new attribute modifiers 'word' and 'noword' which find the existence
of whole words, or prove the non-existence of whole words. If a task has
the description "Pay the bill", then "description.word:the" will match, but
"description.word:th" will not. For partial word matches, there is still
"description.contains:th".
+ Added new 'config' command to display the configuration settings of task.
As a consequence 'version' now only shows the version number and legal
information.
+ The 'config' command now complains about use of deprecated color names in
your .taskrc file.
+ Added feature #296, that allows the 'config' command to modify your .taskrc
settings directly, with the command 'task config <name> <value>', or
'task config <name>' to remove the setting.
+ Task now supports nested .taskrc files using the "include /path" directive.
+ The 'entry', 'start' and 'end' columns now have equivalents that include the
time, and are called 'entry_time', 'start_time', and 'end_time', for use in
custom reports.
+ 2 new columns have been added to the reports: countdown and
countdown_compact. They show the days left until a task is due or how many
days a task has been overdue.
+ The new 'priority_long' field can be shown in custom reports, and will
display 'High' rather than the abbreviated 'H'.
+ Task now supports .taskrc command line overrides using rc.name:value and
the new rc.name=value to accommodate a frequent mistake.
+ The color rules for projects (color.project.foo) now matches on partial
project names, the same way as filters.
+ The color command now takes a color as an argument, and displays that color
with sample text.
+ Added 2 new configuration variables to display the details of tasks with due
dates when doing a 'task cal' for the corresponding months:
'calendar.details' and 'calendar.details.report'
+ Added 5 new color configuration variables to colorize today, days with due
tasks, days with overdue tasks, weekend days and week numbers in the
calendar:
'calendar.color.today', 'color.calendar.due', 'calendar.calendar.overdue',
'color.calendar.weekend'and 'color.calendar.weeknumber'.
+ Added support for holidays in the calendar by using calendar.holidays
and the corresponding holiday.X.name and holiday.X.date variables.
The default dateformat being YMD (20101224) set by dateformat.holiday.
+ The coloring of due tasks in reports can now be enabled for all tasks, and
not only the imminent ones, by setting the configuration variable due=0.
+ Tasks due on the current day ("today") can now have their own color setting
color.due.today and color.calendar.due.today.
+ Added a new 'task-faq' man page for common questions and answers.
+ Added a new 'task-color' man page detailing how to set up and use color in
task.
+ Added feature #176, which allows for configurable case-sensitivity for
keyword searches and substitutions (thanks to John Florian).
+ Task can now use an alternate tag indicator by setting the tag.indicator
configuration variable to something other than the default of +.
+ Task can now use an alternate active indicator by setting the
active.indicator configuration variable to something other than the default
of *.
+ Task can now use an alternate recurrence indicator by setting the
recurrence.indicator configuration variable to something other than the
default of R.
+ Added a new file, README.build, which provides assistance troubleshooting
build-related problems on different operating systems and environments.
+ Fixed bug #316 which caused the timesheet report to display an oddly sorted
list.
+ Fixed bug #317 which colored tasks in the 'completed' report according to
due dates, which are no longer relevant to a completed task (thanks to
Cory Donnelly).
+ Fixed bug #347 which used only a lowercase "all" to confirm multiple changes
instead of an uppercase "All" like the "Yes" answer.
+ Fixed bug that was causing the 'completed' report to sort incorrectly.
+ Fixed bug that showed a calendar for the year 2037 when 'task calendar due'
was run, and there are no tasks with due dates.
+ Fixed bug #360 which prevented certain modifications to recurring tasks
(thanks to John Florian).
+ Fixed bug #299 which prevented excluding multiple projects from a report,
by using "task list project.isnt:foo project.isnt:bar" (thanks to John
Florian).
+ Fixed bug #368 which caused recurring tasks 'until' dates to be rendered as
epoch numbers instead of dates (thanks to Cory Donnelly).
+ Fixed bug #369 which prevented the config command from setting quoted or
unquoted multi-word values (thanks to Richard Querin).
+ Fixed bug #370 which prevented the removal of a due date from a task,
mis-identifying the task as recurring just because it had a due date
(thanks to John Florian).
+ Fixed bug #371 which caused task to mis-apply certain color rules, like
color.alternate, which was (a) not applied first, and (b) not blended
with the other color rules (thanks to Richard Querin).
+ Fixed bug #372 which incorrectly mapped 16-color backgrounds into the
256-color space.
1.8.5 (12/05/2009) a6c7236ff34e5eee3ef1693b97cb1367e6e3c607
+ Added feature to allow the user to quit when asked to confirm multiple
changes. Now task asks "Proceed with change? (Yes/no/all/quit)".
+ Added feature #341 that makes explicit references to the task and taskrc
man pages, both in the auto-generated .taskrc file and the version command
output (thanks to Cory Donnelly).
+ Added feature - #310 that simplified and make clearer an error message
that complained about things that were beyond user control (thanks to
John Florian).
+ Fixed bug that was causing the 'completed' report to sort incorrectly.
+ Fixed bug #321 where all shell input was converted to lower case (thanks
to Juergen Daubert).
+ Fixed bug #327 that allowed the removal of a due date from a recurring
task.
+ Fixed bug #317 which colored tasks in the 'completed' report according
to due dates, which are no longer relevant to a completed task (thanks
to Cory Donnelly).
+ Fixed bug that was causing the 'completed' report to sort incorrectly.
+ Fixed bug #322 which failed to propagate rc overrides to shell commands.
+ Fixed redundant messages when exiting shell mode.
+ Fixed bug #333 which failed to display the ID of a duplicated task (thanks
to Cory Donnelly).
+ Fixed bug #332 where task complained that the 'recur_ind' custom report
column was invalid. It was misnamed in the documentation, which should
have read 'recurrence_indicator'. Also, the 'tag_indicator' column was
not mentioned anywhere (thanks to T. Charles Yun).
+ Fixed bug #319 that caused task to not properly detect the removal of a
tag when obtaining confirmation from the user fora bulk modification
(thanks to Cory Donnelly).
1.8.4 (11/17/2009) 12c4983936d27317df100f05da8244139dd06a3f
+ Fixed bug that caused wait: dates to not be properly rendered in a
readable and preferred format with the "edit" command.
+ Fixed bug that caused a hang on cygwin, when a task with multiple
annotations was edited (thanks to Joe Pulliam).
+ Fixed bug #314 where the edit command fails when data.location includes
directories containing spaces (thanks to Cory Donnelly).
+ Added a warning (issue #312) when modifying recurring tasks, that all
instances of that task may be modified. When task confirms a bulk edit
the recurrence is again indicated (thanks to Cory Donnelly).
1.8.3 (10/21/2009) bcdcbeeea0d92f21c3565aebfaf6332b959f4025
+ Added support for Haiku R1/alpha1
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
@@ -43,9 +375,7 @@
+ Substitutions can now be made global with /from/to/g and all occurrences
of "from" will be replaced with "to".
------ old releases ------------------------------
1.5.0 (3/15/2009)
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.
@@ -202,7 +532,8 @@
+ 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: 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.
@@ -240,7 +571,7 @@
+ Made unit tests compile and run again.
+ Removed tests from distibution.
0.9.6 (5/13/208)
0.9.6 (5/13/2008)
+ Corrected wrong include file in Table.cpp.
+ Replaced color management code.
+ Improved color rules code.
@@ -287,7 +618,7 @@
+ 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.

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,24 @@
SUBDIRS = src
EXTRA_DIST = DEVELOPERS
dist_man_MANS = doc/man/task.1 doc/man/taskrc.5 doc/man/task-tutorial.5 doc/man/task-faq.5 doc/man/task-color.5
#docdir = $(datadir)/doc/${PACKAGE}-${VERSION}
doc_DATA = AUTHORS ChangeLog COPYING NEWS README
EXTRA_DIST = INSTALL README.build
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 scripts/vim/syntax/taskrc.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
rcfiledir = $(docdir)/rc
dist_rcfile_DATA = doc/rc/holidays-US.rc doc/rc/holidays-SE.rc doc/rc/dark-16.theme doc/rc/dark-256.theme doc/rc/light-16.theme doc/rc/light-256.theme

View File

@@ -1,595 +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 = :
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/auto.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
depcomp install-sh missing
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)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = auto.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
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@
SUBDIRS = src
EXTRA_DIST = DEVELOPERS
all: auto.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
auto.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/auto.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status auto.h
$(srcdir)/auto.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f auto.h stamp-h1
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
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: tags-recursive $(HEADERS) $(SOURCES) auto.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) auto.h.in $(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: ctags-recursive $(HEADERS) $(SOURCES) auto.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) auto.h.in $(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)
$(am__remove_distdir)
test -d $(distdir) || mkdir $(distdir)
@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
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile auto.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
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-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am 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 installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# 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:

66
NEWS
View File

@@ -1,35 +1,55 @@
Welcome to Task 1.6.0.
New Features in task 1.9
- 256-color support
- Support for coloring alternate lines of output. Remember that old green
and white fan-fold printer paper?
- Supports nested .taskrc files with the new "include" statement"
- New columns that include the time as well as date
- New attribute modifiers
- New date format for reports
- Improved .taskrc validation
- Improved calendar report with custom coloring and optional task details output
- Holidays are now supported in the calendar report
- Ability to use multiple, similar filter terms, like:
task list project.not:foo project.not:bar
- Ability to do case-sensitive or case-insensitive search for keywords, and
substitutions in the description and annotations.
- Task is now part of Debian
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
- Fedora Core 10
- Ubuntu 7 Feisty Fawn
- Ubuntu 8 Hardy Heron
- Ubuntu 8.10 Intrepid Ibex
- Ubuntu 9.04 Jaunty Jackalope (beta)
- Solaris 10
- Cygwin 1.5.25-14
* OS X 10.6 Snow Leopard and 10.5 Leopard
* Fedora 12 Constantine and 11 Leonidas
* Ubuntu 9.10 Karmic Koala and 9.04 Jaunty Jackalope
* Debian Sid
* Slackware 12.2
* Arch Linux
* Gentoo Linux
* SliTaz Linux
* CRUX Linux
* Solaris 10 and 8
* OpenBSD 4.5
* FreeBSD
* Cygwin 1.7 and 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.
---

56
README
View File

@@ -1,51 +1,23 @@
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:
Task is scope-limited to GTD functionality only.
http://taskwarrior.org
You may want to 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
Your contributions are especially welcome. Whether it comes in the form of
code patches, ideas, discussion, bug reports, encouragement or criticism, your
input is needed.
or the new improved one:
Please send your support questions and code patches to:
http://www.youtube.com/watch?v=D2Kn4DMOVSw
support@taskwarrior.org
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 online tutorial file are the quickest way for you to make that
decision. The online tutorial 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.
---

98
README.build Normal file
View File

@@ -0,0 +1,98 @@
Task Build Notes
----------------
Task 1.9 has dependencies that are detected by the configure program in almost
all cases, but there are situations and operating systems that mean you will
need to offer configure a little help.
If task will not build on your system, first take a look at the Operating System
notes below. If this doesn't help, then go to the Troubleshooting section,
which includes instructions on how to contact us for help.
Operating System Notes
----------------------
Cygwin 1.7
Building task on Cygwin 1.7 requires a configure option:
./configure --with-ncurses-inc=/usr/include/ncurses
This is because the ncurses include files are in a different location to
Cygwin 1.5.
Haiku Alpha/R1
Task must be built with gcc version 4.x, so make sure you run:
$ setgcc gcc4
To switch from gcc 2.95 to gcc 4.x.
Troubleshooting
---------------
In most cases, it is sufficient to run the configure program like this:
$ ./configure
Configure will run and locate all the necessary pieces for the build, and create
a Makefile. There may be errors and warnings when running configure, or there
may be compiler errors and warnings when running 'make'. Sometimes you will run
configure with no reported problems, and the build will fail later. This is
almost always because configure is mistaken about some assumption.
The configure program can accept several options that help with its ability to
locate and use the ncurses library. They are:
--with-ncurses
This option tells configure that no matter what it thinks, ncurses is
definitely on this system and should be enabled. If needed, this option
probable needs to be accompanied by the next two options.
--with-ncurses-inc=/usr/include
If configure cannot find ncurses header files, this option will tell it
exactly where to look. The path specified in this example is the default,
so that probably won't help you. The path should be the directory in which
the file 'ncurses.h' resides. Here are some possible values to try:
/usr/include (the default shown above)
/usr/include/ncurses
/usr/local/include
/usr/local/include/ncurses
This should cover most systems, but new variations keeps cropping up.
--with-ncurses-lib=/usr/lib
If configure cannot find the ncurses library, this option will tell it
exactly where to look. The path specified in this example is the default,
so that probably won't help you. The path should be the directory in which
the file 'libncurses.a' (or your system's equivalent) resides. Here are
some possible values to try:
/usr/lib
/usr/local/lib
This should cover most systems, but new variations keeps cropping up.
--without-ncurses
This disables ncurses support in task, and should really be used as a last
resort. We know of no systems where this is needed.
If trying these options does not succeed, please send the contents of the
'config.log' files to support@taskwarrior.org, or post a message in the support
forums at taskwarrior.org along with the information.
If configure runs, but task does not build, when ideally you would send both the
contents of config.log, and a transcript from the build, which is not written to
a file, and must be captured from the terminal.
---

View File

@@ -1,281 +0,0 @@
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

@@ -1,51 +0,0 @@
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
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 scope-limited to GTD functionality only.
You may want to watch the old task movie on YouTube:
http://www.youtube.com/watch?v=l68LCl6BYvs
or the new improved one:
http://www.youtube.com/watch?v=D2Kn4DMOVSw
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 online tutorial file are the quickest way for you to make that
decision. The online tutorial 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.

View File

@@ -2,55 +2,179 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(task, 1.6.0, bugs@beckingham.net)
AC_INIT(task, 1.9.1, 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="yes"
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_HEADER([auto.h])
# Checks for programs.
# Source type.
AC_PROG_CXX
AC_PROG_CC
AC_LANG(C++)
AC_SUBST(CFLAGS)
# Checks for libraries.
AC_CHECK_LIB(ncurses,initscr)
# Local copies for modification and later AC_SUBST.
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)
if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -Wall -pedantic -ggdb3 -DDEBUG"
CXXFLAGS="$CXXFLAGS -Wall -pedantic -ggdb3 -DDEBUG"
AC_MSG_RESULT(yes)
else
CFLAGS="$CFLAGS -Wall -pedantic -O3"
CXXFLAGS="$CXXFLAGS -Wall -pedantic -O3"
AC_MSG_RESULT(no)
fi
# Check for OS.
OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'|cut -c 1-5`
if test "$OS" = "sunos"; then
AC_MSG_NOTICE([OS Solaris detected])
AC_DEFINE([SOLARIS], [], [Compiling on Solaris])
elif test "$OS" = "darwi"; then
AC_MSG_NOTICE([OS Darwin detected])
AC_DEFINE([DARWIN], [], [Compiling on Darwin])
elif test "$OS" = "cygwi"; then
AC_MSG_NOTICE([OS Cygwin detected])
AC_DEFINE([CYGWIN], [], [Compiling on Cygwin])
elif test "$OS" = "openb"; then
AC_MSG_NOTICE([OS OpenBSD detected])
AC_DEFINE([OPENBSD], [], [Compiling on OpenBSD])
elif test "$OS" = "haiku"; then
AC_MSG_NOTICE([OS Haiku detected])
AC_DEFINE([HAIKU], [], [Compiling on Haiku])
elif test "$OS" = "freeb"; then
AC_MSG_NOTICE([OS FreeBSD detected])
AC_DEFINE([FREEBSD], [], [Compiling on FreeBSD])
elif test "$OS" = "linux"; then
AC_MSG_NOTICE([OS Linux detected])
AC_DEFINE([LINUX], [], [Compiling on Linux])
else
AC_MSG_NOTICE([OS not detected])
AC_DEFINE([UNKNOWN], [], [Compiling on Unknown])
fi
# ncurses enabled by default.
AC_ARG_WITH([ncurses],
[AS_HELP_STRING([--without-ncurses], [disable support for ncurses])],
[with_ncurses=no],
[with_ncurses=yes])
AC_ARG_WITH([ncurses-inc],
[AS_HELP_STRING ([--with-ncurses-inc=DIR], [ncurses include files are in DIR])],
[ncurses_inc=$withval],
[ncurses_inc=''])
AC_ARG_WITH([ncurses-lib],
[AS_HELP_STRING ([--with-ncurses-lib=DIR], [ncurses lib files are in DIR])],
[ncurses_lib=$withval],
[ncurses_lib=''])
if test "x$with_ncurses" = "xyes" ; then
AC_DEFINE([HAVE_LIBNCURSES], [1], [Defined if you have libncurses])
if test -n "$ncurses_inc"; then
CFLAGS="$CFLAGS -I$ncurses_inc"
CXXFLAGS="$CXXFLAGS -I$ncurses_inc"
fi
if test -n "$ncurses_lib"; then
LDFLAGS="$LDFLAGS -L$ncurses_lib"
fi
AC_CHECK_LIB([ncurses],[main])
fi
# Readline enabled by default.
#AC_ARG_WITH([readline],
# [AS_HELP_STRING([--without-readline], [disable support for readline])],
# [with_readline=no],
# [with_readline=yes])
#
#AC_ARG_WITH([readline-inc],
# [AS_HELP_STRING ([--with-readline-inc=DIR], [readline include files are in DIR])],
# [readline_inc=$withval],
# [readline_inc=''])
#
#AC_ARG_WITH([readline-lib],
# [AS_HELP_STRING ([--with-readline-lib=DIR], [readline lib files are in DIR])],
# [readline_lib=$withval],
# [readline_lib=''])
#
#if test "x$with_readline" = "xyes" ; then
# AC_DEFINE([HAVE_LIBREADLINE], [1], [Defined if you have libreadline])
# if test -n "$readline_inc"; then
# CFLAGS="$CFLAGS -I$readline_inc"
# CXXFLAGS="$CXXFLAGS -I$readline_inc"
# fi
#
# if test -n "$readline_lib"; then
# LDFLAGS="$LDFLAGS -L$readline_lib"
# fi
#
# AC_CHECK_LIB([readline],[main])
#fi
# Lua disabled by default.
AC_ARG_WITH([lua],
[AS_HELP_STRING([--with-lua], [enable support for lua])],
[with_lua=yes],
[with_lua=no])
AC_ARG_WITH([lua-inc],
[AS_HELP_STRING ([--with-lua-inc=DIR], [lua include files are in DIR])],
[lua_inc=$withval],
[lua_inc=''])
AC_ARG_WITH([lua-lib],
[AS_HELP_STRING ([--with-lua-lib=DIR], [lua lib files are in DIR])],
[lua_lib=$withval],
[lua_lib=''])
if test "x$with_lua" = "xyes" ; then
AC_DEFINE([HAVE_LIBLUA], [1], [Defined if you have liblua])
if test -n "$lua_inc"; then
CFLAGS="$CFLAGS -I$lua_inc"
CXXFLAGS="$CXXFLAGS -I$lua_inc"
fi
if test -n "$lua_lib"; then
LDFLAGS="$LDFLAGS -L$lua_lib"
fi
AC_CHECK_LIB([lua],[main])
fi
# Allow the changes above to take effect.
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)
# Now the smaller details.
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADER([auto.h])
# 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([sstream string vector map])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
@@ -59,15 +183,19 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# Checks for library functions.
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(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])])
# Generate the Makefiles.
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
# End.

274
doc/man/task-color.5 Normal file
View File

@@ -0,0 +1,274 @@
.TH task-color 5 2010-05-22 "task 1.9.1" "User Manuals"
.SH NAME
task-color \- A color tutorial for the task(1) command line todo manager.
.SH SETUP
The first thing you need is a terminal program that supports color. All
terminal programs support color, but only a few support lots of colors. First
tell your terminal program to use color by specifying the TERM environment
variable like this:
TERM=xterm-color
In this example, xterm-color is used - a common value, and one that doesn't
require that you use xterm. This works for most setups. This setting belongs
in your shell profile (~/.bash_profile, ~/.bashrc, ~/.cshrc etc, depending on
which shell you use). If this is a new setting, you will need to either run
that profile script, or close and reopen the terminal window (which does the
same thing).
Now tell task that you want to use color. This is the default for task, so
the following step may be unnecessary.
$ task config color on
This command will make sure there is an entry in your ~/.taskrc file that looks
like:
color=on
Now task is ready.
.SH AUTOMATIC MONOCHROME
It should be mentioned that task is aware of whether it's output is going to a
terminal, or to a file or through a pipe. When task output goes to a terminal,
color is desirable, but consider the following command:
$ task list > file.txt
Do we really want all those color control codes in the file? Task assumes that
you do not, and temporarily sets color to 'off' while generating the output.
This explains the output from the following command:
$ task config | grep '^color '
color off
it always returns 'off', no matter what the setting.
The reason is that the task output gets piped into grep, and the color is
disabled. If you wanted those color codes, you can override this behavior by
setting the _forcecolor variable to on, like this:
$ task config _forcecolor on
$ task config | grep '^color '
color on
or by temporarily overriding it like this:
$ task rc._forcecolor=on config | grep '^color '
color on
.SH AVAILABLE COLORS
Task has a 'color' command that will show all the colors it is capable of
displaying. Try this:
$ task color
The output cannot be replicated here in a man page, but you should see a set of
color samples. How many you see depends on your terminal program's ability to
render them.
You should at least see the Basic colors and Effects - if you do, then you have
16-color support. If your terminal supports 256 colors, you'll know it!
.SH 16-COLOR SUPPORT
The basic color support is provided through named colors:
black, red, blue, green, magenta, cyan, yellow, white
Foreground color (for text) is simply specified as one of the above colors, or
not specified at all to use the default terminal text color.
Background color is specified by using the word 'on', and one of the above
colors. Some examples:
green # green text, default background color
green on yellow # green text, yellow background
on yellow # default text color, yellow background
These colors can be modified further, by making the foreground bold, or by
making the background bright. Some examples:
bold green
bold white on bright red
on bright cyan
The order of the words is not important, so the following are equivalent:
bold green
green bold
But the 'on' is important - colors before the 'on' are foreground, and colors
after 'on' are background.
There is an additional 'underline' attribute that may be used:
underline bright red on black
Task has a command that helps you visualize these color combinations. Try this:
$ task color underline bright red on black
You can use this command to see how the various color combinations work. You
will also see some sample colors displayed, like the ones above, in addition to
the sample requested.
Some combinations look very nice, some look terrible. Different terminal
programs do implement slightly different versions of 'red', for example, so you
may see some unwanted variation due to the program. The brightness of your
display is also a factor.
.SH 256-COLOR SUPPORT
Using 256 colors follows the same form, but the names are different, and some
colors can be referenced in different ways. First there is by color ordinal,
which is like this:
color0
color1
color2
...
color255
This gives you access to all 256 colors, but doesn't help you much. This range
is a combination of 8 basic colors (color0 - color7), then 8 brighter variations
(color8 - color15). Then a block of 216 colors (color16 - color231). Then a
block of 24 gray colors (color232 - color255).
The large block of 216 colors (6x6x6 = 216) represents a color cube, which can
be addressed via RGB values from 0 to 5 for each component color. A value of 0
means none of this component color, and a value of 5 means the most intense
component color. For example, a bright red is specified as:
rgb500
And a darker red would be:
rgb300
Note that the three digits represent the three component values, so in this
example the 5, 0 and 0 represent red=5, green=0, blue=0. Combining intense red
with no green and no blue yields red. Similarly, blue and green are:
rgb005
rgb050
Another example - bright yellow - is a mix of bright red and bright green, but
no blue component, so bright yellow is addressed as:
rgb550
A soft pink would be addressed as:
rgb515
See if you agree, by running:
$ task color black on rgb515
You may notice that the large color block is represented as 6 squares. All
colors in the first square have a red value of 0. All colors in the 6th square
have a red value of 5. Within each square, blue ranges from 0 to 5 left to
right, and within each square green ranges from 0 to 5, top to bottom. This
scheme takes some getting used to.
The block of 24 gray colors can also be accessed as gray0 - gray23, in a
continuous ramp from black to white.
.SH MIXING 16- AND 256-COLORS
If you specify 16-colors, and view on a 256-color terminal, no problem. If you
try the reverse, specifying 256-colors and viewing on a 16-color terminal, you
will be disappointed, perhaps even appalled.
There is some limited color mapping - for example, if you were to specify this
combination:
red on gray3
you are mixing a 16-color and 256-color specification. Task will map red to
color1, and proceed. Note that red and color1 are not quite the same.
Note also that there is no bold or bright attributes when dealing with 256
colors, but there is still underline available.
.SH RULES
Task supports colorization rules. These are configuration values that specify
a color, and the conditions under which that color is used. By example, let's
add a few tasks:
$ task add project:Home priority:H pay the bills (1)
$ task add project:Home clean the rug (2)
$ task add project:Garden clean out the garage (3)
We can add a color rule that uses a blue background for all tasks in the Home
project:
$ task config color.project.Home on blue
We use quotes around "on blue" because there are two words, but they represent
one value in the .taskrc file. Now suppose we which to use a bold yellow text
color for all cleaning work:
$ task config color.keyword.clean bold yellow
Now what happens to task 2, which belongs to project Home (blue background), and
is also a cleaning task (bold yellow foreground)? The colors are combined, and
the task is shown as "bold yellow on blue".
Color rules can be applied by project and description keyword, as shown, and
also by priority (or lack of priority), by active status, by being due or
overdue, by being tagged, or having a specific tag (perhaps the most useful
rule) or by being a recurring task.
It is possible to create a very colorful mix of rules. With 256-color support,
those colors can be made subtle, and complementary, but without care, this can
be a visual mess. Beware!
.SH THEMES
Task supports themes. What this really means is that with the ability to
include other files into the .taskrc file, different sets of color rules can
be included.
To get a good idea of what a color theme looks like, try adding this entry to
your .taskrc file:
include /usr/local/share/doc/task/themes/dark-256.theme
Better yet, create your own, and share it.
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
.br
Copyright (C) 2006 \- 2010 P. Beckingham
This man page was originally written by Paul Beckingham.
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),
.BR task-faq(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
<git://tasktools.org/task.git/>
.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>

197
doc/man/task-faq.5 Normal file
View File

@@ -0,0 +1,197 @@
.TH task-faq 5 2010-05-22 "task 1.9.1" "User Manuals"
.SH NAME
task-faq \- A FAQ 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 commands that allow you to do various things with it.
.SH WELCOME
Welcome to the task FAQ. If you have would like to see a question answered
here, please send us a note at <support@taskwarrior.org>.
.TP
.B Q: Where does task store the data?
By default, task creates a .taskrc file in your home directory and populates it
with defaults. Task also creates a .task directory in your home directory and
puts data files there.
.TP
.B Q: Can I edit that data?
Of course you can. It is a simple text file, and looks somewhat like the JSON
format, and if you are careful not to break the format, there is no reason not
to edit it. But task provides a rich command set to do that manipulation for
you, so it is probably best to leave those files alone.
.TP
.B Q: How do I restore my .taskrc file to defaults?
If you delete (or rename) your .taskrc file, task will offer to create a default
one for you. Another way to do this is with the command:
$ task rc:new-file version
Task will create 'new-file' if it doesn't already exist. Note that this is a
good way to learn about new configuration settings, if your .taskrc file was
created by an older version of task.
.TP
.B Q: Do I need to back up my task data?
Yes. You should back up your ~/.task directory, and probably your ~/.taskrc
file too.
.TP
.B Q: Can I share my tasks between different machines?
Yes, you can. Most people have success with a DropBox - a free and secure file
synching tool. Simply configure task to store it's data in a dropbox folder, by
modifying the:
data.location=...
configuration variable. Check out DropBox at http://www.dropbox.com.
.TP
.B Q: The undo.data file gets very large - do I need it?
You need it if you want the undo capability. But if it gets large, you can
certainly truncate it to save space, just be careful to delete lines from the
top of the file, up to and including a separator '---'. The simplest way is to
simply delete the undo.data file. Note that it does not slow down task, because
task never reads it until you want to undo. Otherwise task only appends to the
file.
.TP
.B Q: How do I know whether my terminal support 256 colors?
You will need to make sure your TERM environment variable is set to xterm-color,
otherwise the easiest way is to just try it! With task 1.9 or later, you simply
run
$ task color
and a full color palette is displayed. If you see only 8 or 16 colors, perhaps
with those colors repeated, then your terminal does not support 256 colors.
See the task-color(5) man page for more details.
.TP
.B Q: How do I make use of all these colors?
See the task-color(5) man page for an in-depth explanation of the task color
rules.
.TP
.B Q: How can I make task put the command in the terminal window title?
You cannot. But you can make the shell do it, and you can make the shell
call the task program. Here is a Bash script that does this:
#! /bin/bash
printf "\\033]0;task $*\a"
/usr/local/bin/task $*
You just need to run the script, and let the script run task. Here is a Bash
function that does the same thing:
t ()
{
printf "\\033]0;task $*\a"
/usr/local/bin/task $*
}
.TP
.B Q: Task searches in a case-sensitive fashion - can I change that?
You can. Just set the following value in your .taskrc file:
search.case.sensitive=no
This will affect searching for keywords:
$ task list Document
task will perform a caseless search in the description and any annotations for
the keyword 'Document'. It also affects description and annotation
substitutions:
$ task 1 /teh/the/
The pattern on the left will now be a caseless search term.
.TP
.B Q: Why do the task ID numbers change?
Task does this to always show you the smallest numbers it can. The idea is that
if your tasks are numbered 1 - 33, for example, those are easy to type in. If
instead task kept a rolling sequence number, after a while your tasks might be
numbered 481 - 513, which makes it more likely to enter one incorrectly, because
there are more digits.
When you run a report (such as "list"), task assigns the numbers before it
displays them. For example, you can do this:
$ task list
$ task do 12
$ task add Pay the rent
$ task delete 31
Those id numbers are then good until the next report is run. This is because
task performs a garbage-collect operation on the pending tasks file when a
report is run, which moves the deleted and completed tasks from the pending.data
file to the completed.data file. This keeps the pending tasks file small, and
therefore keeps task fast. The completed data file is the one that grows
unbounded with use, but that one isn't accessed as much, so it doesn't matter as
much. So in all, the ID number resequencing is about efficiency.
.TP
.B Q: How do I list tasks that are either priority 'H' or 'M', but not 'L'?
Task's filters are all combined with and implicit logical AND operator, so if
you were to try this:
$ task list priority:H priority:M
There would be no results, because the priority could not simultaneously be 'H'
AND 'M'. What is required is some way to use OR instead of an AND operator. The
solution is to invert the filter in this way:
$ task list priority.not:L priority.any:
This filter states that the priority must not be 'L', AND there must be a
priority assigned. This filter then properly lists tasks that are 'H' or 'M',
because the two logical restrictions are not mutually exclusive as in the
original filter.
Some of you may be familiar with DeMorgan's laws of formal logic that relate
the AND and OR operators in terms of each other via negation, which can be used
to construct task filters.
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
.br
Copyright (C) 2006 \- 2010 P. Beckingham
This man page was originally written by P. Beckingham.
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),
.BR task-tutorial(5)
.BR task-color(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
<git://tasktools.org/task.git/>
.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>

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

@@ -0,0 +1,398 @@
.TH task-tutorial 5 2010-05-22 "task 1.9.1" "User Manuals"
.SH NAME
task-tutorial \- A tutorial for the task(1) command line todo manager.
.SH NOTE
Please note that this tutorial was written for task 1.7.0. Though it is still
accurate on the general usage of task, it might not longer be 100% correct in
all details. A new tutorial for task is planned for task 2.0.0.
.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 commands 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
That's how easy managing your task list can be. But now consider learning 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
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 suppress the confirmation, edit
your .taskrc file and change the line:
.br
.RS
confirmation=yes
.RE
.br
to have a value of "no". If the entry is not there, then add it.
While the use of projects and priorities are not essential, they can be very
useful when the list of tasks grows large. Let's assign projects 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 and
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 sequence of those arguments is not important, so you could have entered the
following command instead:
.br
.RS
$ task project:Wedding add Book plane priority:H ticket
.RE
This is because task knows what attributes look like (name:value), knows what
commands it supports (add, ...), and just assumes the rest is part of the
description. Incidentally, if you wanted 'priority:H' to be part of your task
description, you need to fool task into ignoring it as an attribute. That can
be done in two ways:
.br
.RS
$ task add "quoting makes task consider priority:H part of one big argument"
$ task add -- the hyphens make task treat everything after it as description
.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
Note that due tasks may be colored to highlight the importance. See the
task-color(5) man page for full details.
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 \- 2010 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),
.BR task-faq(5)
.BR task-color(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
<git://tasktools.org/task.git/>
.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>

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

@@ -0,0 +1,499 @@
.TH task 1 2010-05-22 "task 1.9.1" "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 information to an existing task.
.TP
.B prepend [tags] [attrs] description
Prepends 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 [sample]
Displays all possible colors, or a sample.
.TP
.B version
Shows the task version number
.TP
.B config [name [value | '']]
Shows the current settings in the task configuration file. Also supports
directly modifying the .taskrc file. This command either modifies
the 'name' setting with a new value of 'value', or adds a new entry that
is equivalent to 'name=value':
task config name value
This command sets a blank value. This has the effect of suppressing any
default value:
task config name ''
Finally, this command removes any 'name=...' entry from the .taskrc file:
task config name
.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 minimal [tags] [attrs] [description]
Provides a minimal listing of tasks with specified criteria.
.TP
.B ls [tags] [attrs] [description]
Provides a short 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)
.br
.B word
.br
.B noword
.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 \- 2010 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),
.BR task-faq(5)
.BR task-color(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
<git://tasktools.org/task.git/>
.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>

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

@@ -0,0 +1,802 @@
.TH taskrc 5 2010-05-22 "task 1.9.1" "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.
Note that task is flexible about the values used to represent Boolean items.
You can use "on", "yes", "y", "1", "true", "t", "+", "enabled". Anything else
means "off".
.SH EDITING
You can edit your .taskrc file by hand if you wish, or you can use the 'config'
command. To permanently set a value in your .taskrc file, use this command:
.RS
$ task config nag "You have higher priority tasks!"
.RE
To delete an entry, use this command:
.RS
$ task config nag
.RE
Task will then use the default value. To explicitly set a value to blank, and
therefore avoid using the default value, use this command:
.RS
$ task config nag ""
.RE
Task will also display all your settings with this command:
.RS
$ task config
.RE
and in addition, will also perform a check of all the values in the file,
warning you of anything it finds amiss.
.SH NESTING CONFIGURATION FILES
The .taskrc can include other files containing configuration settings by using the
.B include
statement:
.RS
include <path/to/the/configuration/file/to/be/included>
.RE
By using include files you can divide your main configuration file into several ones containing just the relevant configuration data like colors, etc.
.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
Note that you can use the
.B ~
shell meta character, which will be properly expanded.
.TP
.B locking=on
Determines whether task uses file locking when accessing the pending.data and
completed.data files. Defaults to "on". Solaris users who store the task data
files on an NFS mount may need to set locking to "off". Note that there is
danger in setting this value to "off" - another program (or another instance of
task) may write to the task.pending file at the same time.
.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. The default value is "yes".
.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 annotations=full
.TP
.B report.X.annotations=full
Controls the display of annotations in reports. Defaults to full - all
annotations are displayed. Set to "sparse" only the last (newest) annotation
is displayed and if there are more than one present for a task a "+" sign is
added to the description. Set to "none" the output of annotations is disabled
and a "+" sign will be added if there are any annotations present. The default
value is "full".
.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".
This is useful for preventing large-scale unintended changes.
.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
started or 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. It is a gentle
reminder that you are contradicting your own priority settings.
.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. The
default value is "no".
.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. The default
value is "no".
.TP
.B search.case.sensitive=yes
May be yes or no, and determines whether keyword lookup and substitutions on the
description and annotations are done in a case sensitive way. Defaults to yes.
.TP
.B _forcecolor=no
Task shuts off color automatically when the output is not sent directly to a
a TTY. For example, this command:
.RS
.RS
$ task list > file
.RE
will not use any color. To override this, use:
.RS
$ task rc._forcecolor=yes list > file
.RE
.RE
.TP
.B blanklines=yes
Turning this value off causes task to generate a more vertically compact output.
.TP
.B shell.prompt=task>
The task shell command uses this value as a prompt. You can change it to any
string you like.
.TP
.B active.indicator=*
The character or string to show in the active column. Defaults to *.
.TP
.B tag.indicator=+
The character or string to show in the tag_indicator column. Defaults to +.
.TP
.B recurrence.indicator=R
The character or string to show in the recurrence_indicator column. Defaults to R.
.TP
.B debug=off
Task has a debug mode that causes diagnostic output to be displayed. Typically
this is not something anyone would want, but when reporting a bug, debug output
can be useful. It can also help explain how the command line is being parsed,
but the information is displayed in a developer-friendly, not a user-friendly
way.
.TP
.B alias.rm=delete
Task supports command aliases. This alias provides an alternate name (rm) for
the delete command. You can use aliases to provide alternate names for any of
task's commands.
.SS DATES
.TP
.B dateformat=m/d/Y
.TP
.B dateformat.report=m/d/Y
.TP
.B dateformat.holiday=YMD
.TP
.B report.X.dateformat=m/d/Y
This is a string of characters that define how task formats date values. The
precedence order for the configuration variable is report.X.dateformat then
reportdateformat then dateformat. While report.X.dateformat only formats the
due date in reports, reportdateformat formats the due date both in reports
and "task info". If both of these are not set then dateformat will be applied
to the due date. Entered dates as well as all other displayed dates in reports
are formatted according to dateformat.
The default value is: m/d/Y. The string should contain the characters:
.RS
.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
.br
a short name of weekday, for example Mon or Wed
.br
A long name of weekday, for example Monday or Wednesday
.br
b short name of month, for example Jan or Aug
.br
B long name of month, for example January or August
.br
V weeknumber, for example 03 or 37
.RE
.RE
.RS
The string may also contain other characters to act as spacers, or formatting.
Examples for other values of dateformat:
.RE
.RS
.RS
.br
d/m/Y would use for input and output 24/7/2009
.br
yMD would use for input and output 090724
.br
M-D-Y would use for input and output 07-24-2009
.RE
.RE
.RS
Examples for other values of reportdateformat:
.RE
.RS
.RS
.br
a D b Y (V) would do an output as "Fri 24 Jul 2009 (30)"
.br
A, B D, Y would do an output as "Friday, July 24, 2009"
.br
vV a Y-M-D would do an output as "v30 Fri 2009-07.24"
.RE
.RE
.TP
.B weekstart=Sunday
Determines the day a week starts. Valid values are Sunday or Monday only. The
default value is "Sunday".
.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. The default value is
"yes".
.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. The default value is 7.
.TP
.B calendar.details=sparse
If set to full running "task calendar" will display the details of tasks with
due dates that fall into the calendar period. The corresponding days will be
color-coded in the calendar. If set to sparse only the corresponding days will
be color coded and no details will be displayed. The displaying of due dates
with details is turned off by setting the variable to none. The default value
is "sparse".
.TP
.B calendar.details.report=list
The report to run when displaying the details of tasks with due date when
running the "task calendar" command. The default value is "list".
.TP
.B calendar.holidays=full
If set to full running "task calendar" will display holidays in the calendar by
color-coding the corresponding days. A detailed list with the dates and names
of the holidays is also shown. If set to sparse only the days are color-coded
and no details on the holidays will be displayed. The displaying of holidays is
turned off by setting the variable to none. The default value is "none".
.TP
.B Holidays
Holidays are entered either directly in the .taskrc file or via an include file
that is specified in .taskrc. For each holiday the name and the date is
required to be given:
.RS
.RS
.br
holiday.towel.name=Day of the towel
.br
holiday.towel.date=20100525
.br
holiday.sysadmin.name=System Administrator Appreciation Day
.br
holiday.sysadmin.date=20100730
.RE
.RE
.RS
Dates are to be entered according to the setting in the dateformat.holiday
variable.
.RE
.RS
The following holidays are computed automatically: Good Friday (goodfriday), Easter (easter), Easter monday (eastermonday), Ascension (ascension), Pentecost (pentecost). The date for these holidays is the given keyword:
.RE
.RS
.RS
.br
holiday.eastersunday.name=Easter
.br
holiday.eastersunday.date=easter
.RE
.RE
.TP
.B monthsperline=3
Determines how many months the "task calendar" command renders across the
screen. Defaults to however many will fit. If more months than 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, even when color is enabled.
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 colors, 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.today=bold magenta
The color of tasks due today.
.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. No default value.
.br
.B color.pri.L=on green
The color of priority:L tasks. No default value.
.br
.B color.pri.none=white on blue
The color of priority: tasks. No default value.
.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
To disable a coloration rule for which there is a default, set the value to
nothing, for example:
.RS
.B color.tagged=
.RE
.RE
.RS
See the task-color(5) man pages for color details.
.RE
.RS
Certain attributes like tags, projects and keywords can 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 or any annotation contains X.
.TP
.B color.header=green
Colors any of the messages printed prior to the report output.
.TP
.B color.footnote=green
Colors any of the messages printed last.
.TP
.B color.summary.bar=on green
Colors the summary progress bar. Should include both a foreground and a
background color.
.TP
.B color.summary.background=on black
Colors the summary progress bar. Should include at least a background color.
.TP
.B color.calendar.today=black on cyan
Color of today in calendar.
.TP
.B color.calendar.due=black on green
Color of days with due tasks in calendar.
.TP
.B color.calendar.due.today=black on magenta
Color of today with due tasks in calendar.
.TP
.B color.calendar.overdue=black on red
Color of days with overdue tasks in calendar.
.TP
.B color.calendar.weekend=bright white on black
Color of weekend days in calendar.
.TP
.B color.calendar.holiday=black on bright yellow
Color of holidays in calendar.
.TP
.B color.calendar.weeknumber=black on white
Color of weeknumbers in calendar.
.RE
.RS
It is possible to apply a specific color to every other task in a report,
which can make it easier to visually separate tasks. This is especially
useful when tasks are displayed over multiple lines due to long descriptions
or annotations.
.TP
.B color.alternate=on rgb253
Color of alternate tasks.
.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, if you don't specify one. The default is blank.
.TP
.B
default.priority=M
Provides a default priority for the
.I task add
command, if you don't specify one. The default is blank.
.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_indicator, age,
age_compact, active, tags, tag_indicator, description, description_only,
countdown, countdown_compact.
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.dateformat
This adds a dateformat to the report X that will be used by the "due date"
column. If it is not set then reportdateformat and dateformat will be used in
this order. See the
.B DATES
section for details on the sequence placeholders.
.TP
.B report.X.annotations
This adds the possibility to control the output of annotations for a task in a
report. See the
.B annotations
variable for details on the possible values.
.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
Short listing of all tasks matching the specified criteria.
.TP
.B minimal
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 \- 2010 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),
.BR task-faq(5)
.BR task-color(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
<git://tasktools.org/task.git/>
.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>

34
doc/misc/script-color.txt Normal file
View File

@@ -0,0 +1,34 @@
Hello. This is a demonstration of the
task program color capabilities coming
in version 1.9.
task color The color command shows the various
supported colors. For this you will
need an xterm with 256-color support,
or an equivalent.
This demo uses iTerm running on Snow
Leopard.
task add Prepare 1.9 for release Let's create a few tasks, to illustrate
task add Update the various docs the features. Five should be enough.
task add Run the regression tests
task add Make the packages
task add Upload to distributions
--- NOTES
16-color mode
upgrade
blending
alternate lines
--- NOTES
task ls Okay, let's color any tasks that
mention tests a nice medium blue.
echo 'color.keyword.test=color23' >> ~/.taskrc

View File

@@ -0,0 +1,40 @@
$ # Q: What is a formatting hook?
$ # A: Lua code that modifies task output at run time.
$
$ cat > hooks.lua
-- Make ID not show up
function id (name, value)
return "(shhh - it's a secret)", 0, nil
end
-- Decorate the UUID
function uuid (name, value)
return '<<<' .. value .. '>>>', 0, nil
end
^D
$ # Q: What is a command hook?
$ # A: Lua code that changes the way commands work.
$
$ cat >> hooks.lua
-- Disable tags
function notags ()
return 1, 'Tags have been disabled'
end
^D
$
$ task config -- hook.format-id ~/demo/hooks.lua:id
$ task config -- hook.format-uuid ~/demo/hooks.lua:uuid
$ task config -- hook.pre-tag ~/demo/hooks.lua:notags
$ task list
$ task add Demonstrate formatting hooks
$ task 1 info
$ task config hooks on
$ task 1 info
$ task 1 +try_to_tag

33
doc/misc/script-hooks.txt Normal file
View File

@@ -0,0 +1,33 @@
$
$ # Task now has Lua 5.1.4 built in.
$
$ task version
$ cat > hooks.lua
function foo ()
print ("Hello from Lua")
return 0, nil
end
^D
$
$ # Task can call into Lua at many points during execution.
$ # This one is called immediately before task quits.
$
$ task rc.hook.pre-exit=~/hooks.lua:foo version
$
$ # While task is calling Lua code, the Lua can also call
$ # back into a task API, for information.
$
$ cat > hooks.lua
function foo ()
print "Lua version is " .. task_lua_version ())
print "Task version is " .. task_version ())
return 0, nil
end
^D
$
$ cat >> .taskrc
hook.pre-exit=~/hooks.lua:foo
^D
$
$ task version

1
doc/rc/dark-16.theme Normal file
View File

@@ -0,0 +1 @@
# Sample task 1.9 (or later) color theme

1
doc/rc/dark-256.theme Normal file
View File

@@ -0,0 +1 @@
# Sample task 1.9 (or later) color theme

34
doc/rc/holidays-SE.rc Normal file
View File

@@ -0,0 +1,34 @@
holiday.nyårsdagen.name=Nyårsdagen
holiday.nyårsdagen.date=20100101
holiday.trettondedagjul.name=Trettondedag jul
holiday.trettondedagjul.date=20100106
holiday.långfredagen.name=Långfredagen
holiday.långfredagen.date=20100402
holiday.påskdagen.name=Påskdagen
holiday.påskdagen.date=20100404
holiday.annandagpåsk.name=Annandag påsk
holiday.annandagpåsk.date=20100405
holiday.valborgmässoafton.name=Valborgmässoafton
holiday.valborgmässoafton.date=20100430
holiday.förstamaj.name=Första maj
holiday.förstamaj.date=20100501
holiday.kristihimmelfärdsdag.name=Kristi Himmelsfärdsdag
holiday.kristihimmelfärdsdag.date=20100513
holiday.pingstdagen.name=Pingstdagen
holiday.pingstdagen.date=20100523
holiday.nationaldagen.name=Nationaldagen
holiday.nationaldagen.date=20100606
holiday.midsommarafton.name=Midsommarafton
holiday.midsommarafton.date=20100625
holiday.midsommardagen.name=Midsommardagen
holiday.midsommardagen.date=20100626
holiday.allahelgonsdag.name=Alla Helgons Dag
holiday.allahelgonsdag.date=20101106
holiday.julafton.name=Julafton
holiday.julafton.date=20101224
holiday.juldagen.name=Juldagen
holiday.juldagen.date=20101225
holiday.annandagjul.name=Annandag jul
holiday.annandagjul.date=20101226
holiday.nyårsafton.name=Nyårsafton
holiday.nyårsafton.date=20101231

26
doc/rc/holidays-US.rc Normal file
View File

@@ -0,0 +1,26 @@
holiday.newyearsday.name=New Years Day
holiday.newyearsday.date=20100101
holiday.martinlutherkingday.name=Martin Luther King Day
holiday.martinlutherkingday.date=20100118
holiday.presidentsday.name=Presidents Day
holiday.presidentsday.date=20100215
holiday.patriotsday.name=Patriots Day
holiday.patriotsday.date=20100419
holiday.memorialday.name=Memorial Day
holiday.memorialday.date=20100531
holiday.independenceday.name=Independence Day
holiday.independenceday.date=20100704
holiday.independenceday2.name=Independence Day observed
holiday.independenceday2.date=20100705
holiday.laborday.name=Labor Day
holiday.laborday.date=20100906
holiday.columbusday.name=Columbus Day
holiday.columbusday.date=20101011
holiday.veteransdays.name=Veterans Day
holiday.veteransdays.date=20101111
holiday.thanksgiving.name=Thanksgiving Day
holiday.thanksgiving.date=20101125
holiday.christmasday.name=Christmas Day
holiday.christmasday.date=20101225
holiday.newyearseve.name=New Years Eve
holiday.newyearseve.date=20101231

1
doc/rc/light-16.theme Normal file
View File

@@ -0,0 +1 @@
# Sample task 1.9 (or later) color theme

1
doc/rc/light-256.theme Normal file
View File

@@ -0,0 +1 @@
# Sample task 1.9 (or later) color theme

View File

@@ -1,131 +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>30-Second Tutorial</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>
<a href="links.html">Task on the Web</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-2009, 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,493 +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>Advanced Usage</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>
<a href="links.html">Task on the Web</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>
<p>
However, if the following configuration variable is specified:
</p>
<pre><code>default.command=list pri:H</code></pre>
<p>
Then this command will be run whenever task is run without arguments.
This means that your most common task command can be run simply
with the command:
</p>
<pre><code>% task
[task list project:foo]
ID Project Pri Description
1 foo H Design the thing
2 foo Build the thing</code></pre>
<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 &lt;id&gt; append ...</strong>
<p>
Appends the additional description to an existing task.
</p>
<strong>% task annotate &lt;id&gt; additional note...</strong>
<p>
Allows an annotation to be attached to an existing task. Each
annotation has a time stamp, and when displayed, the annotations
are shown under the task description. For example:
</p>
<pre><code>% task add Go to the supermarket
% task annotate 1 need milk
% task ls
ID Project Pri Due Active Age Description
1 Go to the supermarket
3/23/2009 need milk</code></pre>
<p>
The date of the annotation uses the "dateformat" configuration
variable.
</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 undo &lt;id&gt;</strong>
<p>
If a task was recently marked as done, and no report has been run, it
may be possible to cancel the completed status of the task as though
"task done ..." was never run.
</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 stop &lt;id&gt;</strong>
<p>
Marks a task as inactive, by removing the start time.
</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 &lt;id&gt; /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 a single correction to the first occurrence of
"from" in a task description.
</p>
<p>
If a task is annotated, the annotation can also be modified using
this command.
</p>
<strong>% task &lt;id&gt; /from/to/g</strong>
<p>
The "g" modifier to the substitution command causes every occurrence
of "from" to be replaced with "to", in both the description and any
annotations.
</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 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; "new description"</strong>
<p>
Not strictly a command, the replacement of the description can
be achieved by quoting the entire description. The quotes are
necessary in case one of the description words looks like a task
command.
</p>
<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-2009, 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,128 +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>Color Usage</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>
<a href="links.html">Task on the Web</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-2009, 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,428 +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 Configuration</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>
<a href="links.html">Task on the Web</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>confirmation</dt>
<dd>
May be "yes" or "no", and determines whether task will ask for
confirmation before deleting a task.
</dd>
<dt>echo.command</dt>
<dd>
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,
delete and undelete commands. The default value is "yes".
</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>monthsperline</dt>
<dd>
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.
</dd>
<dt>defaultwidth</dt>
<dd>
The width of tables used when ncurses support is not available.
Defaults to 80.
</dd>
<dt>due</dt>
<dd>
This is the number of days into the future that define when a
task is considered due, and is colored accordingly.
Defaults to 7.
</dd>
<dt>color</dt>
<dd>
May be "on" or "off". Determines whether task uses color.
When "off", task will use dashes (-----) to underline column
headings.
</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<br />
color.recurring
</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>
<dt>default.project</dt>
<dd>
Provides a default project name for the "task add ..." command.
</dd>
<dt>default.priority</dt>
<dd>
Provides a default priority for the "task add ..." command.
</dd>
<dt>default.command</dt>
<dd>
<p>
Provides a default command that is run every time task is
invoked with no arguments. For example, if set to:
</p>
<pre><code>default.command=list project:foo</code></pre>
<p>
Then task will run the "list project:foo" command if no
command is specified. This means that by merely typing:
</p>
<pre><code>% task
[task list project:foo]
ID Project Pri Description
1 foo H Design the thing
2 foo Build the thing</code></pre>
<p>
Note that the value of this variable is simply the command
line that you would ordinarily type, but without the
preceding "task" program name.
</p>
</dd>
<dt>shadow.file</dt>
<dd>
<p>
If specified, designates a file path that will be autoamtically
written to by task, whenever the task database changes. In other
words, it is automatically kept up to date.
</p>
<p>
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.
</p>
<p>
This feature can be useful in maintaining a current file for
use by the "Samurize" program.
</p>
</dd>
<dt>shadow.command</dt>
<dd>
<p>
This is the command that is run to maintain the shadow file,
determined by the shadow.file configuration variable. The
format is identical to that of default.command - please see
the documentation for default.command.
</p>
<p>
If this command is not specified, task will use the default.command
value instead. If that is not specified, the command "list" is used.
</p>
</dd>
<dt>shadow.notify</dt>
<dd>
When this value is set to "on", task will display a message
whenever the shadow file is updated by some task command.
</dd>
<dt>locking</dt>
<dd>
<p>
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".
</p>
<p>
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.
</p>
</dd>
<dt>import.synonym.id</dt>
<dt>import.synonym.uuid</dt>
<dt>import.synonym.status</dt>
<dt>import.synonym.tags</dt>
<dt>import.synonym.entry</dt>
<dt>import.synonym.start</dt>
<dt>import.synonym.due</dt>
<dt>import.synonym.recur</dt>
<dt>import.synonym.end</dt>
<dt>import.synonym.project</dt>
<dt>import.synonym.priority</dt>
<dt>import.synonym.fg</dt>
<dt>import.synonym.bg</dt>
<dt>import.synonym.description</dt>
<dd>
If any of these configuration variables are found, they influence
data import by specifying a single additional field name synonym.
If a data import is failing because certain column names are not
being recognized, then this is how the field mapping can be
controlled.
</dd>
<p>
Note that the command:
</p>
<pre><code>task version</code></pre>
<p>
will display the configuration variables found in the .taskrc file,
and will warn you of any variables that are not recognized.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,179 +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>Custom Reports</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>
<a href="links.html">Task on the Web</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title">Custom Reports</h2>
<div class="content">
<p>
Task allows you to customize reports, to a limited degree.
The "list", "long", "ls", "oldest" and "newest" reports are
all now custom reports, whereas in previous releases of task
they were not mutable. This means they can be modified,
renamed, or deleted.
</p>
<p>
More importantly, you can define your own. Here are the
three necessary items in the .taskrc file that define a new
report:
</p>
<code><pre>report.mine.description=Just the essentials
report.mine.columns=id,project,priority,description
report.mine.sort=priority-,project+</pre></code>
<p>
This defines a report, called "mine", that has four columns:
id, project, priority and description. It will be sorted on
two columns: by descending priority then ascending project.
The description that shows up in the task command usage page
is "Just the essentials". Because this report is called
"mine", it can be run with the command:
</p>
<code><pre>% task mine</pre></code>
<p>
An optional filter can also be specified like this:
</p>
<code><pre>report.mine.filter=priority:H +bug</pre></code>
<p>
This adds a filter so that only tasks with priority "H" and
with the "bug" tag are included in the report. This filter
definition is optional.
</p>
<p>
An optional limit can also be specified, which limits the
number of tasks shown in the report. If a limit is not
specified, then the number of tasks is not limited.
</p>
<code><pre>report.mine.limit=10</pre></code>
<p>
Here is a list of all the possible columns that may be included
in a report:
</p>
<p>
It is also possible to override the default columns names, if
the following line is added to your .taskrc file:
</p>
<pre><code>report.mine.labels=ID,Project,Priority,Description of task</code></pre>
<p>
Note that there must be the same number of labels as there are
columns to label, and they must appear in the same sequence.
</p>
<ul>
<li>id
<li>uuid
<li>project
<li>priority
<li>entry
<li>start
<li>due
<li>age
<li>active
<li>tags
<li>recur
<li>description_only
<li>description
<li>tag_indicator
<li>recurrence_indicator
</ul>
<p>
Custom reports will show up in the task command line usage.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,161 +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>Date Handling</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>
<a href="links.html">Task on the Web</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-2009, 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,175 +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>Frequently Asked Questions</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>
<a href="links.html">Task on the Web</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title">Frequently Asked Questions</h2>
<div class="content">
<p>
(Actually, that's a misnomer. These are really Repeatedly Asked
Questions.)
</p>
<p>
<b>
Q: When I redirect the output of task to a file, I lose all
the colors. How do I fix this?
</b>
<br />
A: Task knows (or thinks it knows) when the output is not going
directly to a terminal, and strips out all the color control
characters. Prevent this with the following entry in your
.taskrc file:
<pre><code>_forcecolor=on</code></pre>
</p>
<hr>
<p>
<b>
Q: How do I backup my task data files? Where are they?
</b>
<br />
A: Task writes all pending tasks to the file ~/.task/pending.data
and all completed and deleted tasks to ~/.task/completed.data.
They are text files, so they can just be copied to another
location for safekeeping. Don't forget there is also the
~/.taskrc file that contains your task configuration data.
</p>
<hr>
<p>
<b>
Q: How can I separate my work tasks from my home tasks?
Specifically, can I keep them completely separate?
</b>
<br />
A: You can do this by creating an alternate .taskrc file,
then using shell aliases. Here is are example Bash
commands to achieve this:
<pre><code>% cp ~/.taskrc ~/.taskrc_home
% (now edit .taskrc_home to change the value of data.location)
% alias wtask="task"
% alias htask="task rc:~/.taskrc_home"</code></pre>
This gives you two commands, 'wtask' and 'htask' that
operate using two different sets of task data files.
</p>
<hr>
<p>
<b>
Q: Can I revert to a previous version of task? How?
</b>
<br />
A: Yes, you can revert to a previous version of task,
simply by downloading an
<a href="versions.html">older version</a> and
installing it. If you find a bug in task, then this
may be the only way to work around the bug, until a
new release is made.
</p>
<p>
Note that it is possible that the task file format will
change. For example, the format changed between versions
1.5.0 and 1.6.0. Task will automatically upgrade the file
but if you need to revert to a previous version of task,
there is the file format to consider. This is yet another
good reason to back up your task data files!
</p>
<hr>
<!--
<p>
<b>
Q:
</b>
<br />
A:
</p>
<hr>
-->
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,133 +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 Filters</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>
<a href="links.html">Task on the Web</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title">Task Filters</h2>
<div class="content">
<p>
A task filter is a means of reducing a task report to a
subset that may consist of all tasks that have a specific
project, priority, tag, or part of the description.
</p>
<p>
A task filter consists of additional command line options,
that are specified in the same way as when a task is added.
</p>
<p>
All task reports can make use of filters.
</p>
<p>
For example, the report:
</p>
<code><pre>% task list</pre></code>
<p>
Lists all tasks.
</p>
<code><pre>% task list the</pre></code>
<p>
Lists only tasks with "the" in the task description.
</p>
<code><pre>% task list project:Home priority:H</pre></code>
<p>
Lists only tasks with both the "Home" project and "H" priority.
</p>
<code><pre>% task list +shopping</pre></code>
<p>
Lists only tasks with the "shopping" tag.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,158 +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>Data Import</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>
<a href="links.html">Task on the Web</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title">Data Import</h2>
<div class="content">
<p>
Tasks can be imported from files with this command:
<pre><code>% task import file</code></pre>
A variety of different file types are recognized by task, namely:
<ul>
<li>Tasks exported from task prior to version 1.5.0.
<li>Tasks exported from task version 1.5.0 and later. The file
format changed with 1.5.0.
<li>todo.sh files.
<li>CSV files with a variety of recognized column names.
<li>Plain text files, with one task listed per line.
<li>Task command line format.
</ul>
</p>
<p>
Task makes a good effort to determine which of these formats a
file is. It does this by reading the file, and looking for
familiar patterns. For example, the easiest files to recognize
are those exported from task itself, because they all have a
header line that comes in only three variations. Other formats
are a little harder to identify, but they all have their own
identifying characteristics.
</p>
<p>
The most complex import is when a CSV file is recognized.
Task needs a field header line in order to map columns to task
data items. For example, the if the following file is
imported:
</p>
<pre><code>number,status,task
1,pending,task one
2,pending,task two</code></pre>
<p>
Task will map the "number" field to task's "id" field, etc,
based on name. Task has a list of synonyms that it uses to
map fields, but you can specify your own override with any of
the following configuration variables:
</p>
<ul>
<li>import.synonym.id
<li>import.synonym.uuid
<li>import.synonym.status
<li>import.synonym.tags
<li>import.synonym.entry
<li>import.synonym.start
<li>import.synonym.due
<li>import.synonym.recur
<li>import.synonym.end
<li>import.synonym.project
<li>import.synonym.priority
<li>import.synonym.fg
<li>import.synonym.bg
<li>import.synonym.description
</ul>
<p>
Please note that it is wise to backup your task data files
before an import.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,214 +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 on the Web</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>
<a href="links.html">Task on the Web</a>
</div>
<div id="content">
<br />
<br />
<br />
<h1 class="title">Task on the Web</h1>
<p>
Task links from around the web...
</p>
<dt>
February 2009, <a href="http://lifehacker.com/5155450/todotxt-cli-manages-your-tasks-from-the-command-line">Todo.txt CLI Manages Your Tasks from the Command Line</a>
</dt>
<dd>
Gina Trapani generously mentions task in an article about the newly updated, todo.sh 2.0.
</dd>
<br>
<dt>
February, 2009, <a href="http://forum.worklifecreativity.net/index.php/topic,219.0.html">My command line based task management tools</a>
</dt>
<dd>
Richard Querin talks about his task management tools.
Richard generously provides the Debian packages for task.
</dd>
<br>
<dt>
February, 2009, <a href="http://wiki.archlinux.org/index.php/Common_Apps">Common Apps</a>
</dt>
<dd>
<a href="http://wiki.archlinux.org">Archlinux.org</a> mentions task on a page which is
a point of reference for people looking for software to fill a particular need.
</dd>
<br>
<dt>
November 2008, <a href="http://github.com/pbeckingham/task/tree/master/">Task repository on GitHub</a>
</dt>
<dd>
For developers: the task git repository on github.com is now public.
</dd>
<br>
<dt>
October 2008, <a href="http://blog.rfquerin.org/2008/10/07/using-task-and-dropbox-to-manage-your-to-do-list/">Using Task and Dropbox to manage your To-Do list</a>
</dt>
<dd>
by Richard Querin. Richard discusses the ease of setting up task to
use DropBox to share todo lists between work and home.
</dd>
<br>
<dt>
September 2008, <a href="http://stasantons.blogspot.com/2008/09/task-program-visually-simple.html">Task visualization</a>
</dt>
<dd>
by Stas Antons. Stas - a colleague of mine - presents a visualization
of the simplicity of task.
</dd>
<br>
<dt>
June 2008, <a href="http://blog.rfquerin.org/2008/06/17/building-debian-packages-for-task/">Building Debian Packages For Task</a>
</dt>
<dd>
by Richard Querin. Richard has been providing Debian packages for the
various task releases, and discusses how he got up to speed.
</dd>
<br>
<dt>
June 2008, <a href="http://blog.rfquerin.org/2008/06/06/task-101-an-attempt-at-a-cygwin-build-how-to/">Task 1.0.1 - an attempt at a Cygwin Build How-To</a>
</dt>
<dd>
by Richard Querin. Richard shows us how to build task using Cygwin, after
a cry for help on the todo.txt mailing list.
</dd>
<br>
<dt>
June 2008, <a href="http://www.youtube.com/watch?v=D2Kn4DMOVSw">The second task movie</a>
</dt>
<dd>
This YouTube movie was made to illustrate some of the features of the task
program, back when task 1.0.0 was released. While task has grown
significantly since then, the commands shown are still valid. It will
soon be time for a new movie!
<p>
This movie has a voice-over that explains what is going on.
<p>
For a higher-quality version, download the whole
<a href="http://www.beckingham.net/todo2.mov">movie file (10MB)</a>.
</dd>
<br>
<dt>
December 2006, <a href="http://www.youtube.com/watch?v=l68LCl6BYvs">The first task movie</a>
</dt>
<dd>
This original YouTube task movie was made to illustrate the features of the
then-unreleased task program. The idea was to get some feedback and see
whether anyone was interested in a new implementation of todo.sh, that added
features that are not easily possible with a shell implementation.
<p>
This movie has no voice-over, and you may notice that it exactly duplicates
the commands used in the original todo.sh movie (below). That is, until it
deviates because of new task commands.
</dd>
<br>
<dt>
June 2006, <a href="http://www.youtube.com/watch?v=daJ1Hs_y738">The original todo.sh movie</a>
</dt>
<dd>
by Gina Trapani. This is the original YouTube todo.sh movie, made to
illustrate the power and simplicity of the original todo.sh program.
</dd>
<br>
<dt>
June 2006, <a href="http://todotxt.com/">Todo.sh, the inspiration for task</a>
</dt>
<dd>
by Gina Trapani. The website that introduced me to the power and
simplicity of the original todo.sh program. Contains useful links
and resources - take a look!
</dd>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,220 +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>Recurring Tasks</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>
<a href="links.html">Task on the Web</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>Modification</h4>
<p>
When a recurring task is modified, all the other recurring task instances will
be modified. For example, if you raise the priority of one of the recurring
task instances, all will be modified.
</p>
<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">weekdays</td>
<td class="table_d">
Monday, Tuesday, Wednesday, Thursday and Friday,
skipping weekend 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-2009, 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,141 +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 Setup</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>
<a href="links.html">Task on the Web</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.6.0.tar.gz
% gunzip task-1.6.0.tar.gz
% tar xf task-1.6.0.tar
% cd task-1.6.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-2009, 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,129 +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 Shadow Files</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>
<a href="links.html">Task on the Web</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title">Task Shadow Files</h2>
<div class="content">
<p>
A shadow file is a text file containing a copy of a task
report. It is automatically maintained by task whenever
something changes in the task database.
</p>
<p>
This means there is always a current version of the task
report kept in a text file. Products such as
<a href="http://www.samurize.com">Samurize</a>,
<a href="http://www.mulle-kybernetik.com/software/MkConsole/">MkConsole</a>,
or
<a href="http://projects.tynsoe.org/en/geektool/">GeekTool</a>
can display this file on the computer desktop, so that it
is readily visible.
</p>
<p>
To use a shadow file, edit your .taskrc configuration file,
and add three entries as shown:
</p>
<pre><code>shadow.file=/path/to/file
shadow.command=list pri:H
shadow.notify=on</code></pre>
<p>
In this example the shadow file contains a report equivalent
to running "task list pri:H". Note that the third entry
causes a message to be displayed whenever task updates the
shadow file. It is optional.
</p>
<p>
You can use any task command that generates a report, and of
course, you can specify any file name, provided the directory
it resides in already exists.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,131 +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>Interacting with the Shell</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>
<a href="links.html">Task on the Web</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-2009, 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,356 +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>Simple Usage</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>
<a href="links.html">Task on the Web</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-2009, 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,265 +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>Latest Release</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>
<a href="links.html">Task on the Web</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><a href="filter.html">Filters</a>
<li><a href="shadow.html">Shadow Files</a>
<li><a href="custom.html">Custom Reports</a>
<li><a href="import.html">Data Import</a>
<li><a href="faq.html">Frequently Asked Questions</a>
</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 Stable Release</h2>
<div class="content">
<table>
<tr>
<td>Source:</td>
<td><a href="http://www.beckingham.net/task-1.6.0.tar.gz">task-1.6.0.tar.gz</a></td>
</tr>
<tr>
<td>Mac OS X 10.5 (Leopard) Intel-only:</td>
<td><a href="http://www.beckingham.net/task-1.6.0.pkg">task-1.6.0.pkg</a></td>
</tr>
<tr>
<td>
Debian:
(Thanks to <a href="http://blog.rfquerin.org">Richard&nbsp;Querin</a>):
</td>
<td><a href="http://www.beckingham.net/task_1.6.0-1_i386.deb">task_1.6.0-1_i386.deb</a></td>
</tr>
<tr>
<td>
Red Hat:
(Thanks to <a href="http://www.ultrafredde.com">Federico&nbsp;Hernandez</a>):
</td>
<td><a href="http://www.beckingham.net/task-1.6.0-1.i386.rpm">task-1.6.0-1.i386.rpm</a></td>
</tr>
<tr>
<td>Git - get the whole source and history:</td>
<td><a href="http://github.com/pbeckingham/task">http://github.com/pbeckingham/task</a></td>
</tr>
</table>
<h4>New in version 1.6.0 (?)</h4>
<ul>
<li>Added support for new "append" command that adds more description text to
an existing task.
<li>Added support for the "weekdays" recurrence, which means a task can recur
five times a week, and not on weekends (thanks to Chris Pride).
<li>UTF8 text is now supported in task project names, tags and descriptions.
<li>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).
<li>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).
<li>A task can now be annotated with the command "task <id> annotate ...", and
a timestamped annotation will appear in reports.
<li>A 'description_only' column is now available for use in custom reports,
and it excludes annotations.
<li>A task can now be upgraded to a recurring task by adding a recurrence
frequency, a due date, and an optional until date.
<li>When a recurring task is modified, all other instances of the recurring
task are also modified.
<li>Custom reports now support user-specified column labels (thanks to T.
Charles Yun).
<li>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.
<li>Export was including 'id' in the column header even though it was not
included in the data.
<li>The task file format has changed slightly. Please back up your task
data files before upgrading to 1.6.0.
<li>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.
<li>Added new column 'tag_indicator' that displays a '+' if the task
has any tags. This column can be added to any custom report.
<li>Fixed bug where sometimes a task description was concatenated oddly if
there was a colon somewhere in the description.
<li>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).
<li>Annotations can now be modified with the substitution commands /from/to/.
<li>Substitutions can now be made global with /from/to/g and all occurrences
of "from" will be replaced with "to".
</ul>
<p>
(Find out <a href="versions.html">what was new in prior versions</a>)
</p>
<!--
<h2>Task 1.6.0 Beta</h2>
<p>
The next version of task is in beta. This means it is approaching the
end of the current development and testing cycle, and feedback from
a wider audience is needed to find the last bugs. If you would like
to help test the next release of task, download the beta source below
and install in the usual manner.
</p>
<p>
Please note that beta software may contain significant bugs. If you
use this beta release, you should first backup your existing task
data files.
</p>
<p>
Refer to the ChangeLog file for details regarding the various fixes
and enhancements.
</p>
<table>
<tr>
<td>Source:</td>
<td><a href="http://www.beckingham.net/task-1.6.0beta.tar.gz">task-1.6.0beta.tar.gz</a></td>
</tr>
</table>
-->
<h2>Troubleshooting</h2>
<p>
Task has been built from source and tested in the following environments:
</p>
<p>
<ul>
<li>OS X 10.4 Tiger
<li>OS X 10.5 Leopard
<li>Fedora Core 8
<li>Fedora Core 9
<li>Fedora Core 10
<li>Ubuntu 7 Feisty Fawn
<li>Ubuntu 8 Hardy Heron
<li>Ubuntu 8.10 Intrepid Ibex
<li>Solaris 10
<li>Cygwin 1.5.25-14
</ul>
</p>
<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-2009, 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,156 +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>
<a href="links.html">Task on the Web</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 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 />
<h2 class="title">Do colors work under Cygwin?</h2>
<div class="content">
<p>
They do, but only in a limited way. You can use regular
foreground colors (black, red, green ...) and you can
regular background colors (on_black, on_red, on_green ...),
but underline and bold are not supported.
</p>
<p>
If you run the command:
<code><pre>% task colors</pre></code>
Task will display all the colors it can use, and you will
see which ones you can use.
</p>
</div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,153 +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 Usage</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>
<a href="links.html">Task on the Web</a>
</div>
<div id="content">
<br />
<br />
<br />
<h2 class="title"><a name="usage">Command Usage<a></h2>
<div class="content">
<pre><code>Usage: task
task add [tags] [attrs] desc...
task append [tags] [attrs] desc...
task annotate ID 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 stop ID
task done ID
task undo ID
task projects
task tags
task summary
task history
task ghistory
task next
task calendar
task active
task overdue
task stats
task export
task color
task version
task help
task list [tags] [attrs] desc...
task long [tags] [attrs] desc...
task ls [tags] [attrs] desc...
task newest [tags] [attrs] desc...
task oldest [tags] [attrs] desc...
See http://www.beckingham.net/task.html for the latest releases and a full tutorial.
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
recur: Recurrence frequency
until: Recurrence end date
fg: Foreground color
bg: Background color
rc: Alternate .taskrc file
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:
$ ! ' " ( ) ; \ ` * ? { } [ ] < > | & % # ~</code></pre>
<div>
<br />
<br />
<div class="content">
<p>
Copyright 2006-2009, 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,372 +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>
<a href="links.html">Task on the Web</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.5.0 (3/15/2009)</h4>
<table>
<tr>
<td>Source:</td>
<td><a href="http://www.beckingham.net/task-1.5.0.tar.gz">task-1.5.0.tar.gz</a></td>
</tr>
<tr>
<td>Mac OS X 10.5 (Leopard) Intel-only:</td>
<td><a href="http://www.beckingham.net/task-1.5.0.pkg">task-1.5.0.pkg</a></td>
</tr>
<tr>
<td>
Debian:
(Thanks to <a href="http://blog.rfquerin.org">Richard&nbsp;Querin</a>):
</td>
<td><a href="http://www.beckingham.net/task_1.5.0-1_i386.deb">task_1.5.0-1_i386.deb</a></td>
</tr>
<tr>
<td>
Red Hat:
(Thanks to <a href="http://www.ultrafredde.com">Federico&nbsp;Hernandez</a>):
</td>
<td><a href="http://www.beckingham.net/task-1.5.0-1.i386.rpm">task-1.5.0-1.i386.rpm</a></td>
</tr>
</table>
<ul>
<li>Removed deprecated TUTORIAL file.
<li>Removed support for the "showage" configuration variable.
<li>"task stop" can remove the start time from a started task.
<li>"task ghistory" now displays a differently aligned graph, allowing
easier comparison by month of tasks added versus completed and deleted.
<li>"task version" command now reports unrecognized configuration variables,
which may be spelling mistakes or deprecated variables.
<li>"configure --enable-debug" now supported to suppress compiler optimization
to allow debugging.
<li>Allow lower case priorities, and automatically upper case them.
<li>Added support for "due" configuration variable which defines the number
of days in the future when a task is considered due.
<li>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.
<li>New online documentation for custom reports.
<li>New algorithm for determining when the "nag" message is displayed.
<li>Fixed bug where task hangs with a certain combination of recurring tasks
and shadow files.
<li>Fixed bug with the task sort algorithm, which led to an unstable sequence
when there were only a handful of tasks.
<li>Performance enhanced by eliminating unnecessary sorting.
<li>Task now has a large (and growing) test suite and bug regression tests
to help ensure higher quality releases.
<li>Fixed bug that caused large performance hit during table rendering.
<li>Fixed bug that concatenated a modified description without spaces.
<li>Added new column 'recur' that displays the recurrence period of any
recurring tasks. This column can be added to any custom report.
<li>Added support for "color.recurring" configuration variable which
specifies the color of recurring tasks.
<li>Added support for "locking" configuration variable that controls whether
file locking is used.
<li>Task export feature now includes recurrence information, removes nested
quotes, and limits output to pending tasks.
<li>Task no longer includes deleted tasks in the summary report (thanks to
Benjamin Tegarden).
<li>Fixed bug that prevented the summary report from properly reporting
recently completed tasks.
</ul>
</p>
<p>
<h4>New in version 1.4.3 (11/1/2008)</h4>
<a href="http://www.beckingham.net/task-1.4.3.tar.gz">task-1.4.3.tar.gz</a>
<br />
Mac OS X 10.5 (Leopard) Intel-only:
<a href="http://www.beckingham.net/task-1.4.3.pkg">task-1.4.3.pkg</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.4.3-1_i386.deb">task_1.4.3-1_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<p>
<ul>
<li>Fixed misleading task count at bottom of "info" report.
<li>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".
<li>Task now displays a message whenever a shadow file is updated, if the
"shadow.notify" configuration variable is set "on".
<li>Fixed bug whereby adding a task with a \n, \r or \f did not fail properly.
<li>Removed "task usage" command.
<li>Added documentation for Shadow files.
<li>Added documentation for task filters.
</ul>
</p>
<p>
<h4>New in version 1.4.2 (9/18/2008)</h4>
<a href="http://www.beckingham.net/task-1.4.2.tar.gz">task-1.4.2.tar.gz</a>
<br />
Mac OS X 10.5 (Leopard) Intel-only:
<a href="http://www.beckingham.net/task-1.4.2.pkg">task-1.4.2.pkg</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.4.2-1_i386.deb">task_1.4.2-1_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
<li>"task undo" can now retract a "task done" command, provided no
reports have been run.
<li>Task now correctly sorts on entire strings, instead of just the
first character (thanks to Andy Lester).
<li>Task now uses dashes (-----) to underline column headings when
color is disabled (thanks to Vincent Fleuranceau).
<li>Task now allows mixed case attribute names (pri:, PRI:, Pri: ...)
and commands (add, ADD, Add ...) (thanks to Vincent Fleuranceau).
<li>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).
<li>Task supports improved word-wrapping to the terminal width.
<li>Task now supports "default.command" configuration variable (for example
it could contain "list due:tomorrow") which is the command that is run
whenever task is invoked with no arguments.
<li>Task supports modifying the existing description of a task, with the
following syntax: task &lt;id&gt; "new description ...".
<li>Fixed bug so that relative dates in filters (task list due:eom,
task list due:tomorrow, task list due:23rd ...) are now properly
supported.
<li>Fixed bug so that source now properly includes &lt;string.h&gt; in
order to build clean using gcc 4.3 (thanks to H. İbrahim Güngör)
</ul>
<p>
<h4>New in version 1.4.1 (7/18/2008)</h4>
<a href="http://www.beckingham.net/task-1.4.1.tar.gz">task-1.4.1.tar.gz</a>
<br />
Mac OS X 10.5 (Leopard) Intel-only:
<a href="http://www.beckingham.net/task-1.4.1.pkg">task-1.4.1.pkg</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.4.1-1_i386.deb">task_1.4.1-1_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<ul>
<li>Fixed bug: Descriptions could not be altered with "task 123 New description"
<li>Tweak: For "task calendar" month names are now centered over the month
<li>Removed TUTORIAL file contents in favor of online version
<li>New Mac Intel-only Leopard (10.5) binary package
</ul>
<p>
<h4>New in version 1.4.0 (7/10/2008)</h4>
Source: <a href="http://www.beckingham.net/task-1.4.0.tar.gz">task-1.4.0.tar.gz</a>
<br />
Debian package: <a href="http://www.beckingham.net/task_1.4.0-1_i386.deb">task_1.4.0-1_i386.deb</a>
(Thanks to <a href="http://blog.rfquerin.org">Richard Querin</a>)
</p>
<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>
<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-2009, 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

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

@@ -0,0 +1,122 @@
# 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
217 prepend
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 on
503 bright
504 black
505 red
506 green
507 yellow
508 blue
509 magenta
510 cyan
511 white
520 off
521 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
%

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 @@
<pkg-contents spec="1.12"><f n="local" o="root" g="staff" p="16877" pt="/Users/paul/task-1.9.0.git/package-config/osx/local" m="false" t="file"><f n="bin" o="root" g="wheel" p="16877"><f n="task" o="root" g="wheel" p="33261"><mod>mode</mod><mod>owner</mod></f><mod>owner</mod></f><f n="share" o="root" g="wheel" p="16877"><f n="doc" o="root" g="wheel" p="16877"><f n="task" o="root" g="wheel" p="16877"><f n="AUTHORS" o="root" g="wheel" p="33188"><mod>mode</mod><mod>owner</mod></f><f n="ChangeLog" o="root" g="wheel" p="33188"><mod>mode</mod><mod>owner</mod></f><f n="COPYING" o="root" g="wheel" p="33188"><mod>mode</mod><mod>owner</mod></f><f n="NEWS" o="root" g="wheel" p="33188"><mod>mode</mod><mod>owner</mod></f><f n="README" o="root" g="wheel" p="33188"><mod>mode</mod><mod>owner</mod></f><f n="scripts" o="root" g="wheel" p="16877"><f n="bash" o="root" g="wheel" p="16877"><f n="task_completion.sh" o="root" g="wheel" p="33188"><mod>owner</mod><mod>mode</mod><mod>group</mod></f><mod>mode</mod><mod>owner</mod></f><f n="vim" o="root" g="wheel" p="16877"><f n="ftdetect" o="root" g="wheel" p="16877"><f n="task.vim" o="root" g="wheel" p="33188"><mod>mode</mod></f><mod>mode</mod></f><f n="README" o="root" g="wheel" p="33188"><mod>mode</mod></f><f n="syntax" o="root" g="wheel" p="16877"><f n="taskdata.vim" o="root" g="wheel" p="33188"><mod>mode</mod></f><f n="taskedit.vim" o="root" g="wheel" p="33188"><mod>mode</mod></f><f n="taskrc.vim" o="root" g="wheel" p="33188"><mod>mode</mod></f><mod>mode</mod></f><mod>mode</mod></f><f n="zsh" o="root" g="wheel" p="16877"><f n="_task" o="root" g="wheel" p="33188"><mod>mode</mod></f><mod>mode</mod></f><mod>mode</mod><mod>owner</mod></f><mod>mode</mod><mod>owner</mod></f><mod>mode</mod><mod>owner</mod></f><f n="man" o="root" g="wheel" p="16877"><f n="man1" o="root" g="wheel" p="16877"><f n="task.1" o="root" g="wheel" p="33188"><mod>mode</mod></f><mod>mode</mod></f><f n="man5" o="root" g="wheel" p="16877"><f n="task-color.5" o="root" g="wheel" p="33188"><mod>mode</mod></f><f n="task-faq.5" o="root" g="wheel" p="33188"><mod>mode</mod></f><f n="task-tutorial.5" o="root" g="wheel" p="33188"><mod>mode</mod></f><f n="taskrc.5" o="root" g="wheel" p="33188"><mod>mode</mod></f><mod>mode</mod></f><mod>mode</mod></f><mod>mode</mod><mod>owner</mod></f><mod>owner</mod></f></pkg-contents>

View File

@@ -0,0 +1 @@
<pkgref spec="1.12" uuid="3BCF9CAB-ED33-4182-AC52-29B9F8FF9B87"><config><identifier>com.beckingham.task190.local.pkg</identifier><version>2.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom>/Users/paul/task-1.9.0.git/package-config/osx/local</installFrom><installTo mod="true" relocatable="true">/usr/local</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo.path</mod><mod>version</mod><mod>parent</mod><mod>installTo</mod><mod>relocatable</mod></config><contents><file-list>01local-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.9.0</title><build>/Users/paul/Desktop/task-1.9.0-sl.pkg</build><organization>com.beckingham</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true" system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Task 1.9.0 install for Snow Leopard.</description><contents><choice title="local" id="choice36" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.beckingham.task190.local.pkg"/></choice></contents><resources bg-scale="proportional" bg-align="center"><locale lang="en"><resource mod="true" type="license">/Users/paul/task-1.9.0.git/package-config/osx/COPYING.txt</resource><resource mod="true" type="welcome">/Users/paul/task-1.9.0.git/package-config/osx/README.txt</resource></locale></resources><requirements><requirement id="tosv" operator="ge" value="'10.6.0'"><message>Task requires Mac OSX 10.6.0 (Snow Leopard) or later.</message></requirement></requirements><flags/><item type="file">01local.xml</item><mod>properties.title</mod><mod>properties.customizeOption</mod><mod>description</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>

30
package-config/osx/update Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
mkdir -p local/bin
mkdir -p local/share/doc/task/scripts/bash
mkdir -p local/share/doc/task/scripts/vim/ftdetect
mkdir -p local/share/doc/task/scripts/vim/syntax
mkdir -p local/share/doc/task/scripts/zsh
mkdir -p local/share/man/man1
mkdir -p local/share/man/man5
cp ../../README README.txt
cp ../../COPYING COPYING.txt
cp ../../src/task local/bin/
cp ../../AUTHORS local/share/doc/task/
cp ../../ChangeLog local/share/doc/task/
cp ../../COPYING local/share/doc/task/
cp ../../NEWS local/share/doc/task/
cp ../../README local/share/doc/task/
cp ../../scripts/bash/* local/share/doc/task/scripts/bash
cp ../../scripts/vim/README local/share/doc/task/scripts/vim
cp ../../scripts/vim/ftdetect/* local/share/doc/task/scripts/vim/ftdetect
cp ../../scripts/vim/syntax/* local/share/doc/task/scripts/vim/syntax
cp ../../scripts/zsh/* local/share/doc/task/scripts/zsh
cp ../../doc/man/*.1 local/share/man/man1
cp ../../doc/man/*.5 local/share/man/man5

View File

@@ -0,0 +1,82 @@
task (1.8.5-1ubuntu2) karmic; urgency=low
* Fixed wrong ChangeLog file
-- Federico Hernandez <ultrafredde@gmail.com> Sat, 05 Dec 2009 23:58:36 +0100
task (1.8.5-1ubuntu1) karmic; urgency=low
* Initial deb package for task bugfix release 1.8.5
-- Federico Hernandez <ultrafredde@gmail.com> Sat, 05 Dec 2009 23:56:36 +0100
task (1.8.4-1ubuntu1) karmic; urgency=low
* Initial deb package for task bugfix release 1.8.4 on karmic koala
-- Federico Hernandez <ultrafredde@gmail.com> Tue, 17 Nov 2009 13:12:28 +0100
task (1.8.3-1ubuntu1) karmic; urgency=low
* Initial deb package for task bugfix release 1.8.3 on karmic koala
-- Federico Hernandez <ultrafredde@gmail.com> Sat, 31 Oct 2009 22:45:10 +0100
task (1.8.3-0ubuntu1) jaunty; urgency=low
* Initial deb package for task bugfix release 1.8.3
-- Federico Hernandez <ultrafredde@gmail.com> Wed, 21 Oct 2009 23:22:25 +0200
task (1.8.2-0ubuntu1) jaunty; urgency=low
* Initial deb package for task bugfix release 1.8.2
-- Federico Hernandez <ultrafredde@gmail.com> Mon, 07 Sep 2009 11:35:22 +0200
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.3
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,60 @@
This package was debianized by:
Federico Hernandez <ultrafredde@gmail.com> on Sat, 05 Dec 2009 23:58:36 +0100
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
Cory Donnelly
Copyright:
Copyright 2006 - 2010, Paul Beckingham
Copyright 2009 - 2010 Federico Hernandez
Copyright 2009 - 2010 John Florian
Copyright 2009 P.C. Shyamshankar
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 - 2010, 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.5
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

@@ -0,0 +1,127 @@
# bash completion support for task
#
# Copyright 2009-2010 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

59
scripts/vim/README Normal file
View File

@@ -0,0 +1,59 @@
Configure VIM for Syntax Highlighting of Task Data
The task data files (pending.data, completed.data and undo.data),
configuration file (.taskrc) 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
~/.vim/syntax/taskrc.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 four above mentioned files are
Copyright 2009-2010 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,22 @@
" Vim support file to detect Task Warrior data and configuration files and
" single task edits
"
" Maintainer: John Florian <jflorian@doubledog.org>
" Updated: Thu Dec 10 18:28:26 EST 2009
"
" Copyright 2009-2010 John Florian
"
" This file is available under the GNU Public License version 2 or later.
" For the full text of this license, see COPYING.
" Task Warrior data files
au BufRead,BufNewFile {pending,completed,undo}.data set filetype=taskdata
" Task Warrior configuration file
au BufRead,BufNewFile .taskrc set filetype=taskrc
" Task Warrior handling of '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-2010 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-2010 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

View File

@@ -0,0 +1,52 @@
" Vim syntax file
" Language: support for editing task configuration file
" Maintainer: John Florian <jflorian@doubledog.org>
" Updated: Sat Feb 20 14:14:44 EST 2010
"
" Copyright 2009-2010 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 taskrcVal ".\{-}$" contains=taskrcComment
syn match taskrcEqual "="
syn match taskrcKey "^\s*.\{-}="he=e-1 contains=taskrcEqual
syn keyword taskrcGoodKey locking curses confirmation next bulk nag weekstart displayweeknumber defaultwidth editor monthsperline annotations _forcecolor blanklines debug hooks fontunderline
syn match taskrcGoodKey "\(active\|tag\|recurrence\)\.indicator"
syn match taskrcGoodKey "alias\.\S\{-}="he=e-1
syn match taskrcGoodKey "calendar\.\(legend\|holidays\|details\(\.report\)\?\)"
syn match taskrcGoodKey "color\(\.\(alternate\|overdue\|due\(\.today\)\?\|pri\.\([HML]\|none\)\|active\|tagged\|recurring\|header\|footnote\|\(\(tag\|project\|keyword\)\.\S\{-}\)\|debug\|\(calendar\.\(today\|due\(\.today\)\?\|overdue\|weekend\|holiday\|weeknumber\)\)\)\)\?="he=e-1
syn match taskrcGoodKey "complete\.all\.\(projects\|tags\)"
syn match taskrcGoodKey "data\.location"
syn match taskrcGoodKey "dateformat\(\.\(holiday\|report\)\)\?"
syn match taskrcGoodKey "default\.\(command\|project\|priority\)"
syn match taskrcGoodKey "due="he=e-1
syn match taskrcGoodKey "echo\.command"
syn match taskrcGoodKey "import\.synonym\.\(bg\|description\|due\|end\|entry\|fg\|id\|priority\|project\|recur\|start\|status\|tags\|uuid\)"
syn match taskrcGoodKey "report\.\S\{-}\.\(description\|columns\|labels\|sort\|filter\|dateformat\|annotations\)="he=e-1
syn match taskrcGoodKey "search\.case\.sensitive"
syn match taskrcGoodKey "shadow\.\(file\|command\|notify\)"
syn match taskrcGoodKey "shell\.prompt"
syn match taskrcComment "#.*$"
" The default methods for highlighting. Can be overridden later.
hi def link taskrcComment Comment
hi def link taskrcKey Statement
hi def link taskrcVal String
hi def link taskrcGoodKey Function
let b:current_syntax = "taskrc"
" vim:noexpandtab

62
scripts/zsh/_task Normal file
View File

@@ -0,0 +1,62 @@
#compdef task
#
# This script is currently unmaintained and was released for an earlier version
# of task. We welcome any zsh user that wants to contribute to task to take a
# look at this script and either confirm its working status or improve it.
# Please contact us at support@taskwarrior.org if you have further questions on
# how to contribute to 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 _commands))
_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
}

1
src/.gitignore vendored
View File

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

785
src/API.cpp Normal file
View File

@@ -0,0 +1,785 @@
////////////////////////////////////////////////////////////////////////////////
// Task Lua API
//
// Copyright 2006 - 2010, 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
//
// -------------
//
// Copyright © 19942008 Lua.org, PUC-Rio.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream> // TODO Remove
#include <algorithm>
#include "Context.h"
#include "API.h"
extern Context context;
Task* the_task = NULL;
#ifdef HAVE_LIBLUA
////////////////////////////////////////////////////////////////////////////////
// Returns a string representing the task version number, such as '1.9.0'.
static int api_task_version (lua_State* L)
{
lua_pushstring (L, PACKAGE_VERSION);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
// Returns a string representing the Lua version number, such as '5.1.4'.
// Lua 5.2.0 has a 'lua_version' call, but 5.1.4 is the target.
static int api_task_lua_version (lua_State* L)
{
// Convert "Lua 5.1.4" -> "5.1.4"
std::string ver = LUA_RELEASE;
lua_pushstring (L, ver.substr (4, std::string::npos).c_str ());
return 1;
}
////////////////////////////////////////////////////////////////////////////////
// Returns the type of OS that task is running on.
static int api_task_os (lua_State* L)
{
#if defined (DARWIN)
lua_pushstring (L, "darwin");
#elif defined (SOLARIS)
lua_pushstring (L, "solaris");
#elif defined (CYGWIN)
lua_pushstring (L, "cygwin");
#elif defined (OPENBSD)
lua_pushstring (L, "openbsd");
#elif defined (HAIKU)
lua_pushstring (L, "haiku");
#elif defined (FREEBSD)
lua_pushstring (L, "freebsd");
#elif defined (LINUX)
lua_pushstring (L, "linux");
#else
lua_pushstring (L, "unknown");
#endif
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_feature (lua_State* L)
{
std::string name = luaL_checkstring (L, 1);
bool value = false;
if (name == "readline")
{
#ifdef HAVE_READLINE
value = true;
#endif
}
else if (name == "ncurses")
{
#ifdef HAVE_NCURSES
value = true;
#endif
}
else if (name == "lua")
value = true;
lua_pushboolean (L, value ? 1 : 0);
return 1;
}
/*
////////////////////////////////////////////////////////////////////////////////
static int api_task_aliases ()
{
return {};
}
*/
////////////////////////////////////////////////////////////////////////////////
// Returns values from .taskrc, by name.
static int api_task_get_config (lua_State* L)
{
std::string name = luaL_checkstring (L, 1);
lua_pushstring (L, context.config.get (name).c_str ());
return 1;
}
/*
////////////////////////////////////////////////////////////////////////////////
-- Temporarily sets .taskrc values, by name.
static int api_task_set_config (name, value)
{
}
////////////////////////////////////////////////////////////////////////////////
-- Returns an internationalized string, by string ID, from the appropriate
-- locale-based strings file.
static int api_task_i18n_string (id)
{
return "le foo"
}
////////////////////////////////////////////////////////////////////////////////
-- Returns a list of tips, from the appropriate locale-based tips file.
static int api_task_i18n_tips ()
{
return {}
}
////////////////////////////////////////////////////////////////////////////////
-- Returns the name of the current command.
static int api_task_get_command ()
{
return "list"
}
////////////////////////////////////////////////////////////////////////////////
-- Returns a list of string messages generated so far.
static int api_task_get_header_messages ()
{
return {}
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_footnote_messages ()
{
return {}
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_debug_messages ()
{
return {}
}
////////////////////////////////////////////////////////////////////////////////
-- Records additional messages, for subsequent display.
static int api_task_header_message (text)
{
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_footnote_message (text)
{
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_debug_message (text)
{
}
*/
////////////////////////////////////////////////////////////////////////////////
// Causes the shell or interactive mode task to exit. Ordinarily this does not
// occur.
static int api_task_exit (lua_State* L)
{
// TODO Is this the correct exception? How does the shell handle this?
throw std::string ("Exiting.");
return 0;
}
/*
////////////////////////////////////////////////////////////////////////////////
-- Shuts off the hook system for any subsequent hook calls for this command.
static int api_task_inhibit_further_hooks ()
{
}
////////////////////////////////////////////////////////////////////////////////
-- Returns a table that contains a complete copy of the task.
static int api_task_get (lua_State* L)
{
return 1;
}
////////////////////////////////////////////////////////////////////////////////
-- Creates a new task from the data specified in the table t.
static int api_task_add (t)
{
}
////////////////////////////////////////////////////////////////////////////////
-- Modifies the task described in the table t.
static int api_task_modify (t)
{
}
*/
////////////////////////////////////////////////////////////////////////////////
// -- 'id' is the task id passed to the hook function. Date attributes are
// -- returned as a numeric epoch offset. Tags and annotations are returned
// -- as tables. A nil value indicates a missing value.
static int api_task_get_uuid (lua_State* L)
{
if (the_task != NULL)
lua_pushstring (L, the_task->get ("uuid").c_str ());
else
lua_pushnil (L);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_description (lua_State* L)
{
if (the_task != NULL)
lua_pushstring (L, the_task->get ("description").c_str ());
else
lua_pushnil (L);
return 1;
}
/*
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_annotations (id)
{
return task.annotations
}
*/
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_project (lua_State* L)
{
if (the_task != NULL)
lua_pushstring (L, the_task->get ("project").c_str ());
else
lua_pushnil (L);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_priority (lua_State* L)
{
if (the_task != NULL)
lua_pushstring (L, the_task->get ("priority").c_str ());
else
lua_pushnil (L);
return 1;
}
/*
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_tags (id)
{
return task.tags
}
*/
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_status (lua_State* L)
{
if (the_task != NULL)
lua_pushstring (L, Task::statusToText (the_task->getStatus ()).c_str ());
else
lua_pushnil (L);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_due (lua_State* L)
{
if (the_task != NULL)
{
unsigned int value = (unsigned int) the_task->get_ulong ("due");
if (value)
{
lua_pushinteger (L, value);
return 1;
}
}
lua_pushnil (L);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_entry (lua_State* L)
{
if (the_task != NULL)
{
unsigned int value = (unsigned int) the_task->get_ulong ("entry");
if (value)
{
lua_pushinteger (L, value);
return 1;
}
}
lua_pushnil (L);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_start (lua_State* L)
{
if (the_task != NULL)
{
unsigned int value = (unsigned int) the_task->get_ulong ("start");
if (value)
{
lua_pushinteger (L, value);
return 1;
}
}
lua_pushnil (L);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_end (lua_State* L)
{
if (the_task != NULL)
{
unsigned int value = (unsigned int) the_task->get_ulong ("end");
if (value)
{
lua_pushinteger (L, value);
return 1;
}
}
lua_pushnil (L);
return 1;
}
/*
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_recur (id)
{
return task.recur
}
*/
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_until (lua_State* L)
{
if (the_task != NULL)
{
unsigned int value = (unsigned int) the_task->get_ulong ("until");
if (value)
{
lua_pushinteger (L, value);
return 1;
}
}
lua_pushnil (L);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_get_wait (lua_State* L)
{
if (the_task != NULL)
{
unsigned int value = (unsigned int) the_task->get_ulong ("wait");
if (value)
{
lua_pushinteger (L, value);
return 1;
}
}
lua_pushnil (L);
return 1;
}
/*
////////////////////////////////////////////////////////////////////////////////
-- 'id' is the task id passed to the hook function. Date attributes are
-- expected as numeric epoch offsets. Tags and annotations are expected
-- as tables. A nil value indicates a missing value.
static int api_task_set_description (id, value)
{
task.description = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_annotations (id, value)
{
task.annotations = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_project (id, value)
{
task.project = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_priority (id, value)
{
task.priority = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_tags (id, value)
{
task.tags = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_status (id, value)
{
task.status = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_due (id, value)
{
task.due_date = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_start (id, value)
{
task.start_date = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_recur (id, value)
{
task.recur = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_until (id, value)
{
task.until_date = value
}
////////////////////////////////////////////////////////////////////////////////
static int api_task_set_wait (id, value)
{
task.wait_date = value
}
*/
////////////////////////////////////////////////////////////////////////////////
API::API ()
: L (NULL)
{
}
////////////////////////////////////////////////////////////////////////////////
API::~API ()
{
if (L)
{
lua_close (L);
L = NULL;
}
}
////////////////////////////////////////////////////////////////////////////////
void API::initialize ()
{
// Initialize Lua.
L = lua_open ();
luaL_openlibs (L); // TODO Error handling
// Register all the API functions in Lua global space.
lua_pushcfunction (L, api_task_version); lua_setglobal (L, "task_version");
lua_pushcfunction (L, api_task_lua_version); lua_setglobal (L, "task_lua_version");
lua_pushcfunction (L, api_task_os); lua_setglobal (L, "task_os");
lua_pushcfunction (L, api_task_feature); lua_setglobal (L, "task_feature");
/*
lua_pushcfunction (L, api_task_aliases); lua_setglobal (L, "task_aliases");
*/
lua_pushcfunction (L, api_task_get_config); lua_setglobal (L, "task_get_config");
/*
lua_pushcfunction (L, api_task_set_config); lua_setglobal (L, "task_set_config");
lua_pushcfunction (L, api_task_i18n_string); lua_setglobal (L, "task_i18n_string");
lua_pushcfunction (L, api_task_i18n_tips); lua_setglobal (L, "task_i18n_tips");
lua_pushcfunction (L, api_task_get_command); lua_setglobal (L, "task_get_command");
lua_pushcfunction (L, api_task_get_header_messages); lua_setglobal (L, "task_get_header_messages");
lua_pushcfunction (L, api_task_get_footnote_messages); lua_setglobal (L, "task_get_footnote_messages");
lua_pushcfunction (L, api_task_get_debug_messages); lua_setglobal (L, "task_get_debug_messages");
lua_pushcfunction (L, api_task_header_message); lua_setglobal (L, "task_header_message");
lua_pushcfunction (L, api_task_footnote_message); lua_setglobal (L, "task_footnote_message");
lua_pushcfunction (L, api_task_debug_message); lua_setglobal (L, "task_debug_message");
*/
lua_pushcfunction (L, api_task_exit); lua_setglobal (L, "task_exit");
/*
lua_pushcfunction (L, api_task_inhibit_further_hooks); lua_setglobal (L, "task_inhibit_further_hooks");
lua_pushcfunction (L, api_task_get); lua_setglobal (L, "task_get");
lua_pushcfunction (L, api_task_add); lua_setglobal (L, "task_add");
lua_pushcfunction (L, api_task_modify); lua_setglobal (L, "task_modify");
*/
lua_pushcfunction (L, api_task_get_uuid); lua_setglobal (L, "task_get_uuid");
lua_pushcfunction (L, api_task_get_description); lua_setglobal (L, "task_get_description");
/*
lua_pushcfunction (L, api_task_get_annotations); lua_setglobal (L, "task_get_annotations");
*/
lua_pushcfunction (L, api_task_get_project); lua_setglobal (L, "task_get_project");
lua_pushcfunction (L, api_task_get_priority); lua_setglobal (L, "task_get_priority");
/*
lua_pushcfunction (L, api_task_get_tags); lua_setglobal (L, "task_get_tags");
*/
lua_pushcfunction (L, api_task_get_status); lua_setglobal (L, "task_get_status");
lua_pushcfunction (L, api_task_get_due); lua_setglobal (L, "task_get_due");
lua_pushcfunction (L, api_task_get_entry); lua_setglobal (L, "task_get_entry");
lua_pushcfunction (L, api_task_get_start); lua_setglobal (L, "task_get_start");
lua_pushcfunction (L, api_task_get_end); lua_setglobal (L, "task_get_end");
/*
lua_pushcfunction (L, api_task_get_recur); lua_setglobal (L, "task_get_recur");
*/
lua_pushcfunction (L, api_task_get_until); lua_setglobal (L, "task_get_until");
lua_pushcfunction (L, api_task_get_wait); lua_setglobal (L, "task_get_wait");
/*
lua_pushcfunction (L, api_task_set_description); lua_setglobal (L, "task_set_description");
lua_pushcfunction (L, api_task_set_annotations); lua_setglobal (L, "task_set_annotations");
lua_pushcfunction (L, api_task_set_project); lua_setglobal (L, "task_set_project");
lua_pushcfunction (L, api_task_set_priority); lua_setglobal (L, "task_set_priority");
lua_pushcfunction (L, api_task_set_tags); lua_setglobal (L, "task_set_tags");
lua_pushcfunction (L, api_task_set_status); lua_setglobal (L, "task_set_status");
lua_pushcfunction (L, api_task_set_due); lua_setglobal (L, "task_set_due");
lua_pushcfunction (L, api_task_set_start); lua_setglobal (L, "task_set_start");
lua_pushcfunction (L, api_task_set_recur); lua_setglobal (L, "task_set_recur");
lua_pushcfunction (L, api_task_set_until); lua_setglobal (L, "task_set_until");
lua_pushcfunction (L, api_task_set_wait); lua_setglobal (L, "task_set_wait");
*/
}
////////////////////////////////////////////////////////////////////////////////
bool API::callProgramHook (
const std::string& file,
const std::string& function)
{
loadFile (file);
// Get function.
lua_getglobal (L, function.c_str ());
if (!lua_isfunction (L, -1))
{
lua_pop (L, 1);
throw std::string ("The Lua function '") + function + "' was not found.";
}
// Make call.
if (lua_pcall (L, 0, 2, 0) != 0)
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1);
// Call successful - get return values.
if (!lua_isnumber (L, -2))
throw std::string ("Error: '") + function + "' did not return a success indicator";
if (!lua_isstring (L, -1) && !lua_isnil (L, -1))
throw std::string ("Error: '") + function + "' did not return a message or nil";
int rc = lua_tointeger (L, -2);
const char* message = lua_tostring (L, -1);
if (rc == 0)
{
if (message)
context.footnote (std::string ("Warning: ") + message);
}
else
{
if (message)
throw std::string (message);
}
lua_pop (L, 1);
return rc == 0 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
// TODO No intention of implementing this before task 2.0. Why? Because we
// need to implement a Lua iterator, in C++, to iterate over a std::vector.
bool API::callListHook (
const std::string& file,
const std::string& function,
std::vector <Task>& all)
{
loadFile (file);
// TODO Get function.
// TODO Prepare args.
// TODO Make call.
// TODO Get exit status.
return true;
}
////////////////////////////////////////////////////////////////////////////////
bool API::callTaskHook (
const std::string& file,
const std::string& function,
Task& task)
{
loadFile (file);
// Save the task for reference via the API.
current = task;
// Get function.
lua_getglobal (L, function.c_str ());
if (!lua_isfunction (L, -1))
{
lua_pop (L, 1);
throw std::string ("The Lua function '") + function + "' was not found.";
}
// Prepare args.
lua_pushnumber (L, current.id);
// Expose the task.
the_task = &current;
// Make call.
if (lua_pcall (L, 1, 2, 0) != 0)
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1);
// Hide the task.
the_task = NULL;
// Call successful - get return values.
if (!lua_isnumber (L, -2))
throw std::string ("Error: '") + function + "' did not return a success indicator";
if (!lua_isstring (L, -1) && !lua_isnil (L, -1))
throw std::string ("Error: '") + function + "' did not return a message or nil";
int rc = lua_tointeger (L, -2);
const char* message = lua_tostring (L, -1);
if (rc == 0)
{
if (message)
context.footnote (std::string ("Warning: ") + message);
}
else
{
if (message)
throw std::string (message);
}
lua_pop (L, 1);
return rc == 0 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
bool API::callFieldHook (
const std::string& file,
const std::string& function,
const std::string& name,
std::string& value)
{
loadFile (file);
// Get function.
lua_getglobal (L, function.c_str ());
if (!lua_isfunction (L, -1))
{
lua_pop (L, 1);
throw std::string ("The Lua function '") + function + "' was not found.";
}
// Prepare args.
lua_pushstring (L, name.c_str ());
lua_pushstring (L, value.c_str ());
// Make call.
if (lua_pcall (L, 2, 3, 0) != 0)
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1);
// Call successful - get return values.
if (!lua_isstring (L, -3))
throw std::string ("Error: '") + function + "' did not return a modified value";
if (!lua_isnumber (L, -2))
throw std::string ("Error: '") + function + "' did not return a success indicator";
if (!lua_isstring (L, -1) && !lua_isnil (L, -1))
throw std::string ("Error: '") + function + "' did not return a message or nil";
const char* new_value = lua_tostring (L, -3);
int rc = lua_tointeger (L, -2);
const char* message = lua_tostring (L, -1);
if (rc == 0)
{
// Overwrite with the modified value.
value = new_value;
if (message)
context.footnote (std::string ("Warning: ") + message);
}
else
{
if (message)
throw std::string (message);
}
lua_pop (L, 1);
return rc == 0 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
void API::loadFile (const std::string& file)
{
// If the file is not loaded.
if (std::find (loaded.begin (), loaded.end (), file) == loaded.end ())
{
// Load the file, if possible.
if (luaL_loadfile (L, file.c_str ()) || lua_pcall (L, 0, 0, 0))
throw std::string ("Error: ") + std::string (lua_tostring (L, -1));
// Mark this as loaded, so as to not bother again.
loaded.push_back (file);
}
}
////////////////////////////////////////////////////////////////////////////////
#endif

74
src/API.h Normal file
View File

@@ -0,0 +1,74 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2010, 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_API
#define INCLUDED_API
#include "auto.h"
#ifdef HAVE_LIBLUA
#include <vector>
#include <string>
#include "Task.h"
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
class API
{
public:
API ();
API (const API&);
API& operator= (const API&);
~API ();
void initialize ();
bool callProgramHook (const std::string&, const std::string&);
bool callListHook (const std::string&, const std::string&, std::vector <Task>&);
bool callTaskHook (const std::string&, const std::string&, Task&);
bool callFieldHook (const std::string&, const std::string&, const std::string&, std::string&);
private:
void loadFile (const std::string&);
public:
lua_State* L;
std::vector <std::string> loaded;
// Context for the API.
// std::vector <Task> all;
Task current;
// std::string& name;
// std::string& value;
};
#endif
#endif
////////////////////////////////////////////////////////////////////////////////

817
src/Att.cpp Normal file
View File

@@ -0,0 +1,817 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2010, 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",
"word",
"noword"
};
#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")
{
// TODO Determine whether color abbreviations are supported, and if so,
// modify 'value' here accordingly.
}
else if (name == "due" ||
name == "until" ||
name == "wait")
{
// Validate and convert to epoch.
if (value != "")
value = Date (value, context.config.get ("dateformat")).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 Deprecated - remove.
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" ||
name == "not" || // TODO Verify this.
name == "noword")
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.
bool case_sensitive = context.config.getBoolean ("search.case.sensitive");
// If there are no mods, just perform a straight compare on value.
if (mMod == "")
{
if (!compare (mValue, other.mValue, (bool) case_sensitive))
return false;
}
// has = contains as a substring.
else if (mMod == "has" || mMod == "contains") // TODO i18n
{
if (find (other.mValue, mValue, (bool) case_sensitive) == std::string::npos)
return false;
}
// is = equal. Nop.
else if (mMod == "is" || mMod == "equals") // TODO i18n
{
if (!compare (mValue, other.mValue, (bool) case_sensitive))
return false;
}
// isnt = not equal.
else if (mMod == "isnt" || mMod == "not") // TODO i18n
{
if (compare (mValue, other.mValue, (bool) case_sensitive))
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 (!compare (mValue, other.mValue.substr (0, mValue.length ()), (bool) case_sensitive))
return false;
}
// endswith = last characters must match.
else if (mMod == "endswith" || mMod == "right") // TODO i18n
{
if (other.mValue.length () < mValue.length ())
return false;
if (!compare (mValue, other.mValue.substr (
other.mValue.length () - mValue.length (),
std::string::npos), (bool) case_sensitive))
return false;
}
// hasnt = does not contain as a substring.
else if (mMod == "hasnt") // TODO i18n
{
if (find (other.mValue, mValue, (bool) case_sensitive) != 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"));
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"));
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;
}
}
// word = contains as a substring, with word boundaries.
else if (mMod == "word") // TODO i18n
{
// Fail if the substring is not found.
std::string::size_type sub = find (other.mValue, mValue, (bool) case_sensitive);
if (sub == std::string::npos)
return false;
// Also fail if there is no word boundary at beginning and end.
if (!isWordStart (other.mValue, sub))
return false;
if (!isWordEnd (other.mValue, sub + mValue.length () - 1))
return false;
}
// noword = does not contain as a substring, with word boundaries.
else if (mMod == "noword") // TODO i18n
{
// Fail if the substring is not found.
std::string::size_type sub = find (other.mValue, mValue);
if (sub != std::string::npos &&
isWordStart (other.mValue, sub) &&
isWordEnd (other.mValue, sub + mValue.length () - 1))
{
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;
// ' -> &squot;
// " -> &dquot;
// , -> &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 - 2010, 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
////////////////////////////////////////////////////////////////////////////////

240
src/Cmd.cpp Normal file
View File

@@ -0,0 +1,240 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2010, 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 ("_version");
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_CONFIG, "config"));
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_PREPEND, "prepend"));
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::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 == "_version" ||
command == context.stringtable.get (CMD_CALENDAR, "calendar") ||
command == context.stringtable.get (CMD_COLORS, "colors") ||
command == context.stringtable.get (CMD_CONFIG, "config") ||
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_PREPEND, "prepend") ||
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 - 2010, 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
////////////////////////////////////////////////////////////////////////////////

557
src/Color.cpp Normal file
View File

@@ -0,0 +1,557 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2010, 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 <iomanip>
#include <sstream>
#include <vector>
#include <algorithm>
#include "Color.h"
#include "text.h"
#include "i18n.h"
////////////////////////////////////////////////////////////////////////////////
static struct
{
Color::color_id id;
int string_id;
std::string english_name;
int index; // offset red=3 (therefore fg=33, bg=43)
} allColors[] =
{
// Color.h enum i18n.h English Index
{ Color::nocolor, 0, "none", 0},
{ Color::black, CCOLOR_BLACK, "black", 1}, // fg 29+0 bg 39+0
{ Color::red, CCOLOR_RED, "red", 2},
{ Color::green, CCOLOR_GREEN, "green", 3},
{ Color::yellow, CCOLOR_YELLOW, "yellow", 4},
{ Color::blue, CCOLOR_BLUE, "blue", 5},
{ Color::magenta, CCOLOR_MAGENTA, "magenta", 6},
{ Color::cyan, CCOLOR_CYAN, "cyan", 7},
{ Color::white, CCOLOR_WHITE, "white", 8},
};
#define NUM_COLORS (sizeof (allColors) / sizeof (allColors[0]))
////////////////////////////////////////////////////////////////////////////////
Color::Color ()
: value (0)
{
}
////////////////////////////////////////////////////////////////////////////////
Color::Color (const Color& other)
{
value = other.value;
}
////////////////////////////////////////////////////////////////////////////////
Color::Color (unsigned int c)
: value (0)
{
if (!(c & _COLOR_HASFG)) value &= ~_COLOR_FG;
if (!(c & _COLOR_HASBG)) value &= ~_COLOR_BG;
value = c & (_COLOR_256 | _COLOR_HASBG | _COLOR_HASFG |_COLOR_UNDERLINE |
_COLOR_BOLD | _COLOR_BRIGHT | _COLOR_BG | _COLOR_FG);
}
////////////////////////////////////////////////////////////////////////////////
// Supports the following constructs:
// [bright] [color] [on color] [bright] [underline]
//
// Where [color] is one of:
// black
// red
// ...
// grayN 0 <= N <= 23 fg 38;5;232 + N bg 48;5;232 + N
// greyN 0 <= N <= 23 fg 38;5;232 + N bg 48;5;232 + N
// colorN 0 <= N <= 255 fg 38;5;N bg 48;5;N
// rgbRGB 0 <= R,G,B <= 5 fg 38;5;16 + R*36 + G*6 + B bg 48;5;16 + R*36 + G*6 + B
Color::Color (const std::string& spec)
: value (0)
{
// By converting underscores to spaces, we inherently support the old "on_red"
// style of specifying background colors. We consider underscores to be
// deprecated.
std::string modifiable_spec = spec;
std::replace (modifiable_spec.begin (), modifiable_spec.end (), '_', ' ');
// Split spec into words.
std::vector <std::string> words;
split (words, modifiable_spec, ' ');
// Construct the color as two separate colors, then blend them later. This
// make it possible to declare a color such as "color1 on black", and have
// the upgrade work properly.
unsigned int fg_value = 0;
unsigned int bg_value = 0;
bool bg = false;
int index;
std::string word;
std::vector <std::string>::iterator it;
for (it = words.begin (); it != words.end (); ++it)
{
word = lowerCase (trim (*it));
if (word == "bold") fg_value |= _COLOR_BOLD;
else if (word == "bright") bg_value |= _COLOR_BRIGHT;
else if (word == "underline") fg_value |= _COLOR_UNDERLINE;
else if (word == "on") bg = true;
// X where X is one of black, red, blue ...
else if ((index = find (word)) != -1)
{
if (bg)
{
bg_value |= _COLOR_HASBG;
bg_value |= index << 8;
}
else
{
fg_value |= _COLOR_HASFG;
fg_value |= index;
}
}
// greyN/grayN, where 0 <= N <= 23.
else if (word.substr (0, 4) == "grey" ||
word.substr (0, 4) == "gray")
{
index = atoi (word.substr (4).c_str ());
if (index < 0 || index > 23)
throw std::string ("The color '") + *it + "' is not recognized.";
if (bg)
{
bg_value |= _COLOR_HASBG;
bg_value |= (index + 232) << 8;
bg_value |= _COLOR_256;
}
else
{
fg_value |= _COLOR_HASFG;
fg_value |= index + 232;
fg_value |= _COLOR_256;
}
}
// rgbRGB, where 0 <= R,G,B <= 5.
else if (word.substr (0, 3) == "rgb")
{
index = atoi (word.substr (3).c_str ());
if (word.length () != 6 ||
index < 0 || index > 555)
throw std::string ("The color '") + *it + "' is not recognized.";
int r = atoi (word.substr (3, 1).c_str ());
int g = atoi (word.substr (4, 1).c_str ());
int b = atoi (word.substr (5, 1).c_str ());
if (r < 0 || r > 5 ||
g < 0 || g > 5 ||
b < 0 || b > 5)
throw std::string ("The color '") + *it + "' is not recognized.";
index = 16 + r*36 + g*6 + b;
if (bg)
{
bg_value |= _COLOR_HASBG;
bg_value |= index << 8;
bg_value |= _COLOR_256;
}
else
{
fg_value |= _COLOR_HASFG;
fg_value |= index;
fg_value |= _COLOR_256;
}
}
// colorN, where 0 <= N <= 255.
else if (word.substr (0, 5) == "color")
{
index = atoi (word.substr (5).c_str ());
if (index < 0 || index > 255)
throw std::string ("The color '") + *it + "' is not recognized.";
upgrade ();
if (bg)
{
bg_value |= _COLOR_HASBG;
bg_value |= index << 8;
bg_value |= _COLOR_256;
}
else
{
fg_value |= _COLOR_HASFG;
fg_value |= index;
fg_value |= _COLOR_256;
}
}
else if (word != "")
throw std::string ("The color '") + *it + "' is not recognized.";
}
// Now combine the fg and bg into a single color.
value = fg_value;
blend (Color (bg_value));
}
////////////////////////////////////////////////////////////////////////////////
Color::Color (color_id fg)
: value (0)
{
if (fg != Color::nocolor)
{
value |= _COLOR_HASFG;
value |= fg;
}
}
////////////////////////////////////////////////////////////////////////////////
Color::Color (color_id fg, color_id bg)
: value (0)
{
if (bg != Color::nocolor)
{
value |= _COLOR_HASBG;
value |= (bg << 8);
}
if (fg != Color::nocolor)
{
value |= _COLOR_HASFG;
value |= fg;
}
}
////////////////////////////////////////////////////////////////////////////////
Color::Color (color_id fg, color_id bg, bool underline, bool bold, bool bright)
: value (0)
{
value |= ((underline ? 1 : 0) << 18)
| ((bold ? 1 : 0) << 17)
| ((bright ? 1 : 0) << 16);
if (bg != Color::nocolor)
{
value |= _COLOR_HASBG;
value |= (bg << 8);
}
if (fg != Color::nocolor)
{
value |= _COLOR_HASFG;
value |= fg;
}
}
////////////////////////////////////////////////////////////////////////////////
Color::~Color ()
{
}
////////////////////////////////////////////////////////////////////////////////
Color& Color::operator= (const Color& other)
{
if (this != &other)
value = other.value;
return *this;
}
////////////////////////////////////////////////////////////////////////////////
Color::operator std::string () const
{
std::string description;
if (value & _COLOR_BOLD) description += "bold";
if (value & _COLOR_UNDERLINE)
description += std::string (description.length () ? " " : "") + "underline";
if (value & _COLOR_HASFG)
description += std::string (description.length () ? " " : "") + fg ();
if (value & _COLOR_HASBG)
{
description += std::string (description.length () ? " " : "") + "on";
if (value & _COLOR_BRIGHT)
description += std::string (description.length () ? " " : "") + "bright";
description += " " + bg ();
}
return description;
}
////////////////////////////////////////////////////////////////////////////////
Color::operator int () const
{
return (int) value;
}
////////////////////////////////////////////////////////////////////////////////
// If 'other' has styles that are compatible, merge them into this. Colors in
// other take precedence.
void Color::blend (const Color& other)
{
Color c (other);
value |= (c.value & _COLOR_UNDERLINE); // Always inherit underline.
// 16 <-- 16.
if (!(value & _COLOR_256) &&
!(c.value & _COLOR_256))
{
value |= (c.value & _COLOR_BOLD); // Inherit bold.
value |= (c.value & _COLOR_BRIGHT); // Inherit bright.
if (c.value & _COLOR_HASFG)
{
value |= _COLOR_HASFG; // There is now a color.
value &= ~_COLOR_FG; // Remove previous color.
value |= (c.value & _COLOR_FG); // Apply other color.
}
if (c.value & _COLOR_HASBG)
{
value |= _COLOR_HASBG; // There is now a color.
value &= ~_COLOR_BG; // Remove previous color.
value |= (c.value & _COLOR_BG); // Apply other color.
}
return;
}
// Upgrade either color, if necessary.
if (!(value & _COLOR_256)) upgrade ();
if (!(c.value & _COLOR_256)) c.upgrade ();
// 256 <-- 256.
if (c.value & _COLOR_HASFG)
{
value |= _COLOR_HASFG; // There is now a color.
value &= ~_COLOR_FG; // Remove previous color.
value |= (c.value & _COLOR_FG); // Apply other color.
}
if (c.value & _COLOR_HASBG)
{
value |= _COLOR_HASBG; // There is now a color.
value &= ~_COLOR_BG; // Remove previous color.
value |= (c.value & _COLOR_BG); // Apply other color.
}
}
////////////////////////////////////////////////////////////////////////////////
void Color::upgrade ()
{
if (!(value & _COLOR_256))
{
if (value & _COLOR_HASFG)
{
bool bold = value & _COLOR_BOLD;
unsigned int fg = value & _COLOR_FG;
value &= ~_COLOR_FG;
value &= ~_COLOR_BOLD;
value |= (bold ? fg + 7 : fg - 1);
}
if (value & _COLOR_HASBG)
{
bool bright = value & _COLOR_BRIGHT;
unsigned int bg = (value & _COLOR_BG) >> 8;
value &= ~_COLOR_BG;
value &= ~_COLOR_BRIGHT;
value |= (bright ? bg + 7 : bg - 1) << 8;
}
value |= _COLOR_256;
}
}
////////////////////////////////////////////////////////////////////////////////
// Sample color codes:
// red \033[31m
// bold red \033[91m
// underline red \033[4;31m
// bold underline red \033[1;4;31m
//
// on red \033[41m
// on bright red \033[101m
//
// 256 fg \033[38;5;Nm
// 256 bg \033[48;5;Nm
std::string Color::colorize (const std::string& input)
{
if (value == 0)
return input;
int count = 0;
std::stringstream result;
// 256 color
if (value & _COLOR_256)
{
bool needTerminator = false;
if (value & _COLOR_UNDERLINE)
{
result << "\033[4m";
needTerminator = true;
}
if (value & _COLOR_HASFG)
{
result << "\033[38;5;" << (value & _COLOR_FG) << "m";
needTerminator = true;
}
if (value & _COLOR_HASBG)
{
result << "\033[48;5;" << ((value & _COLOR_BG) >> 8) << "m";
needTerminator = true;
}
result << input;
if (needTerminator)
result << "\033[0m";
return result.str ();
}
// 16 color
if (value != 0)
{
result << "\033[";
if (value & _COLOR_BOLD)
{
if (count++) result << ";";
result << "1";
}
if (value & _COLOR_UNDERLINE)
{
if (count++) result << ";";
result << "4";
}
if (value & _COLOR_HASFG)
{
if (count++) result << ";";
result << (29 + (value & _COLOR_FG));
}
if (value & _COLOR_HASBG)
{
if (count++) result << ";";
result << ((value & _COLOR_BRIGHT ? 99 : 39) + ((value & _COLOR_BG) >> 8));
}
result << "m" << input << "\033[0m";
return result.str ();
}
return input;
}
////////////////////////////////////////////////////////////////////////////////
std::string Color::colorize (const std::string& input, const std::string& spec)
{
Color c (spec);
return c.colorize (input);
}
////////////////////////////////////////////////////////////////////////////////
bool Color::nontrivial ()
{
return value != 0 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
int Color::find (const std::string& input)
{
for (unsigned int i = 0; i < NUM_COLORS; ++i)
if (allColors[i].english_name == input)
return (int) i;
return -1;
}
////////////////////////////////////////////////////////////////////////////////
std::string Color::fg () const
{
int index = value & _COLOR_FG;
if (value & _COLOR_256)
{
if (value & _COLOR_HASFG)
{
std::stringstream s;
s << "color" << (value & _COLOR_FG);
return s.str ();
}
}
else
{
for (unsigned int i = 0; i < NUM_COLORS; ++i)
if (allColors[i].index == index)
return allColors[i].english_name;
}
return "";
}
////////////////////////////////////////////////////////////////////////////////
std::string Color::bg () const
{
int index = (value & _COLOR_BG) >> 8;
if (value & _COLOR_256)
{
if (value & _COLOR_HASBG)
{
std::stringstream s;
s << "color" << ((value & _COLOR_BG) >> 8);
return s.str ();
}
}
else
{
for (unsigned int i = 0; i < NUM_COLORS; ++i)
if (allColors[i].index == index)
return allColors[i].english_name;
}
return "";
}
////////////////////////////////////////////////////////////////////////////////

78
src/Color.h Normal file
View File

@@ -0,0 +1,78 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2010, 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_COLOR
#define INCLUDED_COLOR
#include <string>
////////////////////////////////////////////////////////////////////////////////
#define _COLOR_256 0x00200000 // 256-color mode.
#define _COLOR_HASBG 0x00100000 // Has background color (all values taken).
#define _COLOR_HASFG 0x00080000 // Has foreground color (all values taken).
#define _COLOR_UNDERLINE 0x00040000 // General underline attribute.
#define _COLOR_BOLD 0x00020000 // 16-color bold attribute.
#define _COLOR_BRIGHT 0x00010000 // 16-color bright background attribute.
#define _COLOR_BG 0x0000FF00 // 8-bit background color index.
#define _COLOR_FG 0x000000FF // 8-bit foreground color index.
class Color
{
public:
enum color_id {nocolor = 0, black, red, green, yellow, blue, magenta, cyan, white};
Color ();
Color (const Color&);
Color (unsigned int); // 256 | UNDERLINE | BOLD | BRIGHT | (BG << 8) | FG
Color (const std::string&); // "red on bright black"
Color (color_id); // fg.
Color (color_id, color_id); // fg, bg.
Color (color_id, color_id, bool, bool, bool); // fg, bg, underline, bold, bright
~Color ();
Color& operator= (const Color&);
operator std::string () const;
operator int () const;
void upgrade ();
void blend (const Color&);
std::string colorize (const std::string&);
static std::string colorize (const std::string&, const std::string&);
bool nontrivial ();
private:
int find (const std::string&);
std::string fg () const;
std::string bg () const;
private:
unsigned int value;
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -27,54 +27,283 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
#include "task.h"
#include "Directory.h"
#include "Date.h"
#include "File.h"
#include "Config.h"
#include "text.h"
#include "util.h"
#include "../auto.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.
// This string is used in two ways:
// 1) It is used to create a new .taskrc file, by copying it directly to disk.
// 2) It is parsed and used as default values for all Config.get calls.
std::string Config::defaults =
"# Task program configuration file.\n"
"# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-faq',\n"
"# 'man task-tutorial', 'man task-color' or 'man taskrc'\n"
"\n"
"# Here is an example of entries that use the default, override and blank values\n"
"# variable=foo -- By specifying a value, this overrides the default\n"
"# variable= -- By specifying no value, this means no default\n"
"# #variable=foo -- By commenting out the line, this uses the default\n"
"\n"
"# Files\n"
"data.location=~/.task\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"
"annotations=full # Level of verbosity for annotations: full, sparse or none\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" // TODO
"search.case.sensitive=yes # Setting to no allows case insensitive searches\n"
"active.indicator=* # What to show as an active task indicator\n"
"tag.indicator=+ # What to show as a tag indicator\n"
"recurrence.indicator=R # What to show as a task recurrence indicator\n"
"\n"
"# Dates\n"
"dateformat=m/d/Y # Preferred input and display date format\n"
"dateformat.holiday=YMD # Preferred input date format for holidays\n"
"dateformat.report=m/d/Y # Preferred display date format for repors\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"
"\n"
"# Calendar controls\n"
"calendar.legend=yes # Display the legend on calendar\n"
"calendar.details=sparse # Calendar shows information for tasks w/due dates: full, sparse or none\n"
"calendar.details.report=list # Report to use when showing task information in cal\n"
"calendar.holidays=none # Show public holidays on calendar:full, sparse or none\n"
"#monthsperline=3 # Number of calendar months on a line\n"
"\n"
"# Color controls.\n"
"color=on # Enable color\n"
"#color.header=bold green # Color of header messages\n"
"#color.footnote=bold green # Color of footnote messages\n"
"color.summary.bar=on green # Color of summary report progress bar\n"
"color.summary.background=on black # Color of summary report background\n"
"color.calendar.today=black on cyan # Color of today in calendar\n"
"color.calendar.due=black on green # Color of days with due tasks in calendar\n"
"color.calendar.due.today=black on magenta # Color of today with due tasks in calendar\n"
"color.calendar.overdue=black on red # Color of days with overdue tasks in calendar\n"
"color.calendar.weekend=bright white on black # Color of weekend days in calendar\n"
"color.calendar.holiday=black on bright yellow # Color of public holidays in calendar\n"
"color.calendar.weeknumber=black on white # Color of the weeknumbers in calendar\n"
"#color.debug=magenta # Color of diagnostic output\n"
"\n"
"# The following rules are presented in their order of precedence.\n"
"# The higher the color rule is up this list, the higher precedence\n"
"# it has in determining the color for the task. Precedence is shown\n"
"# in brackets [1]\n"
"#color.recurring=on red # [1] Color of recur.any: tasks\n"
"color.overdue=bold red # [2] Color of overdue tasks\n"
"color.due.today=bold magenta # [3] Color of tasks due today\n"
"color.due=bold yellow # [4] Color of due tasks\n"
"#color.keyword.car=on blue # [5] Color of description.contains:car tasks\n"
"#color.project.garden=on green # [6] Color of project:garden tasks\n"
"#color.tag.bug=yellow # [7] Color of +bug tasks\n"
"color.active=bold cyan # [8] Color of active tasks\n"
"#color.pri.none=white on blue # [9] Color of priority: tasks\n"
"color.pri.H=bold # [9] Color of priority:H tasks\n"
"#color.pri.M=on yellow # [9] Color of priority:M tasks\n"
"#color.pri.L=on green # [9] Color of priority:L tasks\n"
"color.tagged=yellow # [10] Color of tagged tasks\n"
"#color.alternate=on rgb253 # [11] Alternate color for line coloring\n"
"\n"
"# Shadow file support\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 # Default project for 'add' command\n"
"#default.priority=M # Default priority for 'add' command\n"
"default.command=list # When no arguments are specified\n"
"\n"
"_forcecolor=no # Forces color to be on, even for non TTY output\n"
"blanklines=true # Use more whitespace in output\n"
"complete.all.projects=no # Include old project names in 'projects' command\n" // TODO
"complete.all.tags=no # Include old tag names in 'tags' command\n" // TODO
"debug=no # Display diagnostics\n"
"hooks=off # Hook system master switch\n"
"fontunderline=yes # Uses underlines rather than -------\n"
"shell.prompt=task> # Prompt used by the shell command\n" // TODO
"\n"
"# Import heuristics - alternate names for fields (comma-separated list of names)\n"
"#import.synonym.bg=?\n"
"#import.synonym.description=?\n"
"#import.synonym.due=?\n"
"#import.synonym.end=?\n"
"#import.synonym.entry=?\n"
"#import.synonym.fg=?\n"
"#import.synonym.id=?\n"
"#import.synonym.priority=?\n"
"#import.synonym.project=?\n"
"#import.synonym.recur=?\n"
"#import.synonym.start=?\n"
"#import.synonym.status=?\n"
"#import.synonym.tags=?\n"
"#import.synonym.uuid=?\n"
"\n"
"# Aliases - alternate names for commands\n"
"alias.rm=delete # Alias for the delete command\n"
"\n"
"# Fields: id,uuid,project,priority,priority_long,entry,entry_time,\n" // TODO
"# start,entry_time,due,recur,recurrence_indicator,age,\n" // TODO
"# age_compact,active,tags,tag_indicator,description,\n" // TODO
"# description_only,end,end_time,countdown,countdown_compact\n" // TODO
"# Description: This report is ...\n"
"# Sort: due+,priority-,project+\n"
"# Filter: pro:x pri:H +bug limit:10\n"
"# Dateformat: due date format in reports\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,countdown,age,tags,description\n"
"report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Countdown,Age,Tags,Description\n"
"report.long.sort=due+,priority-,project+\n"
"report.long.filter=status:pending\n"
"#report.long.dateformat=m/d/Y\n"
"#report.long.annotations=full\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"
"#report.list.dateformat=m/d/Y\n"
"#report.list.annotations=full\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"
"#report.ls.dateformat=m/d/Y\n"
"#report.ls.annotations=full\n"
"\n"
"# task minimal\n"
"report.minimal.description=A really minimal listing\n"
"report.minimal.columns=id,project,description\n"
"report.minimal.labels=ID,Project,Description\n"
"report.minimal.sort=project+,description+\n"
"report.minimal.filter=status:pending\n"
"#report.minimal.dateformat=m/d/Y\n"
"#report.minimal.annotations=full\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"
"#report.newest.dateformat=m/d/Y\n"
"#report.newest.annotations=full\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"
"#report.oldest.dateformat=m/d/Y\n"
"#report.oldest.annotations=full\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"
"#report.overdue.dateformat=m/d/Y\n"
"#report.overdue.annotations=full\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"
"#report.active.dateformat=m/d/Y\n"
"#report.active.annotations=full\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"
"#report.completed.dateformat=m/d/Y\n"
"#report.completed.annotations=full\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"
"#report.recurring.dateformat=m/d/Y\n"
"#report.recurring.annotations=full\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"
"#report.waiting.dateformat=m/d/Y\n"
"#report.waiting.annotations=full\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"
"#report.all.dateformat=m/d/Y\n"
"#report.all.annotations=full\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"
"#report.next.dateformat=m/d/Y\n"
"#report.next.annotations=full\n"
"\n";
////////////////////////////////////////////////////////////////////////////////
// DO NOT CALL Config::setDefaults.
//
// This is a default constructor, and as such is only used to:
// a) initialize a default Context constructor
// b) run unit tests
//
// In all real use cases, Config::load is called.
Config::Config ()
{
(*this)["report.long.description"] = "Lists all task, all data, matching the specified criteria";
(*this)["report.long.columns"] = "id,project,priority,entry,start,due,recur,age,tags,description";
(*this)["report.long.labels"] = "ID,Project,Pri,Added,Started,Due,Recur,Age,Tags,Description";
(*this)["report.long.sort"] = "due+,priority-,project+";
(*this)["report.list.description"] = "Lists all tasks matching the specified criteria";
(*this)["report.list.columns"] = "id,project,priority,due,active,age,description";
(*this)["report.list.labels"] = "ID,Project,Pri,Due,Active,Age,Description";
(*this)["report.list.sort"] = "due+,priority-,project+";
(*this)["report.ls.description"] = "Minimal listing of all tasks matching the specified criteria";
(*this)["report.ls.columns"] = "id,project,priority,description";
(*this)["report.ls.labels"] = "ID,Project,Pri,Description";
(*this)["report.ls.sort"] = "priority-,project+";
(*this)["report.newest.description"] = "Shows the newest tasks";
(*this)["report.newest.columns"] = "id,project,priority,due,active,age,description";
(*this)["report.newest.labels"] = "ID,Project,Pri,Due,Active,Age,Description";
(*this)["report.newest.sort"] = "id-";
(*this)["report.newest.limit"] = "10";
(*this)["report.oldest.description"] = "Shows the oldest tasks";
(*this)["report.oldest.columns"] = "id,project,priority,due,active,age,description";
(*this)["report.oldest.labels"] = "ID,Project,Pri,Due,Active,Age,Description";
(*this)["report.oldest.sort"] = "id+";
(*this)["report.oldest.limit"] = "10";
}
////////////////////////////////////////////////////////////////////////////////
Config::Config (const std::string& file)
{
setDefaults ();
load (file);
}
@@ -82,156 +311,128 @@ Config::Config (const std::string& file)
// 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)
//
// Nested files are now supported, with the following construct:
// include /absolute/path/to/file
//
void Config::load (const std::string& file, int nest /* = 1 */)
{
std::ifstream in;
in.open (file.c_str (), std::ifstream::in);
if (in.good ())
if (nest > 10)
throw std::string ("Configuration file nested to more than 10 levels deep"
" - this has to be a mistake.");
// First time in, load the default values.
if (nest == 1)
{
std::string line;
while (getline (in, line))
setDefaults ();
original_file = File (file);
}
// Read the file, then parse the contents.
std::string contents;
if (File::read (file, contents) && contents.length ())
parse (contents, nest);
}
////////////////////////////////////////////////////////////////////////////////
void Config::parse (const std::string& input, int nest /* = 1 */)
{
// Shortcut case for default constructor.
if (input.length () == 0)
return;
// Split the input into lines.
std::vector <std::string> lines;
split (lines, input, "\n");
// Parse each line.
std::vector <std::string>::iterator it;
for (it = lines.begin (); it != lines.end (); ++it)
{
std::string line = *it;
// 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)
{
// Remove comments.
size_type pound = line.find ("#");
if (pound != std::string::npos)
line = line.substr (0, pound);
line = trim (line, " \t");
// Skip empty lines.
if (line.length () > 0)
std::string::size_type equal = line.find ("="); // no i18n
if (equal != std::string::npos)
{
size_type equal = line.find ("=");
if (equal != std::string::npos)
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;
}
else
{
std::string::size_type include = line.find ("include"); // no i18n.
if (include != std::string::npos)
{
std::string key = trim (line.substr (0, equal), " \t");
std::string value = trim (line.substr (equal+1, line.length () - equal), " \t");
(*this)[key] = value;
Path included (trim (line.substr (include + 7), " \t"));
if (included.is_absolute ())
{
if (included.readable ())
this->load (included, nest + 1);
else
throw std::string ("Could not read include file '") + included.data + "'";
}
else
throw std::string ("Can only include files with absolute paths, not '") + included.data + "'";
}
}
}
in.close ();
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
void Config::createDefault (const std::string& home)
{
// Strip trailing slash off home directory, if necessary.
std::string terminatedHome = home;
if (home[home.length () - 1] == '/')
terminatedHome = home.substr (0, home.length () - 1);
// Determine default names of init file and task directory.
std::string rcFile = terminatedHome + "/.taskrc";
std::string dataDir = terminatedHome + "/.task";;
// 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, "confirmation=yes\n");
fprintf (out, "echo.command=yes\n");
fprintf (out, "next=2\n");
fprintf (out, "dateformat=m/d/Y\n");
fprintf (out, "#monthsperline=2\n");
fprintf (out, "curses=on\n");
fprintf (out, "color=on\n");
fprintf (out, "due=7\n");
fprintf (out, "nag=You have higher priority tasks.\n");
fprintf (out, "locking=on\n");
fprintf (out, "color.overdue=bold_red\n");
fprintf (out, "color.due=bold_yellow\n");
fprintf (out, "color.pri.H=bold\n");
fprintf (out, "#color.pri.M=on_yellow\n");
fprintf (out, "#color.pri.L=on_green\n");
fprintf (out, "#color.pri.none=white on_blue\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.garden=on_green\n");
fprintf (out, "#color.keyword.car=on_blue\n");
fprintf (out, "#color.recurring=on_red\n");
fprintf (out, "#shadow.file=%s/shadow.txt\n", dataDir.c_str ());
fprintf (out, "#shadow.command=list\n");
fprintf (out, "#shadow.notify=on\n");
fprintf (out, "#default.project=foo\n");
fprintf (out, "#default.priority=M\n");
fprintf (out, "default.command=list\n");
// Custom reports.
fprintf (out, "# Fields: id,uuid,project,priority,entry,start,due,recur,age,active,tags,description\n");
fprintf (out, "# description_only\n");
fprintf (out, "# Description: This report is ...\n");
fprintf (out, "# Sort: due+,priority-,project+\n");
fprintf (out, "# Filter: pro:x pri:H +bug\n");
fprintf (out, "# Limit: 10\n");
fprintf (out, "report.long.description=Lists all task, all data, matching the specified criteria\n");
fprintf (out, "report.long.columns=id,project,priority,entry,start,due,recur,age,tags,description\n");
fprintf (out, "report.long.sort=due+,priority-,project+\n");
fprintf (out, "report.list.description=Lists all tasks matching the specified criteria\n");
fprintf (out, "report.list.columns=id,project,priority,due,active,age,description\n");
fprintf (out, "report.list.sort=due+,priority-,project+\n");
fprintf (out, "report.ls.description=Minimal listing of all tasks matching the specified criteria\n");
fprintf (out, "report.ls.columns=id,project,priority,description\n");
fprintf (out, "report.ls.sort=priority-,project+\n");
fprintf (out, "report.newest.description=Shows the newest tasks\n");
fprintf (out, "report.newest.columns=id,project,priority,due,active,age,description\n");
fprintf (out, "report.newest.sort=id-\n");
fprintf (out, "report.newest.limit=10\n");
fprintf (out, "report.oldest.description=Shows the oldest tasks\n");
fprintf (out, "report.oldest.columns=id,project,priority,due,active,age,description\n");
fprintf (out, "report.oldest.sort=id+\n");
fprintf (out, "report.oldest.limit=10\n");
fclose (out);
std::cout << "Done." << std::endl;
else
throw std::string ("Malformed entry '") + line + "'";
}
}
}
this->load (rcFile);
if (-1 == access (dataDir.c_str (), F_OK))
mkdir (dataDir.c_str (), S_IRWXU);
}
////////////////////////////////////////////////////////////////////////////////
// Return the configuration value given the specified key.
const std::string Config::get (const char* key)
void Config::createDefaultRC (const std::string& rc, const std::string& data)
{
return this->get (std::string (key));
// Override data.location in the defaults.
std::string::size_type loc = defaults.find ("data.location=~/.task");
// loc+0^ +14^ +21^
Date now;
std::stringstream contents;
contents << "# [Created by "
<< PACKAGE_STRING
<< " "
<< now.toStringWithTime ()
<< "]\n"
<< defaults.substr (0, loc + 14)
<< data
<< defaults.substr (loc + 21);
// Write out the new file.
if (! File::write (rc, contents.str ()))
throw std::string ("Could not write to '") + rc + "'";
}
////////////////////////////////////////////////////////////////////////////////
// Return the configuration value given the specified key. If a default_value
// is present, it will be the returned value in the event of a missing key.
const std::string Config::get (
const char* key,
const char* default_value)
void Config::createDefaultData (const std::string& data)
{
return this->get (std::string (key), std::string (default_value));
Directory d (data);
if (! d.exists ())
d.create ();
}
////////////////////////////////////////////////////////////////////////////////
void Config::setDefaults ()
{
parse (defaults);
}
////////////////////////////////////////////////////////////////////////////////
void Config::clear ()
{
std::map <std::string, std::string>::clear ();
}
////////////////////////////////////////////////////////////////////////////////
@@ -242,56 +443,42 @@ const std::string Config::get (const std::string& key)
}
////////////////////////////////////////////////////////////////////////////////
// Return the configuration value given the specified key. If a default_value
// is present, it will be the returned value in the event of a missing key.
const std::string Config::get (
const std::string& key,
const std::string& default_value)
const int Config::getInteger (const std::string& key)
{
if ((*this).find (key) != (*this).end ())
return (*this)[key];
return atoi ((*this)[key].c_str ());
return default_value;
return 0;
}
////////////////////////////////////////////////////////////////////////////////
bool Config::get (const std::string& key, bool default_value)
const double Config::getReal (const std::string& key)
{
if ((*this).find (key) != (*this).end ())
return atof ((*this)[key].c_str ());
return 0.0;
}
////////////////////////////////////////////////////////////////////////////////
const bool Config::getBoolean (const std::string& key)
{
if ((*this).find (key) != (*this).end ())
{
std::string value = lowerCase ((*this)[key]);
if (value == "t" ||
value == "true" ||
value == "1" ||
value == "yes" ||
value == "on" ||
value == "enable" ||
value == "enabled")
if (value == "t" || // TODO i18n
value == "true" || // TODO i18n
value == "1" || // no i18n
value == "+" || // no i18n
value == "y" || // TODO i18n
value == "yes" || // TODO i18n
value == "on" || // TODO i18n
value == "enable" || // TODO i18n
value == "enabled") // TODO i18n
return true;
return false;
}
return default_value;
}
////////////////////////////////////////////////////////////////////////////////
int Config::get (const std::string& key, const int default_value)
{
if ((*this).find (key) != (*this).end ())
return ::atoi ((*this)[key].c_str ());
return default_value;
}
////////////////////////////////////////////////////////////////////////////////
double Config::get (const std::string& key, const double default_value)
{
if ((*this).find (key) != (*this).end ())
return ::atof ((*this)[key].c_str ());
return default_value;
return false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -325,3 +512,37 @@ void Config::all (std::vector<std::string>& items)
}
////////////////////////////////////////////////////////////////////////////////
std::string Config::checkForDeprecatedColor ()
{
int count = 0;
std::vector <std::string> deprecated;
foreach (i, *this)
{
if (i->first.find ("color.") != std::string::npos)
{
std::string value = get (i->first);
if (value.find ("_") != std::string::npos)
{
++count;
deprecated.push_back (i->first);
}
}
}
std::stringstream out;
if (count)
{
out << "Your .taskrc file contains color settings that use deprecated "
<< "underscores. Please check:"
<< std::endl;
foreach (i, deprecated)
out << " " << *i << "=" << get (*i) << std::endl;
out << std::endl;
}
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -30,6 +30,7 @@
#include <map>
#include <vector>
#include <string>
#include "File.h"
class Config : public std::map <std::string, std::string>
{
@@ -37,20 +38,34 @@ public:
Config ();
Config (const std::string&);
bool load (const std::string&);
void createDefault (const std::string&);
Config (const Config&);
Config& operator= (const Config&);
void load (const std::string&, int nest = 1);
void parse (const std::string&, int nest = 1);
void createDefaultRC (const std::string&, const std::string&);
void createDefaultData (const std::string&);
void setDefaults ();
void clear ();
const std::string get (const std::string&);
const int getInteger (const std::string&);
const double getReal (const std::string&);
const bool getBoolean (const std::string&);
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);
int get (const std::string&, const int);
double get (const std::string&, const double);
void set (const std::string&, const int);
void set (const std::string&, const double);
void set (const std::string&, const std::string&);
void all (std::vector <std::string>&);
std::string checkForDeprecatedColor ();
public:
File original_file;
private:
static std::string defaults;
};
#endif

871
src/Context.cpp Normal file
View File

@@ -0,0 +1,871 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2010, 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 "Directory.h"
#include "File.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 ("")
, file_override ("")
, var_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 ();
// Hook system init, plus post-start event occurring at the first possible
// moment after hook initialization.
hooks.initialize ();
hooks.trigger ("post-start");
}
////////////////////////////////////////////////////////////////////////////////
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.getBoolean ("_forcecolor"))
config.set ("color", "off");
}
if (config.getBoolean ("color"))
initializeColorRules ();
// Load appropriate stringtable as soon after the config file as possible, to
// allow all subsequent messages to be localizable.
Directory location (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.data + "/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 (*path);
}
////////////////////////////////////////////////////////////////////////////////
int Context::run ()
{
int rc;
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.
hooks.trigger ("pre-debug");
if (config.getBoolean ("debug"))
foreach (d, debugMessages)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeDebug (*d) << std::endl;
else
std::cout << *d << std::endl;
hooks.trigger ("post-debug");
// Dump all headers.
hooks.trigger ("pre-header");
foreach (h, headers)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeHeader (*h) << std::endl;
else
std::cout << *h << std::endl;
hooks.trigger ("post-header");
// Dump the report output.
hooks.trigger ("pre-output");
std::cout << output;
hooks.trigger ("post-output");
// Dump all footnotes.
hooks.trigger ("pre-footnote");
foreach (f, footnotes)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeFootnote (*f) << std::endl;
else
std::cout << *f << std::endl;
hooks.trigger ("post-footnote");
hooks.trigger ("pre-exit");
return rc;
}
////////////////////////////////////////////////////////////////////////////////
int Context::dispatch (std::string &out)
{
int rc = 0;
Timer t ("Context::dispatch");
hooks.trigger ("pre-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 == "config") { rc = handleConfig (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 == "prepend") { rc = handlePrepend (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 == "_version") { rc = handleCompletionVersion (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 { hooks.trigger ("pre-usage-command");
rc = shortUsage (out);
hooks.trigger ("post-usage-command"); }
// Only update the shadow file if such an update was not suppressed (shadow),
if (cmd.isWriteCommand () && !inShadow)
shadow ();
hooks.trigger ("post-dispatch");
return rc;
}
////////////////////////////////////////////////////////////////////////////////
void Context::shadow ()
{
// Determine if shadow file is enabled.
File shadowFile (config.get ("shadow.file"));
if (shadowFile.data != "")
{
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");
if (command == "")
command = config.get ("default.command");
split (args, command, ' ');
initialize ();
config.set ("curses", "off");
config.set ("color", "off");
parse ();
std::string result;
(void)dispatch (result);
std::ofstream out (shadowFile.data.c_str ());
if (out.good ())
{
out << result;
out.close ();
}
else
throw std::string ("Could not write file '") + shadowFile.data + "'";
config.set ("curses", oldCurses);
config.set ("color", oldColor);
// Optionally display a notification that the shadow file was updated.
if (config.getBoolean ("shadow.notify"))
footnote (std::string ("[Shadow file '") + shadowFile.data + "' 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;
File rc (home + "/.taskrc");
Directory data (home + "./task");
// Is there an file_override for rc:?
foreach (arg, args)
{
if (*arg == "--")
break;
else if (arg->substr (0, 3) == "rc:")
{
file_override = *arg;
rc = File (arg->substr (3));
home = rc;
std::string::size_type last_slash = rc.data.rfind ("/");
if (last_slash != std::string::npos)
home = rc.data.substr (0, last_slash);
else
home = ".";
args.erase (arg);
header ("Using alternate .taskrc file " + rc.data); // TODO i18n
break;
}
}
// Load rc file.
config.clear (); // Dump current values.
config.load (rc); // Load new file.
if (config.get ("data.location") != "")
data = Directory (config.get ("data.location"));
// Are there any var_overrides for data.location?
foreach (arg, args)
{
if (*arg == "--")
break;
else if (arg->substr (0, 17) == "rc.data.location:" ||
arg->substr (0, 17) == "rc.data.location=")
{
data = Directory (arg->substr (17));
header ("Using alternate data.location " + data.data); // TODO i18n
break;
}
}
// Do we need to create a default rc?
if (! rc.exists ())
{
if (confirm ("A configuration file could not be found in " // TODO i18n
+ home
+ "\n\n"
+ "Would you like a sample "
+ rc.data
+ " 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);
// TODO find out why this was done twice - see tw #355
// 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", or "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.getUntilOneOf (":=", name) &&
n.skipN (1) &&
n.getUntilEOS (value))
{
config.set (name, value);
var_overrides += " " + *arg;
footnote (std::string ("Configuration override ") + // TODO i18n
arg->substr (3));
}
}
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 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));
parseTask.addTag (arg->substr (1));
}
// 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));
}
// 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;
autoFilter (attribute, parseFilter);
}
// *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);
// Now convert the description to a filter on each word, if necessary.
if (parseCmd.isReadOnlyCommand ())
{
std::vector <std::string> words;
split (words, descCandidate, ' ');
std::vector <std::string>::iterator it;
for (it = words.begin (); it != words.end (); ++it)
{
Att a ("description", "contains", *it);
autoFilter (a, parseFilter);
}
}
}
// 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. The filter was constructed iteratively above, but
// tags were omitted, so they are added now.
if (parseCmd.isReadOnlyCommand ())
autoFilter (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");
if (defaultCommand != "")
{
// Add on the overrides.
defaultCommand += " " + file_override + " " + var_overrides;
// Stuff the command line.
args.clear ();
split (args, defaultCommand, ' ');
header ("[task " + trim (defaultCommand) + "]");
// Reinitialize the context and recurse.
file_override = "";
var_overrides = "";
footnotes.clear ();
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");
}
}
////////////////////////////////////////////////////////////////////////////////
// Note: The reason some of these are commented out is because the ::clear
// method is not really "clear" but "clear_some". Some members do not need to
// be initialized. That makes this method something of a misnomer. So be it.
void Context::clear ()
{
// Config config;
filter.clear ();
// Keymap keymap;
sequence.clear ();
subst.clear ();
// task.clear ();
task = Task ();
tdb.clear ();
// stringtable.clear ();
program = "";
args.clear ();
file_override = "";
var_overrides = "";
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 (Att& a, Filter& f)
{
// Words are found in the description using the .has modifier.
if (a.name () == "description" && a.mod () == "")
{
std::vector <std::string> words;
split (words, a.value (), ' ');
foreach (word, words)
{
f.push_back (Att ("description", "has", *word));
debug ("auto filter: " + a.name () + ".has:" + *word);
}
}
// Projects are matched left-most.
else if (a.name () == "project" && a.mod () == "")
{
if (a.value () != "")
{
f.push_back (Att ("project", "startswith", a.value ()));
debug ("auto filter: " + a.name () + ".startswith:" + a.value ());
}
else
{
f.push_back (Att ("project", "is", a.value ()));
debug ("auto filter: " + a.name () + ".is:" + a.value ());
}
}
// The limit attribute does not participate in filtering, and needs to be
// specifically handled in handleCustomReport.
else if (a.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 (a.name () == "uuid")
{
}
// The mechanism for filtering on tags is +/-<tag>.
// Do not handle here - see below.
else if (a.name () == "tags")
{
}
// Generic attribute matching.
else
{
f.push_back (a);
debug ("auto filter: " +
a.name () +
(a.mod () != "" ?
("." + a.mod () + ":") :
":") +
a.value ());
}
}
////////////////////////////////////////////////////////////////////////////////
// Add all the tags in the task to the filter.
void Context::autoFilter (Filter& f)
{
// This is now a correct implementation of a filter on the presence or absence
// of a tag. The prior code provided the illusion of leftmost partial tag
// matches, but was really using the 'contains' and 'nocontains' attribute
// modifiers. See bug #293.
// Include tagAdditions.
foreach (tag, tagAdditions)
{
f.push_back (Att ("tags", "word", *tag));
debug ("auto filter: +" + *tag);
}
// Include tagRemovals.
foreach (tag, tagRemovals)
{
f.push_back (Att ("tags", "noword", *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 ();
}
////////////////////////////////////////////////////////////////////////////////

104
src/Context.h Normal file
View File

@@ -0,0 +1,104 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2010, 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"
#include "Hooks.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 (Att&, Filter&);
void autoFilter (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 file_override;
std::string var_overrides;
Cmd cmd;
std::map <std::string, std::string> aliases;
std::vector <std::string> tagAdditions;
std::vector <std::string> tagRemovals;
Hooks hooks;
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 - 2009, Paul Beckingham.
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -25,11 +25,17 @@
//
////////////////////////////////////////////////////////////////////////////////
#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"
#include "Context.h"
extern Context context;
////////////////////////////////////////////////////////////////////////////////
// Defaults to "now".
@@ -49,9 +55,27 @@ Date::Date (const int m, const int d, const int y)
{
// Error if not valid.
struct tm t = {0};
t.tm_mday = d;
t.tm_mon = m - 1;
t.tm_year = y - 1900;
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
t.tm_mday = d;
t.tm_mon = m - 1;
t.tm_year = y - 1900;
mT = mktime (&t);
}
////////////////////////////////////////////////////////////////////////////////
Date::Date (const int m, const int d, const int y,
const int hr, const int mi, const int se)
{
// Error if not valid.
struct tm t = {0};
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
t.tm_mday = d;
t.tm_mon = m - 1;
t.tm_year = y - 1900;
t.tm_hour = hr;
t.tm_min = mi;
t.tm_sec = se;
mT = mktime (&t);
}
@@ -59,9 +83,16 @@ Date::Date (const int m, const int d, const int y)
////////////////////////////////////////////////////////////////////////////////
Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
{
int month = 0;
int day = 0;
int year = 0;
int month = 0;
int day = 0;
int year = 0;
int hour = 0;
int minute = 0;
int second = 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))
@@ -76,42 +107,42 @@ 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.";
throw std::string ("\"") + mdy + "\" is not a valid date (m).";
}
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 ());
month = atoi (mdy.substr (i, 2).c_str ());
i += 2;
}
else
{
month = ::atoi (mdy.substr (i, 1).c_str ());
month = atoi (mdy.substr (i, 1).c_str ());
++i;
}
break;
case 'd':
if (i >= mdy.length () ||
! ::isdigit (mdy[i]))
! isdigit (mdy[i]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
throw std::string ("\"") + mdy + "\" is not a valid date (d).";
}
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 ());
day = atoi (mdy.substr (i, 2).c_str ());
i += 2;
}
else
{
day = ::atoi (mdy.substr (i, 1).c_str ());
day = atoi (mdy.substr (i, 1).c_str ());
++i;
}
break;
@@ -119,74 +150,202 @@ 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]))
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
throw std::string ("\"") + mdy + "\" is not a valid date (y).";
}
year = ::atoi (mdy.substr (i, 2).c_str ()) + 2000;
year = atoi (mdy.substr (i, 2).c_str ()) + 2000;
i += 2;
break;
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.";
throw std::string ("\"") + mdy + "\" is not a valid date (M).";
}
month = ::atoi (mdy.substr (i, 2).c_str ());
month = atoi (mdy.substr (i, 2).c_str ());
i += 2;
break;
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.";
throw std::string ("\"") + mdy + "\" is not a valid date (D).";
}
day = atoi (mdy.substr (i, 2).c_str ());
i += 2;
break;
case 'V':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (V).";
}
day = ::atoi (mdy.substr (i, 2).c_str ());
i += 2;
break;
// 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.";
throw std::string ("\"") + mdy + "\" is not a valid date (Y).";
}
year = ::atoi (mdy.substr (i, 4).c_str ());
year = atoi (mdy.substr (i, 4).c_str ());
i += 4;
break;
// Short names with 3 characters
case 'a':
if (i + 2 >= mdy.length () ||
isdigit (mdy[i + 0]) ||
isdigit (mdy[i + 1]) ||
isdigit (mdy[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (a).";
}
i += 3;
break;
case 'b':
if (i + 2 >= mdy.length () ||
isdigit (mdy[i + 0]) ||
isdigit (mdy[i + 1]) ||
isdigit (mdy[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (b).";
}
month = Date::monthOfYear (mdy.substr (i, 3).c_str());
i += 3;
break;
// Long names
case 'A':
if (i + 2 >= mdy.length () ||
isdigit (mdy[i + 0]) ||
isdigit (mdy[i + 1]) ||
isdigit (mdy[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (A).";
}
i += Date::dayName( Date::dayOfWeek (mdy.substr (i, 3).c_str()) ).size();
break;
case 'B':
if (i + 2 >= mdy.length () ||
isdigit (mdy[i + 0]) ||
isdigit (mdy[i + 1]) ||
isdigit (mdy[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (B).";
}
month = Date::monthOfYear (mdy.substr (i, 3).c_str());
i += Date::monthName(month).size();
break;
// Single or double digit.
case 'h':
if (i >= mdy.length () ||
! isdigit (mdy[i]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (h).";
}
if (i + 1 < mdy.length () &&
(mdy[i + 0] == '0' || mdy[i + 0] == '1' || mdy[i + 0] == '2') &&
isdigit (mdy[i + 1]))
{
hour = atoi (mdy.substr (i, 2).c_str ());
i += 2;
}
else
{
hour = atoi (mdy.substr (i, 1).c_str ());
++i;
}
break;
case 'H':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (H).";
}
hour = atoi (mdy.substr (i, 2).c_str ());
i += 2;
break;
case 'N':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (N).";
}
minute = atoi (mdy.substr (i, 2).c_str ());
i += 2;
break;
case 'S':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (S).";
}
second = atoi (mdy.substr (i, 2).c_str ());
i += 2;
break;
default:
if (i >= mdy.length () ||
mdy[i] != format[f])
{
throw std::string ("\"") + mdy + "\" is not a valid date.";
throw std::string ("\"") + mdy + "\" is not a valid date (DEFAULT).";
}
++i;
break;
}
}
if (!valid (month, day, year))
throw std::string ("\"") + mdy + "\" is not a valid date.";
if (i < mdy.length ())
throw std::string ("\"") + mdy + "\" is not a valid date in " + format + " format.";
// Duplicate Date::Date (const int, const int, const int);
if (!valid (month, day, year))
throw std::string ("\"") + mdy + "\" is not a valid date (VALID).";
// Convert to epoch.
struct tm t = {0};
t.tm_mday = day;
t.tm_mon = month - 1;
t.tm_year = year - 1900;
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
t.tm_mday = day;
t.tm_mon = month - 1;
t.tm_year = year - 1900;
t.tm_hour = hour;
t.tm_min = minute;
t.tm_sec = second;
mT = mktime (&t);
}
@@ -208,6 +367,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)
{
@@ -238,13 +405,22 @@ const std::string Date::toString (const std::string& format /*= "m/d/Y" */) cons
char c = localFormat[i];
switch (c)
{
case 'm': sprintf (buffer, "%d", this->month ()); break;
case 'M': sprintf (buffer, "%02d", this->month ()); break;
case 'd': sprintf (buffer, "%d", this->day ()); break;
case 'D': sprintf (buffer, "%02d", this->day ()); break;
case 'y': sprintf (buffer, "%02d", this->year () % 100); break;
case 'Y': sprintf (buffer, "%d", this->year ()); break;
default: sprintf (buffer, "%c", c); break;
case 'm': sprintf (buffer, "%d", this->month ()); break;
case 'M': sprintf (buffer, "%02d", this->month ()); break;
case 'd': sprintf (buffer, "%d", this->day ()); break;
case 'D': sprintf (buffer, "%02d", this->day ()); break;
case 'y': sprintf (buffer, "%02d", this->year () % 100); break;
case 'Y': sprintf (buffer, "%d", this->year ()); break;
case 'a': sprintf (buffer, "%.3s", Date::dayName (dayOfWeek ()).c_str ()); break;
case 'A': sprintf (buffer, "%s", Date::dayName (dayOfWeek ()).c_str ()); break;
case 'b': sprintf (buffer, "%.3s", Date::monthName (month ()).c_str ()); break;
case 'B': sprintf (buffer, "%.9s", Date::monthName (month ()).c_str ()); break;
case 'V': sprintf (buffer, "%02d", Date::weekOfYear (Date::dayOfWeek (context.config.get ("weekstart")))); break;
case 'h': sprintf (buffer, "%d", this->hour ()); break;
case 'H': sprintf (buffer, "%02d", this->hour ()); break;
case 'N': sprintf (buffer, "%02d", this->minute ()); break;
case 'S': sprintf (buffer, "%02d", this->second ()); break;
default: sprintf (buffer, "%c", c); break;
}
formatted += buffer;
@@ -253,6 +429,51 @@ const std::string Date::toString (const std::string& format /*= "m/d/Y" */) cons
return formatted;
}
////////////////////////////////////////////////////////////////////////////////
const std::string Date::toStringWithTime (const std::string& format /*= "m/d/Y" */) const
{
// Format as above.
std::string formatted = toString (format);
char buffer[12];
sprintf (buffer, " %d:%02d:%02d", hour (), minute (), second ());
formatted += buffer;
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, const int hr,
const int mi, const int se)
{
if (hr < 0 || hr > 23)
return false;
if (mi < 0 || mi > 59)
return false;
if (se < 0 || se > 59)
return false;
return Date::valid (m, d, y);
}
////////////////////////////////////////////////////////////////////////////////
bool Date::valid (const int m, const int d, const int y)
{
@@ -277,9 +498,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 +577,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
{
@@ -366,17 +611,64 @@ int Date::dayOfWeek (const std::string& input)
{
std::string in = lowerCase (input);
if (in == "sunday") return 0;
if (in == "monday") return 1;
if (in == "tuesday") return 2;
if (in == "wednesday") return 3;
if (in == "thursday") return 4;
if (in == "friday") return 5;
if (in == "saturday") return 6;
if (in == "sunday" || in == "sun") return 0;
if (in == "monday" || in == "mon") return 1;
if (in == "tuesday" || in == "tue") return 2;
if (in == "wednesday" || in == "wed") return 3;
if (in == "thursday" || in == "thu") return 4;
if (in == "friday" || in == "fri") return 5;
if (in == "saturday" || in == "sat") return 6;
return -1;
}
////////////////////////////////////////////////////////////////////////////////
int Date::monthOfYear (const std::string& input)
{
std::string in = lowerCase (input);
if (in == "january" || in == "jan") return 1;
if (in == "february" || in == "feb") return 2;
if (in == "march" || in == "mar") return 3;
if (in == "april" || in == "apr") return 4;
if (in == "may" || in == "may") return 5;
if (in == "june" || in == "jun") return 6;
if (in == "july" || in == "jul") return 7;
if (in == "august" || in == "aug") return 8;
if (in == "september" || in == "sep") return 9;
if (in == "october" || in == "oct") return 10;
if (in == "november" || in == "nov") return 11;
if (in == "december" || in == "dec") return 12;
return -1;
}
////////////////////////////////////////////////////////////////////////////////
time_t Date::easter (int year)
{
int Y = year;
int a = Y % 19;
int b = Y / 100;
int c = Y % 100;
int d = b / 4;
int e = b % 4;
int f = (b + 8) / 25;
int g = (b - f + 1) / 3;
int h = (19 * a + b - d - g + 15) % 30;
int i = c / 4;
int k = c % 4;
int L = (32 + 2 * e + 2 * i - h - k) % 7;
int m = (a + 11 * h + 22 * L) / 451;
int month = (h + L - 7 * m + 114) / 31;
int day = ((h + L - 7 * m + 114) % 31) + 1;
struct tm t = {0};
t.tm_isdst = -1; // Requests that mktime determine summer time effect.
t.tm_mday = day;
t.tm_mon = month - 1;
t.tm_year = year - 1900;
return mktime (&t);
}
////////////////////////////////////////////////////////////////////////////////
int Date::month () const
{
@@ -398,6 +690,27 @@ int Date::year () const
return t->tm_year + 1900;
}
////////////////////////////////////////////////////////////////////////////////
int Date::hour () const
{
struct tm* t = localtime (&mT);
return t->tm_hour;
}
////////////////////////////////////////////////////////////////////////////////
int Date::minute () const
{
struct tm* t = localtime (&mT);
return t->tm_min;
}
////////////////////////////////////////////////////////////////////////////////
int Date::second () const
{
struct tm* t = localtime (&mT);
return t->tm_sec;
}
////////////////////////////////////////////////////////////////////////////////
bool Date::operator== (const Date& rhs)
{
@@ -434,6 +747,18 @@ bool Date::operator>= (const Date& rhs)
return mT >= rhs.mT;
}
////////////////////////////////////////////////////////////////////////////////
bool Date::sameHour (const Date& rhs)
{
if (this->year () == rhs.year () &&
this->month () == rhs.month () &&
this->day () == rhs.day () &&
this->hour () == rhs.hour ())
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Date::sameDay (const Date& rhs)
{
@@ -467,7 +792,7 @@ bool Date::sameYear (const Date& rhs)
////////////////////////////////////////////////////////////////////////////////
Date Date::operator+ (const int delta)
{
return Date::Date (mT + delta);
return Date (mT + delta);
}
////////////////////////////////////////////////////////////////////////////////
@@ -490,6 +815,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.
@@ -524,6 +862,13 @@ bool Date::isRelativeDate (const std::string& input)
supported.push_back ("eow");
supported.push_back ("eom");
supported.push_back ("eoy");
supported.push_back ("goodfriday");
supported.push_back ("easter");
supported.push_back ("eastermonday");
supported.push_back ("ascension");
supported.push_back ("pentecost");
supported.push_back ("midsommar");
supported.push_back ("midsommarafton");
std::vector <std::string> matches;
if (autoComplete (in, supported, matches) == 1)
@@ -588,6 +933,60 @@ bool Date::isRelativeDate (const std::string& input)
mT = then.mT;
return true;
}
else if (found == "goodfriday")
{
Date then (Date::easter(today.year()));
mT = then.mT - 86400*2;
return true;
}
else if (found == "easter")
{
Date then (Date::easter(today.year()));
mT = then.mT;
return true;
}
else if (found == "eastermonday")
{
Date then (Date::easter(today.year()));
mT = then.mT + 86400;
return true;
}
else if (found == "ascension")
{
Date then (Date::easter(today.year()));
mT = then.mT + 86400*39;
return true;
}
else if (found == "pentecost")
{
Date then (Date::easter(today.year()));
mT = then.mT + 86400*49;
return true;
}
else if (found == "midsommar")
{
for (int midsommar = 20; midsommar <= 26; midsommar++)
{
Date then (6, midsommar, today.year ());
if (6 == then.dayOfWeek ())
{
mT = then.mT;
return true;
}
}
}
else if (found == "midsommarafton")
{
for (int midsommar = 19; midsommar <= 25; midsommar++)
{
Date then (6, midsommar, today.year ());
if (5 == then.dayOfWeek ())
{
mT = then.mT;
return true;
}
}
}
}
// Support "21st" to indicate the next date that is the 21st day.
@@ -599,13 +998,13 @@ bool Date::isRelativeDate (const std::string& input)
if (isdigit (input[1]))
{
number = ::atoi (input.substr (0, 2).c_str ());
ordinal = lowerCase (input.substr (2, std::string::npos));
number = atoi (input.substr (0, 2).c_str ());
ordinal = lowerCase (input.substr (2));
}
else
{
number = ::atoi (input.substr (0, 2).c_str ());
ordinal = lowerCase (input.substr (1, std::string::npos));
number = atoi (input.substr (0, 2).c_str ());
ordinal = lowerCase (input.substr (1));
}
// Sanity check.

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it under
@@ -27,8 +27,10 @@
#ifndef INCLUDED_DATE
#define INCLUDED_DATE
#include <stdio.h>
#include <string>
class Date;
class Date
@@ -37,27 +39,39 @@ public:
Date ();
Date (time_t);
Date (const int, const int, const int);
Date (const int, const int, const int, const int, const int, const int);
Date (const std::string&, const std::string& format = "m/d/Y");
Date (const Date&);
virtual ~Date ();
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;
const std::string toStringWithTime (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, const int, const int, const int);
static bool valid (const int, const int, const int);
static time_t easter (int year);
static bool leapYear (int);
static int daysInMonth (int, int);
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&);
static int monthOfYear (const std::string&);
int month () const;
int day () const;
int year () const;
int weekOfYear (int) const;
int dayOfWeek () const;
int hour () const;
int minute () const;
int second () const;
bool operator== (const Date&);
bool operator!= (const Date&);
@@ -65,6 +79,7 @@ public:
bool operator> (const Date&);
bool operator<= (const Date&);
bool operator>= (const Date&);
bool sameHour (const Date&);
bool sameDay (const Date&);
bool sameMonth (const Date&);
bool sameYear (const Date&);
@@ -76,6 +91,7 @@ public:
time_t operator- (const Date&);
private:
bool isEpoch (const std::string&);
bool isRelativeDate (const std::string&);
protected:

144
src/Directory.cpp Normal file
View File

@@ -0,0 +1,144 @@
////////////////////////////////////////////////////////////////////////////////
// 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 <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include "Directory.h"
#include "../auto.h"
////////////////////////////////////////////////////////////////////////////////
Directory::Directory ()
{
}
////////////////////////////////////////////////////////////////////////////////
Directory::Directory (const Directory& other)
: File::File (other)
{
}
////////////////////////////////////////////////////////////////////////////////
Directory::Directory (const File& other)
: File::File (other)
{
}
////////////////////////////////////////////////////////////////////////////////
Directory::Directory (const Path& other)
: File::File (other)
{
}
////////////////////////////////////////////////////////////////////////////////
Directory::Directory (const std::string& in)
: File::File (in)
{
}
////////////////////////////////////////////////////////////////////////////////
Directory::~Directory ()
{
}
////////////////////////////////////////////////////////////////////////////////
Directory& Directory::operator= (const Directory& other)
{
if (this != &other)
{
File::operator= (other);
}
return *this;
}
////////////////////////////////////////////////////////////////////////////////
bool Directory::create ()
{
return mkdir (data.c_str (), 0755) == 0 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
bool Directory::remove ()
{
return rmdir (data.c_str ()) == 0 ? true : false;
}
////////////////////////////////////////////////////////////////////////////////
std::vector <std::string> Directory::list ()
{
std::vector <std::string> files;
list (data, files, false);
return files;
}
////////////////////////////////////////////////////////////////////////////////
std::vector <std::string> Directory::listRecursive ()
{
std::vector <std::string> files;
list (data, files, true);
return files;
}
////////////////////////////////////////////////////////////////////////////////
void Directory::list (
const std::string& base,
std::vector <std::string>& results,
bool recursive)
{
DIR* dp = opendir (base.c_str ());
if (dp != NULL)
{
struct dirent* de;
while ((de = readdir (dp)) != NULL)
{
if (!strcmp (de->d_name, ".") ||
!strcmp (de->d_name, ".."))
continue;
#if defined (SOLARIS) || defined (HAIKU)
struct stat s;
stat (de->d_name, &s);
if (recursive && s.st_mode & S_IFDIR)
list (base + "/" + de->d_name, results, recursive);
else
results.push_back (base + "/" + de->d_name);
#else
if (recursive && de->d_type == DT_DIR)
list (base + "/" + de->d_name, results, recursive);
else
results.push_back (base + "/" + de->d_name);
#endif
}
closedir (dp);
}
}
////////////////////////////////////////////////////////////////////////////////

55
src/Directory.h Normal file
View File

@@ -0,0 +1,55 @@
////////////////////////////////////////////////////////////////////////////////
// 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_DIRECTORY
#define INCLUDED_DIRECTORY
#include "File.h"
class Directory : public File
{
public:
Directory ();
Directory (const Directory&);
Directory (const File&);
Directory (const Path&);
Directory (const std::string&);
virtual ~Directory ();
Directory& operator= (const Directory&);
virtual bool create ();
virtual bool remove ();
std::vector <std::string> list ();
std::vector <std::string> listRecursive ();
private:
void list (const std::string&, std::vector <std::string>&, bool);
};
#endif
////////////////////////////////////////////////////////////////////////////////

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