Compare commits

..

348 Commits

Author SHA1 Message Date
Federico Hernandez
bf36b47593 Release date for 1.9.3 2010-11-08 23:01:19 +01:00
Federico Hernandez
58b077df0e Pushed version to 1.9.3 prior to release 2010-11-08 22:27:24 +01:00
Paul Beckingham
9c93fe7c88 Bug #467, #493
- Fixed bug #467, where recurring tasks were not honoring wait values.
- Fixed bug #493, which made waiting, recurring tasks invisible (thanks to
  Alexander Schremmer).
2010-11-07 15:35:30 -05:00
Paul Beckingham
73110ae033 Portability
- Modfied diag.cpp to get a clean build on Ubuntu, and the latest gcc.
2010-11-06 17:27:58 -04:00
Johannes Schlatow
08bbd38615 Bug
- fixed is_local() in Uri
2010-11-03 13:02:19 +01:00
Johannes Schlatow
6cb5c7a104 Bug
- fixed #527
- extended directory check in Uri for local uri/paths
2010-11-03 10:59:36 +01:00
Johannes Schlatow
b56b5bc29d Bug
- fixed #526, false warning about wait date, when both are modified simultaneously
2010-11-02 22:41:38 +01:00
Paul Beckingham
558bf2ca50 Feedback
- Improved feedback when announcing 'depends' attirubte changes.  Now
  uses task IDs instead of UUIDs, resulting in a shorter, clearer
  message (thanks to Peter De Poorter).
2010-10-31 11:22:36 -04:00
Paul Beckingham
5ba23a4ecd Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-31 10:59:22 -04:00
Paul Beckingham
46c031c45c Documentation
- The help command now includes the task-sync man page.
- The help command now includes export.csv and export.yaml.
2010-10-28 21:46:26 -04:00
Paul Beckingham
f553915b2f Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-28 21:45:34 -04:00
Paul Beckingham
01bb76b3b6 Feedback
- Modified feedback when the number of pending tasks in a project changes
  (thanks to Peter De Poorter).
2010-10-27 22:26:11 -04:00
Paul Beckingham
f8d8d2f6b5 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-27 17:44:48 -04:00
Paul Beckingham
fe9eb9cacb Holidays
- Added Norwegian holidays (thanks to Jostein Berntsen).
2010-10-27 17:44:10 -04:00
Federico Hernandez
50f23d4b75 New distribution: SuSE 11.3 2010-10-27 21:09:17 +02:00
Federico Hernandez
62d2c6bb5f Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-26 21:16:34 +02:00
Federico Hernandez
4a1edfb9be Lua
- fixed task_exit hook throwing exception under certain
  circumstances under Ubuntu.
- task_exit now exits with exit (0) instead.
2010-10-26 21:14:31 +02:00
Johannes Schlatow
c20bfffbce Merge
- fixed output
2010-10-26 15:17:21 +02:00
Paul Beckingham
cfdd7efea9 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-25 20:13:26 -04:00
Federico Hernandez
5bc1bfe331 Bumped version to 1.9.3.beta3 2010-10-25 20:47:07 +02:00
Johannes Schlatow
9eed851fbb Merge
- fixed if statement
2010-10-25 18:53:44 +02:00
Paul Beckingham
6dca4dd056 Code Cleanup
- Simplified one call.
2010-10-25 01:15:17 -04:00
Paul Beckingham
a5123dd2b7 Bug
- Now CYGWIN has special handling for srand/srandom.
2010-10-25 00:49:42 -04:00
Paul Beckingham
488b23f42f Bug
- Flipped the test and error message for wait dates that must be before due
  dates.
2010-10-25 00:37:56 -04:00
Paul Beckingham
ffa1bac193 Unit Tests
- Corrected test to match newly modified error message.
2010-10-24 23:49:15 -04:00
Paul Beckingham
2aac37dcb7 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-24 19:54:41 -04:00
Paul Beckingham
e6d47f233b Bug - Duplicate UUIDs under Cygwin
- Fixed bug caused by using a high-resolution timer (gettimeofday) on
  Windows, which only has a 10ms resolution timer.  Consequently the
  random number seed used was from a significantly reduced pool, which
  leads to duplicate UUIDs.
2010-10-24 18:35:32 -04:00
Paul Beckingham
191d8ef355 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-23 15:03:16 -04:00
Paul Beckingham
ca6bfeb2f2 Documentation
- Corrected use of "reportdateformat" in taskrc.5 to "dateformat.report".
- Corrected duplicate comment in Config.cpp defaults.
2010-10-23 15:02:28 -04:00
Paul Beckingham
0a5e380bbf Correction
- Committed too many chunks in the last modification.
2010-10-23 11:29:20 -04:00
Paul Beckingham
79a4f666aa Correction
- Certain fixed issues were omitted.
2010-10-23 11:27:02 -04:00
Paul Beckingham
f74bed4355 Diagnostics
- Redirected STDERR into STDOUT to eliminate stray output.
2010-10-22 08:23:37 -04:00
Federico Hernandez
18e9f6e8ec Bumped version to 1.9.3.beta2 2010-10-21 00:52:54 +02:00
Johannes Schlatow
6e11267724 Makefile
- fixed undefined reference to handeDiagnostics()
2010-10-20 22:48:06 +02:00
Johannes Schlatow
af490fb634 Sync
- added description substrings to output of merge command
2010-10-20 22:41:45 +02:00
Paul Beckingham
1e38cbd6a0 Diagnostics
- Added checks for external utilities, for sync operations.
2010-10-20 01:07:46 -04:00
Paul Beckingham
1e37d7a784 Diagnostics
- Added new 'diagnostics' command to assist with bug reporting,
  testing.  It answers questions such as "did you compile it yourself?",
  and more.
- Specifically, it runs a UUID generation test to prove that the UUIDs
  are really unique.
2010-10-20 00:22:20 -04:00
Paul Beckingham
314f64f775 Import
- Added a \n where missing in an import error message.
2010-10-18 23:10:39 -04:00
Federico Hernandez
f285ae535f Added correct credits to task-tutorial.5 2010-10-17 23:39:36 +02:00
Johannes Schlatow
34f80d03e3 Bug
- fixed unrecognized config variable 'push.default.uri'
2010-10-17 22:50:05 +02:00
Paul Beckingham
6de940acf1 Documentation
- Fixed typos.
2010-10-17 11:25:07 -04:00
Paul Beckingham
837b89dd2d Sync
- More work on the output text from merge.  Improved, but not yet finished.
2010-10-17 01:12:00 -04:00
Paul Beckingham
d177acfcbd Cleanup
- Removed redundant message from duplication command.
2010-10-16 21:24:12 -04:00
Paul Beckingham
354debcf96 Documentation
- Completed task-tutorial.5.
2010-10-16 17:44:40 -04:00
Paul Beckingham
12a90fb477 Bug
- Fixed underlining in color legend command when color is off - the dashes
  were not being used.
2010-10-16 11:06:28 -04:00
Paul Beckingham
47b5586d45 Bug
- Fixed underlining in undo command when color is off - the dashes
  were not being used.
2010-10-16 10:37:20 -04:00
Paul Beckingham
12146a6f01 Bug
- Fixed underlining in projects report when color is off - the dashes
  were not being used.
- Cleaned up formatting in main.h.
2010-10-16 10:36:28 -04:00
Paul Beckingham
e9301257f8 Documentation
- task-tutorial.5 formatting complete.  Now for the response output.
2010-10-15 23:05:10 -04:00
Paul Beckingham
bfb29998bf Documentation
- More formatting for task-tutorial.5.  Still not finished.
2010-10-15 08:55:45 -04:00
Paul Beckingham
c5427c91fc Sync
- Added Path::operator== for expanded path comparisons.  Why was
  that not already implemented?
- Added checks that the push/pull destination is not equal to
  rc.data.location.  That would be bad.
- Added comments, tweaked the wording on some messages.  Stubbed out
  confirmation of pull overwrite, while I think about it.
2010-10-15 08:46:04 -04:00
Paul Beckingham
9e5f1787d0 Bug
- Fixed erroneous unit test that considered '/a/b/x' a valid substitution,
  which is false because of the 'x'.
2010-10-15 00:50:12 -04:00
Paul Beckingham
783867c512 Sync
- Colorized the merge process.
- Added whitespace to the merge output for alignment and a less cramped
  look.
- De-tabbed.
- Changed "(*foo).method ()" to "foo->method ()" or clarity.
- Removed two tests that relied upon the (removed) "Redo" message.
2010-10-15 00:41:52 -04:00
Paul Beckingham
bb6f456e04 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-14 22:03:27 -04:00
Paul Beckingham
6d653f720d Sync
- Now verifies that any potential subst is not also a valid absolute
  path.
2010-10-14 21:55:24 -04:00
Paul Beckingham
4e62d8fddc Sync
- Removed unnecessary diagnostic message.
2010-10-14 21:54:55 -04:00
Johannes Schlatow
c6bde0aaba Bug
- fixed "Database is up to date" exception in merge command,
  which led to autopush being suppressed when changes were
  made on the local branch only
2010-10-15 00:21:10 +02:00
Johannes Schlatow
d39d5af03b Uri support
- TransportCurl now supports non-anonymous ftp
2010-10-15 00:12:42 +02:00
Johannes Schlatow
36800e0a35 Documentation
- additions to task-sync.5
2010-10-15 00:10:40 +02:00
Paul Beckingham
a921ea4ed6 Samples
- Added a sample script to generate a dependencies screen shot.
2010-10-13 21:21:49 -04:00
Paul Beckingham
0159cfde2f Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-13 21:06:06 -04:00
Paul Beckingham
2708b37ce5 Bug
- Fixed GC bug that attempted to clean up dangling dependencies but
  actually failed to update the tasks.
2010-10-13 20:57:50 -04:00
Paul Beckingham
98861d87d6 Documentation
- More formatting of task-tutorial.5.  Not fininshed yet.
2010-10-13 08:57:27 -04:00
Paul Beckingham
8823ba5bfa Documentation
- New task-tutorial man page not fully formatted yet. but the
  content is good.
- Modified run.193 shell script to match movie.
2010-10-12 23:25:39 -04:00
Paul Beckingham
96d2acef42 Feature #499
- Relocated change to inside the Permission object, thus making the change
  smaller.
2010-10-12 23:24:48 -04:00
Federico Hernandez
0e1d12f5b1 Feature #499
- added extra line of output when doing bulk done changes.
2010-10-12 16:06:16 +02:00
Paul Beckingham
1f8ae07b8e Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-09 22:53:24 -04:00
Paul Beckingham
0bc7dd11a8 Movie
- Completed the program that runs through all the commands.
- Compelted the command and spoken copy.
2010-10-09 22:52:33 -04:00
Federico Hernandez
a288a19c16 Man pages
- synced date in man pages
2010-10-09 22:40:18 +02:00
Paul Beckingham
fec2af34bc Movie
- Finalized (hopefully) the movie script for 1.9.3.
2010-10-09 12:29:07 -04:00
Paul Beckingham
b609cdb8a0 Urgency
- Removed the urgency rating from the info report.  Otherwise, we
  will need to explain it, and without the corresponding new next
  report, what can we say?  It will be reenabled later.
2010-10-09 12:27:57 -04:00
Paul Beckingham
bde1e0dd9a Dependencies
- Added a new 'unblocked' report to complement the 'blocked' report.
- Updated docs.
2010-10-09 12:27:10 -04:00
Paul Beckingham
a75c018106 Report
- New report, unblocked, which is the opposite of the blocked report.
2010-10-09 12:00:24 -04:00
Paul Beckingham
70306de6bd Unit Tests - roundtrip.t
- Corrected tests to accommodate the new rule that stipulates uuids
  must always be unique.
2010-10-09 10:36:22 -04:00
Paul Beckingham
30f757ba13 Documentation
- Added first draft of task-sync.5.
- Updated other man pages to reference the new task-sync.5 page.
- Added new man page to the distribution.
2010-10-09 00:51:08 -04:00
Paul Beckingham
6af7540fe7 Bug
- Fixed a divide-by-zero bug in the project completion calculations, that
  was uncovered by sync testing.
2010-10-07 23:40:03 -04:00
Paul Beckingham
533bbedd81 Sync
- Softened the wording in an error message.
- Added WARNING commends to the Config sample.
2010-10-07 23:38:34 -04:00
Paul Beckingham
42521fea8b Sync
- Managed to cut/paste a superfluous semicolon.  Oops.
2010-10-06 23:54:15 -04:00
Paul Beckingham
74dcdd897a Sync
- Changed the wording on most error messages and diagnostics so that
  the user is not alarmed, and is somewhat guided toward a solution.
2010-10-06 23:29:45 -04:00
Paul Beckingham
4028a2fce4 Documentation
- Added (incomplete) scripts to generate more sample runs, showcasing
  features.
2010-10-06 23:28:31 -04:00
Federico Hernandez
1b5178c456 Added missing uri.t to .gitignore 2010-10-06 21:45:39 +02:00
Johannes Schlatow
1a16b3ae6b Feature #462: url support
- curl enhancements (push/pull multiple files)
- now supports push/pull to/from filesystem
2010-10-06 18:53:02 +02:00
Johannes Schlatow
042d7b40de Feature #462: url support
- added uri class for proper uri and path handling
2010-10-06 18:52:12 +02:00
Johannes Schlatow
b041e54be6 Merge command
- improved merge.autopush=ask
- fixed newline issues
- fixed: entries for new tasks got lost in undo.data
2010-10-06 12:57:14 +02:00
Federico Hernandez
5c36013ddd Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-06 00:40:22 +02:00
Federico Hernandez
b630138e8b Bumping version to 1.9.3.beta1 2010-10-06 00:29:13 +02:00
Federico Hernandez
9e9807a52a Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-06 00:25:12 +02:00
Paul Beckingham
0aa87d04da Themes
- Changed the default color.blocked color for high-color systems.
2010-10-05 18:24:48 -04:00
Paul Beckingham
cb14ed128e Bug
- Fixed bug whereby after a merge, the undo.data file had all lines
  concatenated without \n characters.
2010-10-05 18:24:01 -04:00
Paul Beckingham
6fd876b8dd Themes
- Updated themes to include new color.blocked.
2010-10-05 18:23:07 -04:00
Paul Beckingham
616e230920 Holidays
- Added missing files to makefile.
2010-10-05 18:22:21 -04:00
Federico Hernandez
a043b42373 import.yaml.t was broken for European TZs 2010-10-06 00:16:36 +02:00
Federico Hernandez
952845b1b0 Naming new holiday file in NEWS and ChangeLog 2010-10-05 22:29:45 +02:00
Federico Hernandez
0e355b45e1 Holiday file for Spain 2010-10-05 22:26:07 +02:00
Federico Hernandez
fc26eebea6 Minor corrections for German holidays 2011 2010-10-05 22:02:41 +02:00
Federico Hernandez
0c0cb7b0f5 Minor corrections for Swedish holidays 2011 2010-10-05 21:40:44 +02:00
Paul Beckingham
84b609f518 Dependencies
- Implemented dependencies in "task edit".
2010-10-05 01:34:59 -04:00
Paul Beckingham
dece0a8dca Bug #494
- Imported text was not assigned a uuid.
- Although bug #494 was fixed a month ago, it was never acknowledged in
  the issue list.  This commit corrects that, and thanks Elizabeth for
  reporting this serious issue (thanks to Elizabeth Maxson).
2010-10-05 01:12:49 -04:00
Paul Beckingham
5d4cafb7a6 Bug #493
- Not a fix for the bug, but improved task consistency checking.  The
  real fix can only be made when the Task::waiting status is abolished.
2010-10-05 00:39:22 -04:00
Paul Beckingham
9e4786e4fe Documentation
- Added explanation of the new settings.
2010-10-04 22:14:44 -04:00
Paul Beckingham
fa46fcf8ca i18n
- Added localized holiday file for NL (thanks to T. Charles Yun).
2010-10-04 18:13:25 -04:00
Paul Beckingham
59fa056c4b Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-04 17:46:46 -04:00
Paul Beckingham
9f567aa3c6 Holidays
- New Netherlands holiday file from T. Charles Yun.
- Modified French file.
2010-10-04 17:45:19 -04:00
Johannes Schlatow
70360cadec Bash completion
- Added filename/path completion for import
2010-10-04 02:26:53 +02:00
Johannes Schlatow
89f82847fb Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-04 02:20:52 +02:00
Johannes Schlatow
bf316974d9 Url support #462
- Added TransportCurl for http, https and ftp
- Added url support for import command
2010-10-04 02:20:41 +02:00
Paul Beckingham
7fdfcbacc6 Dependencies - #410
- Completed support for 'task 1 depends:2,-3' to manipulate the
  dependencies.
- Now supports rc.dependency.reminder to indicate when to nag about
  dependency chain violations, defaulting to on.
- Now supports rc.dependency.confirm to require confirmation before
  fixing dependency chains, defaulting to on.
- New source file dependency.cpp which implements a low-level API for
  determining dependency status, and assorted handlers for task state
  changes.
- Adds blocking tasks to the 'next' report.
- Added more dependency unit tests, changed the wording in a couple of
  them and numbered them for easy reference.
2010-10-03 18:52:59 -04:00
Paul Beckingham
dea7b72b70 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-10-03 18:49:52 -04:00
Paul Beckingham
d73601c0b2 Dependencies
- Modified rules.cpp for color.blocked so that it correctly determines
  the need for coloration.
2010-10-03 18:48:42 -04:00
Johannes Schlatow
adc7992608 Bash completion
- Added hostname completion for merge, push and pull
2010-10-03 02:23:41 +02:00
Johannes Schlatow
68d5e3f296 Pull command
- Added pull command for cloning databases
2010-10-03 02:22:36 +02:00
Johannes Schlatow
0d364746c7 Merge/push command
- Added TransportRSYNC
2010-10-03 02:15:07 +02:00
Paul Beckingham
eb2cb99532 Performance
- Removed "std::endl" in cases where the autoflush is only going to
  slow things down.
2010-10-02 12:02:06 -04:00
Paul Beckingham
1d3aa891d6 Performance
- Removed "std::endl" in cases where the autoflush is only going to
  slow things down.
2010-09-30 23:44:38 -04:00
Paul Beckingham
dd86c2c875 Dependencies
- Code now in final form, but still incomplete.
2010-09-29 01:06:39 -04:00
Paul Beckingham
0388bcf259 Documentation
- Corrected the sample script that failed to wait for at least a second
  between annotations.
2010-09-28 01:02:02 -04:00
Paul Beckingham
f351bf6dec Minor Edits
- Corrected typo in tips file.
- Added explanatory comment regarding dependency chains.
2010-09-22 22:23:24 -04:00
Paul Beckingham
1e7bebb3b2 Bug - timesheet report
- The headers for the second table ('Started') were not underlined like
  those of the first table ('Completed').
2010-09-18 23:13:00 -04:00
Cory Donnelly
77815c080f Holidays
- Fixed inconsistent punctuation and used official names for a few US Federal holidays
2010-09-17 22:30:24 -04:00
Paul Beckingham
8a2e979726 Holidays
- Added UK file.
- Updated NEWS and ChangeLog.
2010-09-17 20:23:24 -04:00
Cory Donnelly
895a86903e i18n
- Missed Victoria Day
2010-09-17 12:42:10 -04:00
Cory Donnelly
3be6ef4bfd Documentation
- Added CA to list of included holiday files
2010-09-17 11:36:43 -04:00
Cory Donnelly
1639d5952a i18n
- Added Canadian holiday file
- Added Canadian holiday file to Makefile
- Fixed errors in 2011 US calendar
2010-09-17 11:31:47 -04:00
Paul Beckingham
f9f3ae720d Documentation
- Added mention of the new holiday files.
2010-09-17 00:31:07 -04:00
Paul Beckingham
34c21f5d43 Documentation
- Cleaned up ugly message.
2010-09-17 00:28:38 -04:00
Paul Beckingham
7752b37139 i18n
- Added French holiday file.
- Added new holiday files to the makefile.
2010-09-17 00:26:37 -04:00
Paul Beckingham
22bd31059d Holidays
- Added 2010/2011 US holidays.
- Added 2010/2011 German holidays, to welcome our German users.
- Added 2010/2011 Swedish holidays, but butchered it.  Fredde?
2010-09-16 22:43:34 -04:00
Paul Beckingham
ec3c1c4def Dependencies
- Added support for rc.dependency.reminder.
- Modified man page.
2010-09-16 22:09:03 -04:00
Paul Beckingham
975c2bbcb9 Dependencies
- Added dependencyGetBlocking and dependencyGetBlocked API calls, in
  the ongoing effort to find a workable API for dependencies.  The
  goal is to make the calling code as small as possible when dealing
  with dependencies.
- Corrected the algorithm for determining whether a task is blocked or
  blocking to also check that the other task is pending or waiting.
  For example:
    task add one
    task add two depends:1
    task do 1
  As the first task is completed, task 2 still depends on 1, but is
  no longer blocked due to the completed status.
- Modified the "info" report to use the modified API.
2010-09-16 21:54:18 -04:00
Paul Beckingham
8904daf9e5 Debug message
- Added debug message when a task is woken from the waiting state.
2010-09-16 21:18:42 -04:00
Paul Beckingham
afbbc87ec4 Samples
- Added more banner samples for taskwarrior.org.
2010-09-13 23:06:56 -04:00
Paul Beckingham
347dda7fa7 Documentation Update
- Corrected typo in man page.
2010-09-13 22:48:02 -04:00
Paul Beckingham
084d104c2f Samples
- Added more sample banners for taskwarrior.org.
2010-09-12 15:12:05 -04:00
Paul Beckingham
9aedaba7f2 Unit Tests
- Cleaned up message that is generated when a recurring task is past
  its until: date and all child tasks have been dismissed, as the
  parent task is deleted.
- Added unit tests recur.until.t to prove that the above is working.
2010-09-12 11:43:46 -04:00
Paul Beckingham
b1933c5d25 Themes
- Added Kathryn's new themes into the default .taskrc file template.
2010-09-10 00:51:11 -04:00
Paul Beckingham
87158f505a Bug - #489 - tags.none: is not filtering tagless tasks
- Context::autoFilter was suppressing 'tags' filter terms due to the
  +tag/-tag syntax, which we now know only augments attribute modifiers,
  and doesn't replace them.
2010-09-09 21:56:16 -04:00
Paul Beckingham
0dd71612e4 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-09-09 20:51:11 -04:00
Paul Beckingham
73ff6ea973 Task 2.0.0 Code Salvage 2010-09-09 20:49:17 -04:00
Cory Donnelly
3b7b7b5b23 i18n
- Added a tip.
2010-09-09 15:06:42 -04:00
Paul Beckingham
7f54b89f24 Unit Tests
- Removed inadvertent binary checkin.
2010-09-07 21:00:44 -04:00
Johannes Schlatow
0930f3c5f7 Unit tests
- Added tests for Transport class
2010-09-07 15:44:50 +02:00
Paul Beckingham
04c6c11175 Tarball
- Added new themes.
2010-09-07 01:26:27 -04:00
Paul Beckingham
8076a70225 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-09-07 01:23:46 -04:00
Paul Beckingham
e562fc8fd4 Themes
- Two new color themes (thanks to Kathryn Andersen).
2010-09-07 01:22:58 -04:00
Paul Beckingham
9d41d9046d Build System
- Added missing '-lpthread' argument to unit test makefile.
2010-09-05 11:43:15 -04:00
Paul Beckingham
9b46520ae1 Autoconf
- Added a check for pthread_create, which should trigger inclusion of
  '-lpthread' on the link command line.
2010-09-05 10:55:14 -04:00
Paul Beckingham
3d5656fb57 Unit Tests
- The lisp.t.cpp tests were written for an older and different Tree
  object.  This change brings it more up to date.
2010-09-05 09:14:36 -04:00
Paul Beckingham
f0a5c917c9 Unit Tests
- Fixed three sets of unit tests that recently broke when TDB::add
  started checking whether the uuid was really unique.  This was
  intended to prevent accidental double import, but also caused these
  tests to break because they all shared the same uuid, which is wrong.
2010-09-05 08:54:20 -04:00
Paul Beckingham
6e1a386ec8 i18n
- Added more tips.
2010-09-05 08:53:48 -04:00
Paul Beckingham
d012fc9717 Code Salvage
- Integrated some code from the (soon to be obsolete) 2.0.0 branch,
  which is general in nature and will be needed.
- And the corresponding unit tests.
2010-09-05 08:48:27 -04:00
Paul Beckingham
366c59e25d i18n
- Salvaged the tips files from the (now obsolete) 2.0.0 branch.
2010-09-04 12:29:05 -04:00
Paul Beckingham
1cc67e9895 Enhancement
- Importing the same YAML twice now generates an error.
2010-09-02 21:32:33 -04:00
Paul Beckingham
b32d731010 Demo
- Checking in demo scripts for creating the teaser banners that go
  up on the main tw page.
2010-09-02 21:22:25 -04:00
Cory Donnelly
21c3d1ab80 Unit Test - Bug #476
- Added test to wait.t for Bug #476 - User can specify due: dates that are before wait: dates
2010-09-02 09:08:28 -04:00
Paul Beckingham
ceb7a188bf Corrected ChangeLog. 2010-09-01 23:09:19 -04:00
Paul Beckingham
db9333ec64 Bug #476
- Fixed bug #476, so that task now issues a warning when a wait date falls
  after a due date (thanks to T. Charles Yun).
2010-09-01 23:08:21 -04:00
Paul Beckingham
04ddf74a07 Documentation Update
- Fixed typo in copyright.
- Added new feature to NEWS file.
- Added 'merge.autopush' as a valid configuration variable.
2010-09-01 22:39:37 -04:00
Paul Beckingham
4d46be0767 Copyright
- Fixed typo in copyright.
- Added 'merge.autopush' as a valid config variable.
2010-09-01 22:26:09 -04:00
Johannes Schlatow
2eaba55481 Merge branch '1.9.3' of tasktools.org:task into 1.9.3
Conflicts:
	src/Config.cpp
2010-09-02 01:53:25 +02:00
Johannes Schlatow
869655e818 Merge
- Added support for URIs
 - Added push command (pushes *.data to remote location)
 - Added config option: merge.autopush
2010-09-02 01:27:31 +02:00
Johannes Schlatow
d362088305 Merge
- Fixed segmentation fault if undo.data is empty
2010-09-02 01:24:58 +02:00
Johannes Schlatow
87ce13c8e0 Merge
- Added Transport classes to handle URIs like ssh://user@host:port/
2010-09-02 01:24:05 +02:00
Paul Beckingham
4139f32acf Unit Tests
- Added more unit tests to verify that @ in a tag does not interfere
  with multiple inclusions (+) and exclusions (-).
2010-08-31 23:03:12 -04:00
Paul Beckingham
d3ca5c04e3 Code Cleanup
- Improved the consistency of info output regarding recurring task
  parent and child tasks.
2010-08-31 23:02:16 -04:00
Paul Beckingham
d8913c2f15 Unit Tests
- Bug 485 refers to the fact that recurrence values are not autocompleted,
  and are stored literally.
2010-08-31 23:00:47 -04:00
Paul Beckingham
808934483f Recurrence
- Removed vestigial mask:"..." attribute from newly generated recurring
  task instances.
2010-08-31 01:30:20 -04:00
Paul Beckingham
d738f778ee Dependencies
- Restricted dependency nag message to only tasks that have dependencies.
2010-08-31 01:29:48 -04:00
Paul Beckingham
3a566460a2 Unit Tests
- Renamed bug.425.t to bug.425.x to reflect that fact that we're
  going to address this bug in 1.9.4, not 1.9.3.
2010-08-30 23:35:04 -04:00
Paul Beckingham
69ac9a4296 Bug #461 - due:today doesn't work as a filter - due.is:today does
- Fixed bug #461, in which the filter 'due:today' failed, but 'due.is:today'
  worked.  This is because while iterating over tasks, not every task has a
  due date, in which case Date::Date ("") was called, which fails.
- Moved 'wait' up to second position in the Att::type method, for efficiency.
2010-08-30 23:30:48 -04:00
Paul Beckingham
f2a5dde3a6 Themes
- Updated themes to include blank entries for the new color.tag.none
  and color.project.none rules.
2010-08-30 20:37:44 -04:00
Paul Beckingham
d85feef7ea Documentation - taskrc.5
- Corrected man page on the subject of color rule defaults and themes.
2010-08-29 14:15:49 -04:00
Paul Beckingham
4cd528661a Feature #481 - color should follow rc order
- Added feature #481, allowing for user control of the color rule order
  of precedence via the 'rule.precedence.color' configuration variable.
- Color rules now obey the rc.search.case.sensitive configuration option.
- The color.keyword.XXX color rule now applies to annotations too.
2010-08-29 13:40:53 -04:00
Paul Beckingham
c27097e286 Bug
- Fixed a precision problem with average age on the summary report.
  The problem was that average age is calculated as the sum of all
  ages, divided by the count.  The sum was already being stored as
  a double, to allow for very high values, but was being truncated
  to an int before being divided by the count.  Classic precision
  mishandling.
2010-08-28 09:37:32 -04:00
Paul Beckingham
e619f8c91d Dependencies
- Added dependency nagging to the 'start', 'done' and 'delete' commands.
2010-08-27 17:45:22 -04:00
Paul Beckingham
199114abcd Dependencies
- Improved error message when entering "task 1 dep:2; task 1 dep:2".
- Documented circularity checking.
- Stubbed dependencyChainBroken ().
- Stubbed dependencyNag ().
- Improved existing unit tests, added more.
2010-08-27 17:19:15 -04:00
Paul Beckingham
0e2c090dc5 Dependencies
- Added check for circular dependencies.
2010-08-26 22:52:57 -04:00
Paul Beckingham
58d678f927 Bug #480 - @ Symbol in context not returning
- Fixed bug #480, which didn't properly support @ characters in tags.
  The problem was that the ctype.h ispunct() function considers @,
  # and $ to be punctuation, which I don't.  An override now allows
  these characters in tags, and specificallt '+@context' style tags.
- Added unit tests.
2010-08-24 19:08:08 -04:00
Paul Beckingham
3cfcc9fb6b Bug
- The 'verbose' configuration variable was not considered valid.
2010-08-23 23:09:53 -04:00
Paul Beckingham
a1488d0504 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-08-23 23:08:37 -04:00
Paul Beckingham
547d3bfdbb Documentation
- Updated script with feedback.
2010-08-23 23:07:38 -04:00
Cory Donnelly
7d048a8ef8 Unit Tests - wait.t
- added unit test to demonstrate wait:tomorrow report issue
2010-08-23 12:42:06 -04:00
Paul Beckingham
44fe227595 Product Name Change
- Converted all (appropriate) uses of 'task' to 'taskwarrior'.
2010-08-21 12:31:00 -04:00
Paul Beckingham
a9b18da214 Feature #478
- Added feature #478, which uses the colorization rules in the 'info'
  report.
2010-08-21 00:30:24 -04:00
Paul Beckingham
5c235ce1ef Feature #471
- Added feature #471, which makes greater use of projects by reporting
  changes to the completion percentage when it changes.
- Added unit tests.
2010-08-20 23:53:57 -04:00
Paul Beckingham
d460e604ff Bug #470 - 'task rc.color.alternate:none list' shows incorrect colors
- Fixed bug #470, which caused task to not support the color 'none'.
  Simultaneous vitapi bug fix.
2010-08-17 23:17:44 -04:00
Paul Beckingham
612c613764 Dependencies
- Improved a few of the unit tests.
- Minor progress on the support functions.
2010-08-17 21:36:58 -04:00
Paul Beckingham
d9ec233d23 Packaging
- Updated the 'update' script that helps populate the package directory
  structure for OSX packages, to include the scripts/fish directory and
  contents.
2010-08-14 22:23:20 -04:00
Mick Koch
2c055157e6 Taskwarrior tab completion for the fish shell
Signed-off-by: Paul Beckingham <paul@beckingham.net>
2010-08-14 11:24:50 -04:00
Paul Beckingham
91d5448a5a Enhancement - Nibbler
- Added Nibbler::getQuoted with support for unescaping escaped quotes
  and for including the original quotes.
2010-08-13 00:48:05 -04:00
Paul Beckingham
80f9af08e3 Code Cleanup
- Removed unnecessary includes.
2010-08-13 00:47:23 -04:00
Paul Beckingham
63384abd14 Bug 466
- Fixed #466, which gave the wrong error message when a custom report
  was missing a direction indicator for the sort order.
- Added unit tests.
2010-08-13 00:42:36 -04:00
Paul Beckingham
c7cd2d2619 Bug #460
- Added rc.verbose that for now, just controls whether header and footer
  messages are displayed, but will ultimately control much more.
2010-08-10 22:10:01 -04:00
Paul Beckingham
d2fe093107 Unit Tests
- Fixed problem with determination of 'due today', which should have
  used Date::sameDay, but was based on old midnight dates.
2010-08-11 01:30:16 +00:00
Paul Beckingham
7c8793b146 Code Cleanup
- Fixed compiler warning on CentOS.
2010-08-11 01:29:01 +00:00
Paul Beckingham
ae56165c80 Bug
- Modified argument parsing to prevent assertions and seg faults.
- Added support for month names, with autocomplete.
- Added autocomplete for "due".
- Added unit tests to exercise all combinations, and errors.
2010-08-09 01:20:05 -04:00
Johannes Schlatow
d1abda2561 Code formatting 2010-08-09 00:44:22 +02:00
Paul Beckingham
d02eac07a9 Bug
- Fixed problem with extra blank line in the ghistory reports.
2010-08-08 18:16:36 -04:00
Paul Beckingham
2334911b34 Bug #440 - Parser fails to simultaneously subst and append
- The code wasn't even trying to apply the substitutions for the
  append and prepend commands.
2010-08-08 18:06:40 -04:00
Paul Beckingham
36c3cad5a5 Documentation
- Updated demo of aliases.
- Updated advanced filters section.
- Added import/export section.
2010-08-08 16:29:10 -04:00
Paul Beckingham
07e36e695d Bug - import
- Fixed bug that only allowed import of *text* if there was more
  than one line of it.
- Fixed some whacko formatting.
2010-08-08 16:26:40 -04:00
Paul Beckingham
1093119f40 Documentation - task-faq.5
- Added "how can I help?".
- Updated the question on regenerating a .taskrc file, because it is now
  a minimal set of settings.
- Updated the question on Cygwin color to mention mintty.
- Updated the question on building under Cygwin, referring to the README.build
  file.
2010-08-08 14:21:12 -04:00
Paul Beckingham
8789afb7da Documentation
- Added discussion of special tags.
- Referred more to the man pages for in-depth information.
2010-08-08 14:02:12 -04:00
Paul Beckingham
94bca5443a Documentation
- Added #421 'Data sync' to the ChangeLog.
2010-08-08 13:29:23 -04:00
Paul Beckingham
98042548dd Unit Tests
- All tests (I hope) now properly remove completed.data on exit, which
  should prevent certain non-deterministic tinderbox results caused by
  residual data.
2010-08-08 13:00:05 -04:00
Paul Beckingham
5b8dbd8ff1 Bug - import.yaml
- Fixed bug in import for YAML and TODO that failed to recognize that
  a task was completed or deleted, and consequently set a Task::pending
  status.
- Enhanced unit tests to verify this.
2010-08-08 11:06:58 -04:00
Paul Beckingham
41f2520094 Documentation
- Added merge command to the NEWS file.
2010-08-08 00:05:01 -04:00
Paul Beckingham
982ae87ec0 New Unused Code
- Added the outlines of the new Column code.  This is not compiled
  in 1.9.3, but will be in 1.9.4.
2010-08-07 23:55:14 -04:00
Paul Beckingham
0fe75eeedf Unit Tests
- Implemented YAML import/export roundtrip tests.
- Corrected export.yaml.t regarding headers.
- Modified export.yaml, export.csv and export.ical to clear any
  context.headers messages so they don't interfere with the output.
2010-08-07 22:38:03 -04:00
Paul Beckingham
3ae5b6ddc5 Bug #442 - "task edit" fails on Cygwin when using a Windows editor
- Made a partial fix that at least allows any editor to be launched,
  and that can then locate the file.
- Not addressed is the fact that some launchable Windows editors need
  Windows line encodings, and other are flexible.
2010-08-07 22:13:12 -04:00
Paul Beckingham
a306892509 Code Cleanup
- Removed unreachable code from Table::sort_compare.
2010-08-07 20:34:54 -04:00
Paul Beckingham
a8c8bf4671 Documentation
- Added the 'merge' command to the help output.
2010-08-07 20:14:01 -04:00
Paul Beckingham
6d5a03ac45 Documentation
- Changed 'remote' to 'second' in the merge discussion, which matches
  the term used in the paragraph.  This avoids using the loaded term
  'remote'.
2010-08-07 20:07:57 -04:00
Paul Beckingham
3bb7abf9c3 Bug - limit
- When the 'limit:N' filter was used, a confusing message was displayed,
  especially when there were fewer filtered tasks that the limit.
2010-08-07 20:05:34 -04:00
Paul Beckingham
f83cc3f39a Sorting
- Completed sort_compare routine to mimic 1.9.2, but using std::sort.
- Added blank task to the unit tests to prove the sorting is working
  (it wasn't), then fixed all.
2010-08-07 19:58:56 -04:00
Paul Beckingham
c95a55128a Documentation
- Added more to the movie script.
2010-08-07 13:34:49 -04:00
Paul Beckingham
3302a30145 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-08-07 11:53:51 -04:00
Paul Beckingham
599a90ad58 Documentation
- Promoted Johannes to significant contributor.
2010-08-07 11:53:31 -04:00
Johannes Schlatow
5f8f8b51c4 Bash completion
- Added filename completion for the merge command
2010-08-07 17:52:46 +02:00
Johannes Schlatow
7294869d07 Merge command
* Renamed command _merge into merge
2010-08-07 17:50:02 +02:00
Johannes Schlatow
b8a3c1b565 Man pages
- Added documentation of merge commmand to task.1 and task-faq.5
2010-08-07 17:49:17 +02:00
Paul Beckingham
03c9b96955 Output Cleanup
- No point display "blocked by" and "is blocking" in the info report
  if there are no other tasks to list.
2010-08-07 00:40:45 -04:00
Paul Beckingham
80d1c03457 Unit Tests
- All tests that sleep will now announce the duration of the sleep
  beforehand.
2010-08-07 00:22:05 -04:00
Paul Beckingham
6dd4067167 Unit Tests - urgency
- Implemented unit tests for calculating urgency.
2010-08-07 00:15:46 -04:00
Paul Beckingham
2c858c6988 Feature - urgency
- Added the urgency value to the 'info' report.
2010-08-06 19:04:56 -04:00
Paul Beckingham
d8544181ce Feature - Urgency
- Implemented the urgency algorithm according to rfc31.
- Added a new '_urgency' command to test the algorithm.
2010-08-06 19:04:01 -04:00
Paul Beckingham
3ac627978c Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-08-06 19:00:40 -04:00
Paul Beckingham
fce4633de6 Bug #459 - Error when using limit:n where n < lines on screen and < results
- Fixed bug that displays 'limit' result lines when it has no need to.
2010-08-06 18:58:34 -04:00
Johannes Schlatow
f6cfa1dfa5 Merge command
- Added call of gc() before executing the merge algorithm
- Removed workaround in unit test merge.t
2010-08-06 14:58:38 +02:00
Johannes Schlatow
aa891401e4 Hooks
- Applied patch from Johannes to add missing hooks.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2010-08-04 14:39:17 -04:00
Johannes Schlatow
c640e05049 Unit tests
- Added tests for class Taskmod
- Added tests for _merge command
2010-08-04 19:04:16 +02:00
Paul Beckingham
3945ccf019 Unit tests
- color.duetoday.t now tolerates 16- and 256-color variants of 'red'.
2010-08-04 08:18:15 -04:00
Paul Beckingham
1687e85335 Dependencies
- Implemented/stubbed some of the dependency helper functions.
2010-08-04 00:55:08 -04:00
Paul Beckingham
b050d67ba9 Dependencies
- Added TDB::gc code to remove dangling dependencies.
2010-08-04 00:43:38 -04:00
Paul Beckingham
cade134f40 Unit tests
- Fixed bug in color.duetoday.t:  now that the definition of overdue
  means 'due < now', adding a task with 'due:now' instantly creates
  an overdue task, not a due task.  To create a due task, use 'due:1hr'
  or some duration which gets added to now.
2010-08-03 23:12:40 -04:00
Paul Beckingham
92ede80e4b Unit tests
- Fixed export.yaml.t because 'tail +2 file' does not work on tasktools.org.
2010-08-03 23:07:18 -04:00
Paul Beckingham
448f865cf1 Code Cleanup
- Fixed compiler warning in text.cpp.
2010-08-03 22:55:08 -04:00
Paul Beckingham
e26f29537a Documentation
- Added sections on the task shell and advanced filters.
2010-08-03 13:39:57 -04:00
Cory Donnelly
d85579d69f Documentation
- Fixed a few typos in the script for the new movie and revised tutorial.
2010-08-03 12:57:22 -04:00
Paul Beckingham
462c3e1c55 Documentation
- Updates to the script for the new movie and revised tutorial.
2010-08-03 00:05:49 -04:00
Paul Beckingham
70bf3099ee Bug
- Fixed bug in extractLine that performed std::string::length when it
  should have use the new characters function.  The problem was incorrect
  hyphenation with utf8 text in narrow fields.
2010-08-02 17:58:55 -04:00
Paul Beckingham
db27328558 Unit tests
- The dependencies.t unit test script failed to unlink completed.data,
  which polluted the subsequent test script.
- Simplified some Perl in start.t.
- Allowed for line wrapping in start.t.
2010-08-02 17:56:34 -04:00
Paul Beckingham
e090f556da Feature #244, #272, #274, #275
- Implemented export.yaml, import (yaml).
- Updated man page.
- 'export' is now an alias to 'export.yaml'.
- Added missing 'tags' attribute as an internal Att.
- Improved recognition of YAML.
- Added unit tests for export.yaml, import (yaml).
- Added missing unlink from dependencies.t
2010-08-02 17:55:23 -04:00
Paul Beckingham
f60205c704 Documentation
- Modified old task movie script.
- Added new 1.9.3 task movie script, which will form the basis of the
  new tutorial.
2010-08-02 01:16:29 -04:00
Paul Beckingham
233a6ae951 Bug
- Fixed problem with the 'undo' command not observing the rc.color or the
  rc._forcecolor settings.
2010-08-02 01:00:20 -04:00
Paul Beckingham
d890e05298 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-08-01 13:08:00 -04:00
Paul Beckingham
2f1c582d7d Code Cleanup
- Relocated the Table::getCharLength() from Johannes to text.cpp/characters()
  because it is a general-purpose function, and will be the start of the UTF8
  conversion of all text.cpp code.
- Added unit tests for characters().
2010-08-01 13:05:53 -04:00
Cory Donnelly
cddc2d5f10 Revert "Documentation"
This reverts commit 44e7a24170. I just saw that
Fredde intentionally removed X-2 versions from the OS list in NEWS.
2010-08-01 10:11:11 -04:00
Cory Donnelly
44e7a24170 Documentation
- Added Mac OS X Tiger to NEWS
2010-08-01 10:05:16 -04:00
Cory Donnelly
471571e493 Unit Tests - UTF-8 characters in reports
- Added bug.455.t for Bug #455 - Text alignment in reports is broken when text
  contains utf8 characters
2010-08-01 09:56:41 -04:00
Johannes Schlatow
6e1aa42d1a Bug #455 - Text alignment in reports is broken when text contains utf8 characters
- Applied patch from Johannes.
- Also included extra calls to getCharLength in other parts of the code.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2010-08-01 09:30:42 -04:00
Johannes Schlatow
3939503377 Bug #453 - Priorities are sorted inconsistently (asc vs. desc)
- Patch to correct the sorting of priorities, which had a condition
  flipped making the Table::descendingPriority consider a missing
  priority to be 'higher' than 'H'.
2010-07-31 09:03:01 -04:00
Paul Beckingham
fecdb930d4 Enhancement (related to #452)
- A task is now considered overdue if it is past the due date, not
  due before today.
2010-07-30 22:54:55 -04:00
Paul Beckingham
d0db821298 Bug 452 - Need relative date value 'now' to fully support times
- Added 'now' as a relative date.
- Modified 'overdue' report to use 'now' instead of 'today' as the
  distinction between due and overdue.
2010-07-30 22:50:20 -04:00
Paul Beckingham
1cf1e79e43 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-30 22:33:08 -04:00
Cory Donnelly
69c3ba6f59 Documentation
- Comment for getDueState() updated to reflect actual return values
2010-07-30 09:47:55 -04:00
Paul Beckingham
9cab648d8a Merge branch 'sort' into 1.9.3 2010-07-29 14:50:54 -04:00
Paul Beckingham
2ef30b1183 Bug 449 - Inconsistent wait: attribute results
- Fixed bug #449, so the wait: attribute can be applied to a task at any
  time, not just on add.
- While searching for problems with the waiting status, noticed that
  importCSV doesn't appear to set any tasks to pending status.
2010-07-28 23:22:59 -04:00
Paul Beckingham
4d266412ee Unit Tests - Date
- Added unit tests for Date::operator-.
2010-07-28 19:58:32 -04:00
Paul Beckingham
e44c4ffb82 Unit Tests - Duration
- Added tests for Duration::negative.
2010-07-28 19:46:51 -04:00
Paul Beckingham
bef7b9b655 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-28 17:56:43 -04:00
Paul Beckingham
209a7b8cee Unit Tests - wait
- Added unit tests to prove that the wait: attribute is working,
  which it is not.
2010-07-28 17:54:11 -04:00
Paul Beckingham
3952765de0 Bug 445 - The command 'task h' should be ambiguous, yet works
- Fixed bug #445, which caused task to not notice that the command 'h' is
  ambiguous.  This was caused by mistakenly first autoCompleting against
  a set of alias names, during canonicalization, instead of autoCompleting
  against the whole set of possible commands and aliases, then doing the
  canonicalization.  The order was reversed.
- Also populated list of all commands with alias names, so the above
  could be corrected.
2010-07-28 17:50:47 -04:00
Paul Beckingham
e886f7635b Enhancement
- When presenting lists of ambiguous command, attributes and modifiers
  to the user, it is now a sorted list.
2010-07-28 17:47:58 -04:00
Federico Hernandez
76fa56d3fb Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-28 18:08:44 +02:00
Federico Hernandez
903b5b34d4 Feature #446 - start of {week, month, year}
- Bug fix for som and soy.
- Added synonyms soww and eoww for sow and eow.
- Added start/end of calendar week: socw and eocw.
2010-07-28 18:07:09 +02:00
Cory Donnelly
189fdaf9ac Bug #444 - Interactive undo locks pending.data and doesn't give it up
- TDB::undo () now exits gracefully when a user declines to proceed with
  the undo, ensuring context.tdb.unlock () is called
2010-07-28 10:18:34 -04:00
Federico Hernandez
96bd3ff8db Feature #446 - start of {week, month, year}
- Added sow (depending on rc.weekstart), som and soy as possible
  dates (similar to eow, eom and eoy).
2010-07-28 00:15:26 +02:00
Federico Hernandez
a6fbb40a12 Added GPL and copyright information to color themes and holiday files 2010-07-27 23:17:26 +02:00
Cory Donnelly
78edb61c4c Bug #444 - Interactive undo locks pending.data and doesn't give it up
- flock() now uses LOCK_EX | LOCK_NB so it won't wait for the file lock
2010-07-26 14:02:37 -04:00
Paul Beckingham
3846954c42 Feature #43 - Relative dates: +3d, -2w
- Added feature #43, now task supports relative dates like '3wks',
  '1 month', '4d' for 'due', 'wait' and 'until' dates.  Essentially
  durations are now allowed where dates are expected, and are treated
  as relative to the current date/time.
2010-07-25 23:14:52 -04:00
Paul Beckingham
7468a2d81d Feature #43 - relative dates: +3d, -2w
- Now dates (due, wait, limit) are parsed first as Durations, and on
  error reparsed as Date.  When a Duration is found instead of a Date,
  the Duration is added to the current date/time.
2010-07-25 22:11:25 -04:00
Paul Beckingham
123a46eef9 Enhancement/Fixes - Duration
- Reorganized Duration::valid and Duration::parse to use the same list
  of supported constructs.
- Added missing copy constructor.
- Added missing ctor initializer list.
- Corrected handling of negative time_t values.
- Added support for more duration formats.
- Corrected autoComplete use.
- Added Duration::negative.
- Corrected unit test descriptions.
2010-07-25 22:05:02 -04:00
Paul Beckingham
cb4fe4fffb Enhancement - Date::operator-
- Implemented Date::operator-, to allow subtractions of Durations.
2010-07-25 22:02:41 -04:00
Paul Beckingham
031c4c484d Instrumentation
- Added timing measurement for table sorting.
- Added timing measurement for table composition.
2010-07-25 15:02:35 -04:00
Paul Beckingham
43266a825f Feature #391 - legendary enhancement
- Added feature #391, now the 'task color legend' command will show
  samples of all the defined colors and color rules from your .taskrc
  and theme.
2010-07-25 14:50:20 -04:00
Paul Beckingham
7dc55d831d Code Reorganization
- Beginning to stub out the dependency helper functions in the new
  file dependency.cpp.
2010-07-24 06:38:08 -07:00
Paul Beckingham
6f67c0093d Code Cleanup
- Made the Color::blend code structure match that in vitapi, for
  easier comparison.
2010-07-23 22:47:51 -07:00
Paul Beckingham
eeeff7d389 Bug
- Fixed problem with command line configuration overrides that had no
  values.
2010-07-23 22:33:02 -07:00
Paul Beckingham
5cecc3d772 Enhancement - color.alternate
- The 'stats' and 'info' reports now obey color.alternate.
2010-07-23 22:31:38 -07:00
Paul Beckingham
a3f1aba6f0 Code Cleanup
- Reorganized sort_compare code to make certain shortcuts occur
  earlier in processing.
2010-07-23 20:57:36 -07:00
Paul Beckingham
30cb5fa4f4 Bug #441 - A colon messes up text replacement with ///
- Fixed bug #441, which misparsed '/a/a:/' as an attribute, rather than a
  substitution (thanks to Michelle Crane).
2010-07-23 17:30:14 -07:00
Paul Beckingham
e8c0c8861b Unit tests - bug.441.t
- Added unit test for bug 441, where /one/one:/ fails to substitute,
  and instead clobbers the whole description.
2010-07-23 17:16:54 -07:00
Cory Donnelly
9906174547 Unit Tests - dependencies.t
- More progress made on dependencies.t, getting to the point where
additional unit tests will need to wait until features exist.
2010-07-23 13:43:30 -04:00
Cory Donnelly
fb2d08581e Unit Tests - dependencies.t
- Added more unit tests to dependencies.t, still more still to go
2010-07-22 21:28:28 -04:00
Paul Beckingham
feeafb9b23 Enhancement - special tags
- Implemented the 'nocal' special tag.
2010-07-22 16:17:28 -07:00
Paul Beckingham
a345541ff7 Documentation - special tags
- Special tags are now documented in task.1.
- The 'tags' command now highlights special tags.
2010-07-22 16:02:12 -07:00
Federico Hernandez
9a973770d8 Missing include under Linux 2010-07-22 13:10:40 +02:00
Paul Beckingham
e0c60346dc Unit Tests - countdown
- Made tests a bit more generic and less sensitive to time of day.
2010-07-21 23:37:27 -07:00
Paul Beckingham
faa96dbf6b Enhancement - sort
- Tweaks to the comparison function.
2010-07-21 23:36:54 -07:00
Paul Beckingham
f9e78142be Merge branch 'sort' into 1.9.3 2010-07-21 15:33:24 -07:00
Paul Beckingham
da9985058b Enhancement - Sorting
- Replaced the hand-written combsort with std::sort.
- Added exhaustive set of unit tests to cover the single and double
  column sort orders.
2010-07-21 15:30:37 -07:00
Cory Donnelly
bdbe4ba78a Unit Tests
- Added many unit tests to dependencies.t, with many more still to go
2010-07-21 12:17:49 -04:00
Cory Donnelly
3ec8d2fece Bug #433 - Missing punctuation in some command output
- Missed something in Filter.cpp
2010-07-21 11:55:56 -04:00
Cory Donnelly
1528fdc7e1 Unit Tests
- Created unit test bug.425.x for unaddressed Bug #425 - Parser preventing
  editing of an existing task depending on description
2010-07-20 21:35:28 -04:00
Paul Beckingham
e34f278e1d Documentation
- Commented the code to suggest that T and Z should never be used in
  Date::Date.
2010-07-20 17:36:24 -07:00
Paul Beckingham
455be5b8b7 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-20 17:21:57 -07:00
Paul Beckingham
9df86d9aab Documentation Update
- Removed deprecated fields.
2010-07-20 17:21:40 -07:00
Cory Donnelly
0e9ce4c85f Bug #440 - Parser recognizes an attempt to simultaneously subst and append, but doesn't do it
- Added unit test
2010-07-20 20:17:31 -04:00
Paul Beckingham
4ca69b013f Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-20 16:57:59 -07:00
Paul Beckingham
1a34a29b7a Bug #438 - Reports sorting by end_time, start_time, and entry_time are ordered incorrectly
- Fixed bug #438, correcting the sorting of the entry_time, start_time
  and end_time columns (thanks to Michelle Crane).
- Reordered ChangeLog so that bugs, features are in sequence.  Don't know
  why I did this.  Some inner compulsion.
- Deprecated silly start_time, end_time and entry_time columns, which are
  now (and were) superseded by start, end and entry columns with time formats.
- Config.cpp now detects use of these deprecated fields and complains to the
  show command.
- Date.cpp now uses the variable 'input' instead of 'mdy', which was confusing
  and implied that it contained a date without a time.
- Obsoleted and removed Date::toStringWithTime, which ignored requested formats.
- When checking for an epoch, Date::isEpoch just looked for strings of more
  than 8 digits.  The additional restriction of less than or equal to 10 digits
  was added.  This was breaking unit tests using the dateformat YMDHNS, which is
  reasonable.
- Removed the obsolete field format hooks format-entry_time, format-start_time
  and format-end_time
- Removed the obsolete field format hook unit tests hook.format-entry_time.t,
  hook.format-start_time.t and hook.format-end_time.t.
- Removed use of deprecated field in hook.format-countdown_compact.t.
- Added missing shortcut comparisons in Table::sort that was causing an
  unnecessary full parse of dates even if they were identical as strings.
- Coded entry_time as a synonym for entry.  Ditto for start_time and end_time.
- Marked the new synonyms as deprecated.
- Added bug.438.t unit test.
- Added deprecated fields to the NEWS file.
2010-07-20 16:57:41 -07:00
Cory Donnelly
1bb21f9982 Unit Tests
- Added a unit test for sorting reports by countdown value
  (there was some confusion about proper behaviour, see
  Bug #432.)
2010-07-20 19:37:44 -04:00
Paul Beckingham
a57326a026 Documentation
- Modified description of journal.time entry.
2010-07-20 14:45:04 -07:00
Paul Beckingham
3f6358fea0 Feature - import.yaml
- Not fully implemented (need research on libyaml first), but the
  file type recognition and stubs are there.
2010-07-20 14:30:07 -07:00
Federico Hernandez
81a5461d92 ChangeLog editing 2010-07-20 22:19:03 +02:00
Federico Hernandez
af3f60cfeb Bug #439 - dateformat.annotation not considered
- dateformat.annotation were not considered when doing annotation=sparse
2010-07-20 22:11:42 +02:00
Federico Hernandez
445dc415d0 Fixed missing color.blocked in the recognized string 2010-07-20 22:06:37 +02:00
Federico Hernandez
afb4d64a0c Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-20 20:21:51 +02:00
Federico Hernandez
942f665d71 Feature #189 - annotation of start and stop times
- task can now record the invocation of the 'start' and 'stop'
  command as an annotation by setting journal.time to yes.
- the annoatation test can be customized with
  journal.time.start.annoation and
  journal.time.stop.annotation
2010-07-20 20:19:34 +02:00
Cory Donnelly
51c357af2e Unit Tests
- Added unit tests for history.monthly and history.annual
2010-07-20 12:17:50 -04:00
Federico Hernandez
5ac0bd3800 Feature #428 - detailed listing of new commands
Prepared the new structur to add new or changed commands and configuration
options to the NEWS files.
2010-07-20 15:24:35 +02:00
Federico Hernandez
bdaf403a1c ChangeLog entry for prev. fixed bug #427 2010-07-20 14:08:34 +02:00
Federico Hernandez
1b2cfd427c Bug #427 - Task edit can't correctly parse annotations with times
Task edit was assuming a space as separator between the date and
text field of an annotation. As the dateformat for an annotation
now can be more flexible incl. time and spaces, task couldn't
parse the annotation lines of task edit correctly anymore. The bug
was fixed by introducing a new separator ' --' between the date
and text parts of an annotation.
2010-07-20 13:59:58 +02:00
Cory Donnelly
9a50c0b963 Bug #434 - Task shouldn't prevent users from marking as done tasks with status:waiting
- Added unit test
2010-07-19 13:22:55 -04:00
Cory Donnelly
6864ff91cd Bug #434 - Task shouldn't prevent users from marking as done tasks with status:waiting
- Users can now complete tasks with status:waiting in addition to status:pending
2010-07-19 10:57:20 -04:00
Cory Donnelly
d6a2c1872c Bug #433 - Missing punctuation in some command output
- Made punctuation consistent throughout the code and addressed a few
    broken tests.
2010-07-18 19:06:07 -04:00
Cory Donnelly
c43eb31374 Feature #431 - The log command doesn't provide any output on success
- Now states that the task was logged.
2010-07-17 19:36:42 -04:00
Paul Beckingham
89eb8371ba Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-17 19:35:40 -04:00
Cory Donnelly
3dca0283f4 Feature #431
- Added feedback after running the 'log' command, because task was
  otherwise silent.
2010-07-17 19:35:21 -04:00
Cory Donnelly
5776d608c0 Enhancement
- Added feedback after running the 'log' command, because task was
  otherwise silent.
2010-07-17 19:33:19 -04:00
Paul Beckingham
63e42c6607 Feature 429 - The default 'all' report should exclude tasks with status:deleted
- Added feature #429, which improves the 'all' report to exclude deleted
  tasks, provide a new sort order and include the 'end' column.
2010-07-16 22:39:07 -04:00
Paul Beckingham
9385492114 Unit Tests
- Corrected expected number of unit tests so that the tinderbox is not
  thrown off, because tests aren't failing.
2010-07-15 08:39:11 -04:00
Paul Beckingham
beef03af13 Unit Tests
- Fixed several tests that were broken, and generated diagnostic output,
  but didn't fail in the traditional sense.  This was found by looking
  through the tinderbox data file.
2010-07-14 09:13:44 -04:00
Paul Beckingham
10a8916eb1 Merge branch '1.9.3' of tasktools.org:task into 1.9.3 2010-07-12 20:30:53 -04:00
Paul Beckingham
45bb3dd583 Unit Tests
- Added unit tests for the color.blocked rule.
- Added unit tests for dependencies (placeholder).
- Added unit tests for the format-depends hook.
2010-07-12 20:28:44 -04:00
Paul Beckingham
64344d0328 Dependencies - blocked
- The blocked report now shows the dependencies as well as restricting
  the tasks to those that are blocked.
2010-07-12 20:27:46 -04:00
Paul Beckingham
bcd2a79a54 Dependencies - next
- The next report now longer shows blocked tasks.
2010-07-12 20:27:04 -04:00
Paul Beckingham
7233fcd05b Dependencies - add
- Allowed dependencies to be specified when adding a new task.
2010-07-12 20:25:33 -04:00
Paul Beckingham
54cf7e5471 Dependencies - info
- Added blocked and blocking tasks to the info report.
2010-07-12 20:24:29 -04:00
Paul Beckingham
19b803312f Dependencies - TDB
- Allowed const access to the internal lists of the TDB object.
2010-07-12 20:22:51 -04:00
Paul Beckingham
27a56d15db Dependencies - log
- Prevent completed tasks, via the log command, from being marked
  as dependent.
2010-07-12 20:21:46 -04:00
Paul Beckingham
98cef98111 Dependencies - depend on self
- Prevented tasks from being specified as depending on themselves.
2010-07-12 20:19:02 -04:00
Paul Beckingham
d87e7c6934 Performance
- Switched Hooks to a hash lookup, instead of linearly comparison.
2010-07-12 20:17:59 -04:00
Paul Beckingham
fdf7d2203f Dependencies
- Added new color.blocked to all themes (placeholders for now).
- Added new color rule for applying color.blocked.
2010-07-12 20:14:07 -04:00
Federico Hernandez
f814435939 Unit tests
- changed run_all script to bash
2010-07-12 21:52:47 +02:00
Federico Hernandez
5af7e3a7b7 Typo in packaging readme for OS X 2010-07-12 21:52:14 +02:00
Paul Beckingham
8c3fd40c1b Report - blocked
- Added new 'blocked' report.
2010-07-12 02:19:57 -04:00
Paul Beckingham
e9c8bcff63 Enhancement - default .taskrc
- Now relies completely on default colors, but include the seven
  themes, all commented out, for ready use.
2010-07-12 02:10:01 -04:00
Paul Beckingham
7a23b67020 Enhancement
- Minimized the default .taskrc file that is generated.  It now relies
  heavily on default values, but supplies data.location, and includes
  the default theme.
- Updated taskrc.5 man page to include new depends column.
2010-07-12 02:06:46 -04:00
Paul Beckingham
93e862b367 Dependencies
- Added 'depends' to Config.cpp.
- Added formatting for the 'depends' column.
- Added notes to t.t.cpp regarding missing tests.
2010-07-12 01:45:53 -04:00
Paul Beckingham
90c40dbebf Dependencies
- Added 'depends' as a valid report column.
- Added 'depends' to the 'long' report.
- Updated hook.format*t unit tests to accommodate new long report.
- Added new join () function that handles std::vector<int>.
- Updated text.t unit tests.
2010-07-12 01:42:52 -04:00
Paul Beckingham
7e5c0eb9a5 Dependencies
- Supports new "depends" attribute.
- Supports "task <id> depends:1,2".
- Supports "task <id> depends:-1,-2".
- Supports id <--> uuid mapping in TDB.
2010-07-12 01:05:25 -04:00
Paul Beckingham
c6f6d405e3 Documentation
- #423 was a feature, not a bug.
2010-07-11 14:05:50 -04:00
Paul Beckingham
b29f9969e5 Bug - #423
- The report.foo.filter line in a report definition accepts attributes
  as filters, but not rc overrides.
- Added unit tests.
2010-07-11 14:03:15 -04:00
Paul Beckingham
254b418708 Code Cleanup
- The "next" command had two control paths.  One was via custom reports
  (correct) and the other was a residual handler (obsolete), which is
  now removed.  This also simplifies a handleCustomReport/runCustomReport
  issue.
2010-07-11 12:50:41 -04:00
Paul Beckingham
307027a1d9 Documentation Update
- Improved taskrc man page with examples for creating a sort filter.
- Corrected the list of reportable fields.  It was badly out of date.
2010-07-11 11:44:07 -04:00
Paul Beckingham
2b48ae8e38 Enhancement - export.yaml
- Preliminary export.yaml support.  No unit tests yet, and no decision
  on including this feature.  It may be that libyaml is the right choice,
  as an optional dependency.
2010-07-11 10:22:36 -04:00
Federico Hernandez
8b02d2bdeb Bumped version number to 1.9.3 2010-07-11 00:24:36 +02:00
Federico Hernandez
28dd5152d7 RE-Added SHA1 of tagged release commit
- wrongly added sha1sum of release tar ball to ChangeLog
  instead of sha1 of the tagged release commit
2010-07-11 00:12:15 +02:00
Federico Hernandez
9ed05fc1c8 Added SHA1 of tagged release commit 2010-07-11 00:10:34 +02:00
396 changed files with 22030 additions and 3676 deletions

18
AUTHORS
View File

@@ -1,11 +1,15 @@
The development of task was made possible by the significant contributions of the following people:
The development of taskwarrior 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)
Johannes Schlatow (Contributing Author)
The following submitted code, packages or analysis, and deserve special thanks:
Damian Glenny
Andy Lester
H. İbrahim Güngör
@@ -21,12 +25,17 @@ The following submitted code, packages or analysis, and deserve special thanks:
Pietro Cerutti
Alexander Neumann
Emil Sköldberg
Johannes Schlatow
Michal Josífko
Ed Neville
Kevin Owens
Mick Koch
Kathryn Andersen
Alexander Schremmer
Jostein Berntsen
Thanks to the following, who submitted detailed bug reports and excellent
suggestions:
Thanks to the following, who submitted detailed bug reports and excellent suggestions:
Eugene Kramer
Srijith K
Bruce Israel
@@ -52,4 +61,5 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges
Seneca Cunningham
Dirk Deimeke
Michelle Crane
Elizabeth Maxson
Peter De Poorter

102
ChangeLog
View File

@@ -1,7 +1,105 @@
------ current release ---------------------------
1.9.2 (7/10/2010)
1.9.3 (11/08/2010)
+ Added feature #43, now task supports relative dates like '3wks',
'1 month', '4d' for 'due', 'wait' and 'until' dates. Essentially
durations are now allowed where dates are expected, and are treated
as relative to the current date/time.
+ Added feature #189, that records the start and stop times as an
annotation for a task.
+ Added features #244, #272, #273, #274, #275 and #279, which support
import and export of YAML 1.1. YAML is now the default export format
for task.
+ Added feature #391, now the 'task color legend' command will show
samples of all the defined colors and color rules from your .taskrc
and theme.
+ Added feature #410, and now task supports dependencies between tasks
with the syntax 'task 1 depends:2' to add a dependency, or 'task 1
depends:-2' to remove a dependency.
+ Added feature #421, and now task can sync data files from two sources
via the 'merge' command.
+ Added feature #423, now custom report filters allow rc overrides.
+ Added feature #428, preparing the new structure for the NEWS file.
+ Added feature #429, which improves the 'all' report to exclude deleted.
tasks, provide a new sort order and include the 'end' column.
+ Added feature #431, which improves feedback after running the 'log'
command.
+ Added feature #446, task supports now 'sow', 'som' and 'soy' as dates
for 'due', 'wait' and 'until' (thanks to T. Charles Yun).
Added as well synonyms soww/eoww plus new socw/eocw for calendar weeks.
+ Fixed bug #467, where recurring tasks were not honoring wait values.
+ Added feature #471, which makes greater use of projects by reporting
changes to the completion percentage when it changes.
+ Added feature #478, which uses the colorization rules in the 'info'
report.
+ Added feature #481, allowing for user control of the color rule order
of precedence via the 'rule.precedence.color' configuration variable.
+ Fixed bug #493, which made waiting, recurring tasks invisible (thanks to
Alexander Schremmer).
+ Added feature #499, giving an extra line in the message output when
doing bulk done changes (thanks to T. Charles Yun).
+ New 'depends' column for custom reports.
+ New 'blocked' report for showing blocked tasks.
+ New 'unblocked' report for showing tasks that are not blocked.
+ Improved man pages (thanks to Andy Lester).
+ Default .taskrc files are now largely empty, and rely almost completed
on default values.
+ Special tags 'nocal', 'nocolor' and 'nonag' are implemented.
+ The 'tags' command highlights special tags.
+ The 'stats' and 'info' reports not obey color.alternate.
+ New fish shell tab completion script (thanks to Mick Koch).
+ Color rules now obey the rc.search.case.sensitive configuration option.
+ The color.keyword.XXX color rule now applies to annotations too.
+ Importing the same YAML twice now generates an error.
+ Two new color themes (thanks to Kathryn Andersen).
+ More localized holiday files for US, CA, SE, DE, FR, UK, ES, NL and NO
(thanks to T. Charles Yun, Jostein Berntsen).
+ Added new 'diagnostics' command to help with bug submission, testing.
+ Fixed bug #427, preventing the task edit command to parse annotation
dates with spaces.
+ Fixed bug #433, making task command output more consistent.
+ Fixed bug #434, allowing users to complete tasks with status 'waiting'
+ Fixed bug #438, correcting the sorting of the entry_time, start_time
and end_time columns (thanks to Michelle Crane).
+ Fixed bug #439, which ignored dateformat.annotation for sparse annotations.
+ Fixed bug #440, which prevented simultaneous append/prepend and substitution.
+ Fixed bug #441, which misparsed '/a/a:/' as an attribute, rather than a
substitution (thanks to Michelle Crane).
+ Fixed bug #444, which made task shell unusable after canceling out of an
undo command.
+ Fixed bug #445, which caused task to not notice that the command 'h' is
ambiguous.
+ Fixed bug #449, so the wait: attribute can be applied to a task at any
time, not just on add.
+ Fixed bug #452, which defines a higher resolution division between due
and overdue.
+ Fixed bug #459, which showed a confusing message when 'limit:page' was
used, with few tasks.
+ Fixed bug #461, in which the filter 'due:today' failed, but 'due.is:today'
worked.
+ Fixed bug #466, which gave the wrong error message when a custom report
was missing a direction indicator for the sort order.
+ Fixed bug #470, which caused task to not support the color 'none'.
+ Fixed bug #476, so that task now issues a warning when a wait date falls
after a due date (thanks to T. Charles Yun).
+ Fixed bug #480, which didn't properly support @ characters in tags. This
also now supports $ and #.
+ Fixed bug #489, which caused the filter 'tags.none:' to fail.
+ Fixed bug #494, causing imported text files to ultimately lack uuids
(thanks to Elizabeth Maxson).
+ Fixed problem with command line configuration overrides that had no
values.
+ Fixed problem with the 'undo' command not observing the rc.color or the
rc._forcecolor settings.
+ Fixed problem with extra blank line in the ghistory reports.
+ Fixed a precision problem with average age on the summary report.
+ Clarified the documentation regarding the project name (taskwarrior) and
the program name (task).
------ old releases ------------------------------
1.9.2 (7/10/2010) a13989f18eb34b3363f433c965084b6491425b9f
+ Added feature #320, so the command "task 123" is interpreted as an implicit
"task info 123" command (thanks to John Florian).
+ Added feature #326, allowing tasks to be added in the completed state, by
@@ -61,8 +159,6 @@
+ Fixed wording (support issue #383) when modifying a recurring task (thanks
to T. Charles Yun).
------ old releases ------------------------------
1.9.1 (5/22/2010) 60a99725b858be134ad538cb7c1a32c98de70e67
+ Summary report bar colors can now be specified with color.summary.bar
and color.summary.background configuration variables.

View File

@@ -1,6 +1,6 @@
SUBDIRS = src
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
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 doc/man/task-sync.5
#docdir = $(datadir)/doc/${PACKAGE}-${VERSION}
doc_DATA = AUTHORS ChangeLog COPYING NEWS README
@@ -20,5 +20,5 @@ 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 doc/rc/dark-blue-256.theme doc/rc/dark-green-256.theme doc/rc/dark-red-256.theme
dist_rcfile_DATA = doc/rc/holidays-CA.rc doc/rc/holidays-DE.rc doc/rc/holidays-ES.rc doc/rc/holidays-FR.rc doc/rc/holidays-NL.rc doc/rc/holidays-SE.rc doc/rc/holidays-UK.rc doc/rc/holidays-US.rc doc/rc/dark-16.theme doc/rc/dark-256.theme doc/rc/light-16.theme doc/rc/light-256.theme doc/rc/dark-blue-256.theme doc/rc/dark-green-256.theme doc/rc/dark-red-256.theme doc/rc/dark-violets-256.theme doc/rc/dark-yellow-green.theme

87
NEWS
View File

@@ -1,38 +1,95 @@
New Features in task 1.9.2
New Features in taskwarrior 1.9.3
- New 'log' command to add tasks that are already completed.
- New annual history and ghistory command variations.
- Alias support in shell completion scripts.
- New iCalendar/vcalendar export format (RFC-2445, RFC-5545, RFC-5546).
- New 'show' command to display configuration settings.
- New 'denotate' command to delete annotations.
- New 16-color and 256-color themes included.
- New limit:page filter to show only one page of tasks.
- Performance enhancements.
- Start and stop times for a task can now be recorded as annotations.
- Special tags 'nocolor', 'nocal' and 'nonag'.
- Now supports durations in dates, such as:
$ task ... due:4d
$ task ... due:3wks
- 'sow', 'som' and 'soy' are now accepted in dates. 'soww' and 'eoww' are
now synonyms for 'sow' and 'eow' (ww = working week) 'socw' and 'eocw'
refer to the calendar week (starting Sunday/Monday and
- Now supports the beginning of the week, month and year in dates.
- Now supports 'now' as a date/time.
- Now defines an overdue task as being one second after the due date,
instead of the day after the due date.
- Import and export of YAML 1.1, including round-trip capability, and
detection of duplicate imports.
- New merge capability for syncing task data files.
- New push capability for distributing merged changes.
- New pull capability for copying data files from a remote location.
- When completing or modifying a task, the project status is displayed.
- The 'info' report is now colorized.
- Certain characters (#, $, @) are now supported for use in tags.
- User-controlled color rule precedence.
- Two new color themes.
- New holiday files for US, SE, DE, CA, FR, UK, ES, NL and NO localizations.
- Task dependencies, and new 'blocked' and 'unblocked' reports for list
those tasks.
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:
New commands in taskwarrior 1.9.3
- New 'task color legend' command will show samples of all the defined colors
and color rules from your .taskrc and theme.
- New 'task export.yaml' command will export YAML 1.1, which can then be
imported via 'task import <file>'.
- New 'task merge <url>' command that can merge the local and an undo.data
file from another taskwarrior user, to sync across machines, for example.
- New 'task push <url>' command to distribute merged changes.
- New 'task pull <url>' command to copy data files from a remote location.
- New 'diagnostics' command to aid bug reporting.
New configuration options in taskwarrior 1.9.3
- journal.time, journal.time.start.annotation, journal.time.stop.annotation
ending Saturday/Sunday).
- Color rule precedence can now be explicitly set with the configuration
variable rule.precedence.color. Try "task show rule.pre" to show the
default settings.
- merge.autopush to control whether pushing after merging is automated.
- merge.*.uri to configure source locations for the merge command
(e.g. merge.default.uri).
- push.*.uri to configure target locations for the push command.
- pull.*.uri to configure source locations for the pull command.
- dependency.confirm controls whether dependency chain repair needs to be
confirmed.
- dependency.reminder controls whether the user is nagged about dependency
chain violations.
Newly deprecated features in taskwarrior 1.9.3
- entry_time, start_time and end_time are now synonyms for the entry, start
and end fields. Recent enhancements to date formatting render these fields
obsolete. The 'task show' command warns of the use of these deprecated
fields. The synonyms will be removed in a future version of taskwarrior.
---
Taskwarrior has been built and tested on the following configurations:
* OS X 10.6 Snow Leopard and 10.5 Leopard
* Fedora 13 Goddard, 12 Constantine
* Ubuntu 10.04 Lucid Lynx, 9.10 Karmic Koala
* Ubuntu 10.10 Maverick Meerkat, 10.04 Lucid Lynx
* Debian Sid
* Slackware 12.2
* Arch Linux
* Gentoo Linux
* SliTaz Linux
* CRUX Linux
* SuSE 11.3
* 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 enter a new issue at:
---
While Taskwarrior has undergone testing, bugs are sure to remain. If you
encounter a bug, please enter a new issue at:
http://taskwarrior.org/projects/taskwarrior/issues/new
@@ -45,5 +102,3 @@ Or just send a message to:
support@taskwarrior.org
Thank you.
---

12
README
View File

@@ -1,10 +1,10 @@
Thank you for taking a look at task!
Thank you for taking a look at taskwarrior!
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:
Taskwarrior 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. Taskwarrior has binary distributions, online
documentation, demonstration movies, and you'll find all the details at:
http://taskwarrior.org
@@ -18,6 +18,6 @@ Please send your support questions and code patches to:
support@taskwarrior.org
Consider joining taskwarrior.org and participating in the future of task.
Consider joining taskwarrior.org and participating in the future of taskwarrior.
---

View File

@@ -1,14 +1,14 @@
Task Build Notes
Taskwarrior 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.
Taskwarrior 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.
If taskwarrior 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.
@@ -16,7 +16,7 @@ Operating System Notes
----------------------
Cygwin 1.7
Building task on Cygwin 1.7 requires a configure option:
Building taskwarrior on Cygwin 1.7 requires a configure option:
./configure --with-ncurses-inc=/usr/include/ncurses
@@ -25,7 +25,7 @@ Cygwin 1.7
Haiku Alpha/R1
Task must be built with gcc version 4.x, so make sure you run:
Taskwarrior must be built with gcc version 4.x, so make sure you run:
$ setgcc gcc4
@@ -84,15 +84,15 @@ locate and use the ncurses library. They are:
--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.
This disables ncurses support in taskwarrior, 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.
If configure runs, but taskwarrior 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

@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(task, 1.9.2, support@taskwarrior.org)
AC_INIT(task, 1.9.3, support@taskwarrior.org)
# Source type.
@@ -169,6 +169,10 @@ AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADER([auto.h])
# Checks for libraries.
AC_CHECK_LIB(pthread,pthread_create)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h sys/file.h sys/stat.h sys/time.h unistd.h])

View File

@@ -1,4 +1,4 @@
.TH task-color 5 2010-05-22 "task 1.9.2" "User Manuals"
.TH task-color 5 2010-10-07 "task 1.9.3" "User Manuals"
.SH NAME
task-color \- A color tutorial for the task(1) command line todo manager.
@@ -18,8 +18,8 @@ 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.
Now tell taskwarrior that you want to use color. This is the default for
taskwarrior, so the following step may be unnecessary.
$ task config color on
@@ -28,25 +28,25 @@ like:
color=on
Now task is ready.
Now taskwarrior 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:
It should be mentioned that taskwarrior is aware of whether its output is going
to a terminal, or to a file or through a pipe. When taskwarrior 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:
Do we really want all those color control codes in the file? Taskwarrior
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
The reason is that the taskwarrior 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:
@@ -60,7 +60,7 @@ or by temporarily overriding it like this:
color on
.SH AVAILABLE COLORS
Task has a 'color' command that will show all the colors it is capable of
Taskwarrior has a 'color' command that will show all the colors it is capable of
displaying. Try this:
$ task color
@@ -106,7 +106,8 @@ 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:
Taskwarrior has a command that helps you visualize these color combinations.
Try this:
$ task color underline bright red on black
@@ -187,16 +188,25 @@ 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.
you are mixing a 16-color and 256-color specification. Taskwarrior 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 LEGEND
Taskwarrior will show examples of all defined colors used in your .taskrc, or
theme, if you run this command:
$ task color legend
This gives you an example of each of the colors, so you can see the effect,
without necessarily creating a set of tasks that meet each of the rule criteria.
.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:
Taskwarrior 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)
@@ -226,8 +236,22 @@ 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!
The precedence for the color rules is determined by the configuration variable
'rule.precedence.color', which by default contains:
due.today,active,blocked,overdue,due,keyword,project,tag,recurring,pri,tagged
These are just the color rules with the 'color.' prefix removed. The rule
'color.due.today' is the highest precedence, and 'color.tagged' is the lowest.
The keyword rule shown here as 'keyword' corresponds to a wildcard pattern,
meaning 'color.keyword.*', or in other words all the keyword rules. Similarly
for the 'color.tag.*' and 'color.project.*' rules.
There is also 'color.project.none', 'color.tag.none' and 'color.pri.none'.
.SH THEMES
Task supports themes. What this really means is that with the ability to
Taskwarrior 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.
@@ -238,7 +262,7 @@ your .taskrc file:
include /usr/local/share/doc/task/rc/dark-256.theme
.RE
You can use any of the standard task themes:
You can use any of the standard taskwarrior themes:
.RS
light-16.theme
@@ -256,26 +280,31 @@ dark-green-256.theme
dark-blue-256.theme
.RE
You can also see how the theme will color the various tasks with the command:
$ task color legend
Better yet, create your own, and share it. We will gladly host the theme file
on <http://taskwarrior.org>.
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
Taskwarrior 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
Taskwarrior 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)
.BR task-faq(5),
.BR task-tutorial(5),
.BR task-sync(5)
For more information regarding task, the following may be referenced:
For more information regarding taskwarrior, the following may be referenced:
.TP
The official site at
@@ -291,5 +320,5 @@ You can contact the project by writing an email to
.SH REPORTING BUGS
.TP
Bugs in task may be reported to the issue-tracker at
Bugs in taskwarrior may be reported to the issue-tracker at
<http://taskwarrior.org>

View File

@@ -1,34 +1,29 @@
.TH task-faq 5 2010-05-22 "task 1.9.2" "User Manuals"
.TH task-faq 5 2010-10-07 "task 1.9.3" "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.
Taskwarrior 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.
Taskwarrior 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
Welcome to the taskwarrior FAQ. If you have would like to see a question answered
here, please send us a note at <support@taskwarrior.org>.
.TP
.B Q: When I redirect the output of task to a file, I lose all the colors. How do I fix this?
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. This is based on
the assumption that the color control codes are not wanted in the file. Prevent
this with the following entry in your .taskrc file:
.B Q: When I redirect the output to a file, I lose all the colors. How do I fix this?
A: Taskwarrior knows (or thinks it knows) when the output is not going directly
to a terminal, and strips out all the color control characters. This is based
on the assumption that the color control codes are not wanted in the file.
Prevent this with the following entry in your .taskrc file:
_forcecolor=on
.TP
.B Q: How do I backup my task data files? Where are they?
A: Task writes all pending tasks to the file
.B Q: How do I backup my taskwarrior data files? Where are they?
A: Taskwarrior writes all pending tasks to the file
~/.task/pending.data
@@ -38,8 +33,8 @@ and all completed and deleted tasks to
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. To be sure, and to future-proof your backup, consider
backing up all the files in the ~/.task directory.
taskwarrior configuration data. To be sure, and to future-proof your backup,
consider backing up all the files in the ~/.task directory.
.TP
.B Q: How can I separate my work tasks from my home tasks? Specifically, can I keep them completely separate?
@@ -55,38 +50,39 @@ This gives you two commands, 'wtask' and 'htask' that operate using two
different sets of task data files.
.TP
.B Q: Can I revert to a previous version of task? How?
.B Q: Can I revert to a previous version of taskwarrior? How?
A: Yes, you can revert to a previous version of task, simply by downloading an
older version and installing it. If you find a bug in task, then this may be the
only way to work around the bug, until a patch release is made.
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!
Note that it is possible that the taskwarrior file format will change. For
example, the format changed between versions 1.5.0 and 1.6.0. Taskwarrior will
automatically upgrade the file but if you need to revert to a previous version
of taskwarrior, there is the file format to consider. This is yet another good
reason to back up your task data files!
.TP
.B Q: I'm using Ubuntu 9.04, and I want task to word-wrap descriptions. How do I do this?
.B Q: I'm using Ubuntu 9.04, and I want to word-wrap descriptions. How do I do this?
A: You need to install ncurses, by doing this:
% sudo apt-get install libncurses5-dev
Then you need to rebuild task from scratch, starting with
Then you need to rebuild taskwarrior from scratch, starting with
% cd task-X.X.X
% ./configure
...
The result should be a task program that knows the width of the terminal window,
and wraps accordingly.
The result should be a taskwarrior program that knows the width of the terminal
window, and wraps accordingly.
Note that there are binary packages that all include this capability.
Note that all the binary packages include this capability.
.TP
.B Q: How do I build task under Cygwin?
A: Task is built the same way everywhere. But under Cygwin, you'll need to make
sure you have the following packages available first:
.B Q: How do I build taskwarrior under Cygwin?
A: Take a look at the README.build file, where the latest information on build
issues is kept. Taskwarrior is built the same way everywhere. But under Cygwin,
you'll need to make sure you have the following packages available first:
gcc
make
@@ -94,8 +90,8 @@ sure you have the following packages available first:
libncurses8
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
required, but the ncurses packages are optional. Ncurses will allow taskwarrior
to determine the width of the window, and therefore use the whole width and wrap
text accordingly, for a more aesthetically pleasing display.
Note that there are binary packages that all include this capability.
@@ -110,63 +106,93 @@ If you run the command:
% task colors
Task will display all the colors it can use, and you will see which ones you can use.
Taskwarrior will display all the colors it can use, and you will see which ones
you can use.
Note that if you install the 'mintty' shell in Cygwin, then you can use 256
colors.
See the 'man task-color' for more details on which colors can be used.
.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.
.B Q: Where does taskwarrior store the data?
By default, taskwarrior creates a .taskrc file in your home directory and
populates it with defaults. Taskwarrior 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.
to edit it. But taskwarrior 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:
If you delete (or rename) your .taskrc file, taskwarrior 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.
Taskwarrior will create 'new-file' if it doesn't already exist. There will not
be much in it though - taskwarrior relies heavily on default values, which can
be seen with this command:
$ task show
which lists all the currently known settings. If you have just created
new-file, then this command lists only the defaults.
Note that this is a good way to learn about new configuration settings,
particularly if your .taskrc file was created by an older version.
.TP
.B Q: Do I need to back up my task data?
.B Q: Do I need to back up my taskwarrior 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:
synching tool. Simply configure taskwarrior 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: I don't like dropbox. Is there another way to synchronize my tasks?
Of course. Especially if you want to modify tasks offline on both machines and
synchronize them later on. For this purpose there is a 'merge' command which is
is able to insert the modifications you made to one of your task databases into
a second database.
Here is a basic example of the procedure:
$ task merge ssh://user@myremotehost/.task/
$ task push ssh://user@myremotehost/.task/
The first command fetches the undo.data file from the remote system, reads the
changes made and updates the local database. When this merge command completes,
you should copy all the local .data files to the remote system either by using
the push command explicitly or by activating the merge.autopush feature in the
~/.taskrc file. This way you ensure that both systems are fully synchronized.
.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.
You need it if you want the undo capability, or the merge capability mentioned
above. 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 taskwarrior, because it is never read until you want
to undo. Otherwise taskwarrior 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
otherwise the easiest way is to just try it! With version 1.9 or later, you
simply run
$ task color
@@ -177,11 +203,13 @@ 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.
Use one of our provided color themes, or create your own - after all, they are
just collections of color settings.
See the task-color(5) man page for an in-depth explanation of the color rules.
.TP
.B Q: How can I make task put the command in the terminal window title?
.B Q: How can I make taskwarrior 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:
@@ -200,7 +228,7 @@ function that does the same thing:
}
.TP
.B Q: Task searches in a case-sensitive fashion - can I change that?
.B Q: Taskwarrior 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
@@ -209,24 +237,24 @@ 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:
taskwarrior 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.
.B Q: Why do the ID numbers change?
Taskwarrior 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:
When you run a report (such as "list"), the numbers are assigned before display.
For example, you can do this:
$ task list
$ task do 12
@@ -234,17 +262,18 @@ displays them. For example, you can do this:
$ 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.
taskwarrior 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 taskwarrior 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:
Taskwarriors filters are all combined with and implicit logical AND operator, so
if you were to try this:
$ task list priority:H priority:M
@@ -265,8 +294,8 @@ to construct task filters.
.TP
.B Q: How do I delete an annotation?
Task now has a 'denotate' command to remove annotations. First here is an
example task:
Taskwarrior now has a 'denotate' command to remove annotations. Here is an
example:
$ task add Original task
$ task 1 annotate foo
@@ -286,21 +315,35 @@ non-exact match:
This will remove the second annotation - the first non-exact match.
.TP
.B Q: How can I help?
There are lots of ways. Here are some:
- Provide feedback on what works, what does not
- Tell us how task does or does not fit your workflow
- Tell people about task
- Report bugs when you see them
- Contribute to our Wiki
- Suggest features
- Write unit tests
- Fix bugs
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
Taskwarrior 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
Taskwarrior 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)
.BR task-tutorial(5),
.BR task-color(5),
.BR task-sync(5)
For more information regarding task, the following may be referenced:
@@ -318,5 +361,5 @@ You can contact the project by writing an email to
.SH REPORTING BUGS
.TP
Bugs in task may be reported to the issue-tracker at
Bugs in taskwarrior may be reported to the issue-tracker at
<http://taskwarrior.org>

346
doc/man/task-sync.5 Normal file
View File

@@ -0,0 +1,346 @@
.TH task-sync 5 2010-10-07 "task 1.9.3" "User Manuals"
.SH NAME
task-sync \- A tutorial for the task(1) data synchronization capabilities.
.SH DESCRIPTION
Taskwarrior has built-in support for synchronization, which can be used to keep
two task databases up to date, regardless of which one is used. This capability
can also be used to keep a backup copy of your task database on another machine.
Taskwarrior can use various protocols for transferring the data.
.SH HOW IT WORKS
If you were to manually attempt to keep two separate task databases up to date,
you would need to inspect both databases, and detect changes that occurred in
each one. Those changes would need to be migrated to the other database, while
being careful not to miss a change, and not to confuse an 'add' in one with
a 'delete' in the other.
The synchronization feature does just this. It can transfer task databases,
compare tasks, and apply changes where necessary.
.SH NEW COMMANDS
Taskwarrior has 'pull', 'push' and 'merge' commands which perform the steps
necessary to move files around and combine them. In the common use case, you
would only need to use the 'merge' command. These commands take an argument
that is a URI, which indicates where the remote database resides.
To be clear, the local database always refers to your ~/.task directory (unless
overridden), and the remote database is always specified by URI.
.SH MERGE
The merge command will fetch task data via URI and combine it with the local
task database. The syntax is:
.br
.RS
task merge [<URI>]
.RE
The URI is optional if the
.B merge.default.uri
configuration variable is set. The URI may point to a different directory, or
it may be a different computer. Here is an example of the merge command:
.br
.RS
$ task merge ~/work/
.RE
This URI (~/work/) is a path name, which means the remote database is on the
same computer. Taskwarrior will fetch the data from the URI, and merge it with
your local data in ~/.task.
When complete, you will be asked whether you would like to push the combined
data back to the remote location specified by the URI. This is useful if you
are keeping two task databases synchronized, but it can be turned off. See
CONFIGURATION.
Note that a merge operation is not atomically reversible. You could however
run the 'task undo' command repeatedly to undo the effects.
.SH PUSH
The push command will copy the local task database to the specified URI. The
syntax is:
.br
.RS
task push [<URI>]
.RE
The URI is optional if the
.B push.default.uri
configuration variable is set. This command is useful for making backup copies
of your task database.
Note that the task files at the location specified by the URI are simply
overwritten, so don't expect any merging to occur. Misused, push can be
dangerous.
.SH PULL
The pull command will copy a task database from a URI to the local task database
(~/.task by default). The syntax is:
.br
.RS
task pull [<URI>]
.RE
The URI is optional if the
.B pull.default.uri
configuration variable is set. This command is useful for restoring a backup
copy of your task database.
Note that your local task database files will be simply overwritten by the files
obtained from the location specified by the URI, so don't expect any merging to
occur. Misused, pull can be dangerous.
.SH URI TYPES
The most basic URI is a path name on the local machine. An example would be:
.br
.RS
/home/bob/.task/
.RE
All the other URIs allow access to remote machines. The first uses SSH and scp
(either form can be used):
.br
.RS
ssh://[user@]host[:port]:path/to/undo.data
.br
[user@]host[:port]:/path/
.RE
Rsync is another supported protocol that minimizes network traffic, by a clever
algorithm that doesn't copy files that have not changed:
.br
.RS
rsync://[user@]host.xz[:port]/path/to/undo.data
.RE
Curl supports several protocols that can transfer data using HTTP, HTTPS and
FTP:
.br
.RS
http://host[:port]/path/to/undo.data
.br
https://host[:port]/path/to/undo.data
.br
ftp://user@host[:port]/path/to/undo.data
.RE
.SH CONFLICTS
When modifications on the local and remote machine conflict, for example if
both machines change the project name of the same task to different values,
then Taskwarrior automatically selects the most recent change. Thus, there
are no conflicts.
.SH EXAMPLE - Backup on another machine
One very good use of 'push' is to make backup copies of your task database in
another location. Suppose your task database is kept in the usual place, in
the ~/.task directory, and you wanted to make a backup copy in ~/backup. You
would use this command:
.br
.RS
$ task push ~/backup/
.RE
This would copy the files in ~/.task to ~/backup, overwriting the files that
were already in ~/backup. To backup your files to another machine, you could
use:
.br
.RS
$ task push user@host:backup
.RE
This could be improved by setting the
.B push.default.uri
configuration variable and then relying on the default, like this:
.br
.RS
$ task config push.default.uri user@host:backup
.RE
and then you need only run the push command:
.br
.RS
$ task push
.RE
and the default push URI will be used. If you wanted to restore a backup, you
simply use the pull command instead:
.br
.RS
$ task pull user@host:backup
.RE
This can be simplified by setting the
.B pull.default.uri
configuration variable and then relying on the default, like this:
.br
.RS
$ task config pull.default.uri user@host:backup
.RE
Note that pull and push will blindly overwrite the task files without any
merging. Be careful.
.SH EXAMPLE - Keeping two task databases synchronized
The most common synchronization will be to keep two task databases synchronized
on different machines. Here is a full example, including setup that illustrates
this.
Suppose there are two machines, named 'local' and 'remote', for simplicity.
Taskwarrior is installed on both machines. The different machines are
indicated here by the prompt. Suppose Alice enters two tasks on her local
machine:
.br
.RS
local> task add Deliver the new budget proposal due:tuesday
.br
local> task add Set up a meeting with Bob
.RE
Then later adds a task on the remote machine:
.br
.RS
remote> task add Present the budget proposal at the big meeting due:thursday
.RE
Now on the local machine, Alice merges the two task databases:
.br
.RS
local> task merge alice@remote:.task
.br
Would you like to push the changes to 'alice@remote:.task'? Y
.RE
Taskwarrior has combined the two task databases on local, then pushed the
changes back to remote. Now suppose Alice changes the due date for task 1
on remote:
.br
.RS
remote> task 1 due:wednesday
.RE
Now on the local machine, Alice sets up a default URI and autopush:
.br
.RS
local> task config merge.default.uri alice@remote:.task
.br
local> task config merge.autopush yes
.RE
Now Alice can simply run merge to make sure that the new due date is copied to
the local machine:
.br
.RS
local> task merge
.RE
This time the URI is determined automatically, and after the merge the files are
pushed back to the remote machine. In a similar way, the remote machine can
also be configured to merge from the local machine and push back to it. Then it
is just a matter of Alice remembering to merge now and then, from either
machine, to have her data in two (or even more) places.
.SH CONFIGURATION
By setting these configuration variables, it is possible to simplify the
synchronization commands, by relying on the defaults or alias names.
.br
.B merge.autopush=yes|no|ask
.RS
This controls whether the automatic push after a merge is performed, not
performed, or whether the user is asked every time. The default value is 'ask'.
.RE
.br
.B merge.default.uri=<uri>
.RS
Sets a default URI so that just the 'task merge' command be run without the
need to retype the URI every time. You can also use this configuration scheme
to set alias names, e.g. set merge.desktop.uri and run 'task merge desktop'.
.RE
.br
.B push.default.uri=<uri>
.RS
Sets a default URI so that just the 'task push' command be run without the
need to retype the URI every time. You can also use this configuration scheme
to set alias names, e.g. set push.desktop.uri and run 'task push desktop'.
.RE
.br
.B pull.default.uri=<uri>
.RS
Sets a default URI so that just the 'task pull' command be run without the
need to retype the URI every time. You can also use this configuration scheme
to set alias names, e.g. set pull.desktop.uri and run 'task pull desktop'.
.RE
Note that, when using SSH/scp, hostnames will be expanded due to the ssh
configuration file ~/.ssh/config.
.SH EXTERNAL DEPENDENCIES
Depending on the URI protocols used, the utilities 'scp', 'rsync' and 'curl'
must be installed and accessible via the $PATH environment variable.
If you have deleted your ~/.task/undo.data file to save space, you will be
unable to merge. The change transactions stored in the undo.data file are
used for synchronization.
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
.br
Copyright (C) 2006 \- 2010 P. Beckingham, F. Hernandez.
The sync capabilities were written by J. Schlatow.
Parts copyright (C) 2010 J. Schlatow.
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),
.BR task-tutorial(5),
.BR ssh_config(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>

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
.TH task 1 2010-05-22 "task 1.9.2" "User Manuals"
.TH task 1 2010-10-07 "task 1.9.3" "User Manuals"
.SH NAME
task \- A command line todo manager.
@@ -7,17 +7,17 @@ task \- A command line todo manager.
.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.
Taskwarrior 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.
At the core, task is a list processing program. You add text and additional
related parameters and task redisplays the information in a nice way. It turns
into a todo list program when you add due dates and recurrence. It turns into an
organized todo list program when you add priorities, tags (one word descriptors),
project groups, etc. Task turns into an organized to do list program when you
modify the configuration file to have the output displayed the way you want to
see it.
At the core, taskwarrior is a list processing program. You add text and
additional related parameters and redisplay the information in a nice way. It
turns into a todo list program when you add due dates and recurrence. It turns
into an organized todo list program when you add priorities, tags (one word
descriptors), project groups, etc. Taskwarrior turns into an organized to do
list program when you modify the configuration file to have the output displayed
the way you want to see it.
.SH SUBCOMMANDS
@@ -45,7 +45,7 @@ Shows all data and metadata for the specified task.
.TP
.B ID
With an ID but no specific command, task runs the "info" command.
With an ID but no specific command, taskwarrior runs the "info" command.
.TP
.B undo
@@ -84,7 +84,7 @@ number of tasks for each.
.TP
.B tags
Show a list of all tags used.
Show a list of all tags used. Any special tags used are highlighted.
.TP
.B summary
@@ -124,7 +124,12 @@ Imports tasks from a variety of formats.
.TP
.B export
Exports all tasks in CSV format. This command is an alias to the export.csv command.
Exports all tasks in the default format. This is an alias to the command export.yaml.
Redirect the output to a file, if you wish to save it, or pipe it to another command.
.TP
.B export.csv
Exports all tasks in CSV format.
Redirect the output to a file, if you wish to save it, or pipe it to another command.
.TP
@@ -133,12 +138,47 @@ Exports all tasks in iCalendar format.
Redirect the output to a file, if you wish to save it, or pipe it to another command.
.TP
.B color [sample]
Displays all possible colors, or a sample.
.B export.yaml
Exports all tasks in YAML 1.1 format.
Redirect the output to a file, if you wish to save it, or pipe it to another command.
.TP
.B merge URL
Merges two task databases by comparing the modifications that are stored in the
undo.data files. The location of the second undo.data file must be passed on as argument. URL may have the following syntaxes:
ssh://[user@]host.xz[:port]/path/to/undo.data
rsync://[user@]host.xz[:port]/path/to/undo.data
[user@]host.xz:path/to/undo.data
/path/to/local/undo.data
You can set aliases for frequently used URLs in the .taskrc.
.TP
.B push URL
Pushes the task database to a remote another location for distributing the
changes made by the merge command.
(See annotations above for valid URL syntaxes.)
.TP
.B pull URL
Overwrites the task database with those files found at the URL.
(See annotations above for valid URL syntaxes.)
.TP
.B color [sample | legend]
Displays all possible colors, a named sample, or a legend containing all
currently defined colors.
.TP
.B version
Shows the task version number
Shows the taskwarrior version number
.TP
.B help
@@ -146,12 +186,13 @@ Shows the long usage text.
.TP
.B show [all | substring]"
Shows all the current settings in the task configuration file. If a substring
is specified just the settings containing that substring will be displayed.
Shows all the current settings in the taskwarrior configuration file. If a
substring is specified just the settings containing that substring will be
displayed.
.TP
.B config [name [value | '']]
Add, modify and remove settings directly in the task configuration.
Add, modify and remove settings directly in the taskwarrior configuration.
This command either modifies the 'name' setting with a new value of 'value',
or adds a new entry that is equivalent to 'name=value':
@@ -196,8 +237,9 @@ Prepends information to an existing task.
.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).
reports currently predefined in taskwarrior. 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]
@@ -250,6 +292,14 @@ Shows all recurring tasks matching the specified criteria.
.B waiting [tags] [attrs] [description]
Shows all waiting tasks matching the specified criteria.
.TP
.B blocked [tags] [attrs] [description]
Shows all blocked tasks, that are dependent on other tasks.
.TP
.B unblocked [tags] [attrs] [description]
Shows all tasks that are not blocked by dependencies.
.TP
.B next [tags] [attrs] [description]
Shows all tasks with upcoming due dates matching the specified criteria.
@@ -269,7 +319,15 @@ 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
remove a tag from a task. A task can have any quantity of tags.
Certain tags (called 'special tags'), can be used to affect the way tasks are
treated. For example, is a task has the special tag 'nocolor', then it is
exempt from all color rules. The supported special tags are:
+nocolor Disable color rules processing for this task
+nonag Completion of this task suppresses all nag messages
+nocal This task will not appear on the calendar
.TP
.B project:<project-name>
@@ -326,7 +384,7 @@ Attribute modifiers improve filters. Supported modifiers are:
.br
.B isnt (synonym not)
.br
.B has (synonym contain)
.B has (synonym contains)
.br
.B hasnt
.br
@@ -348,11 +406,11 @@ task list due.before:eom priority.not:L
.SH SPECIFYING DATES AND FREQUENCIES
.SS DATES
Task reads dates from the command line and displays dates in the
Taskwarrior 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.
in the taskwarrior configuration file.
.RS
.TP
@@ -365,16 +423,40 @@ task ... due:today
.br
task ... due:yesterday
.br
task ... due:tomorrow
task ... due:tomorrow
.TP
Day number with ordinal
task ... due:23rd
.br
task ... due:3wks
.br
task ... due:1day
.br
task ... due:9hrs
.TP
End of week (Friday), month and year
Start of (work) week (Monday), calendar week (Sunday or Monday), month and year
.br
task ... due:sow
.br
task ... due:soww
.br
task ... due:socw
.br
task ... due:som
.br
task ... due:soy
.TP
End of (work) week (Friday), calendar week (Saturday or Sunday), month and year
.br
task ... due:eow
.br
task ... due:eoww
.br
task ... due:eocw
.br
task ... due:eom
.br
task ... due:eoy
@@ -385,7 +467,7 @@ task ... due:fri
.RE
.SS FREQUENCIES
Recurrence periods. Task supports several ways of specifying the
Recurrence periods. Taskwarrior supports several ways of specifying the
.I frequency
of recurring tasks.
@@ -425,7 +507,7 @@ Every two years.
.SH COMMAND ABBREVIATION
All task commands may be abbreviated as long as a unique prefix is used. E.g.
All taskwarrior commands may be abbreviated as long as a unique prefix is used. E.g.
.RS
$ task li
@@ -457,7 +539,7 @@ $ task add "quoted ' quote"
$ task add escaped \\' quote
.RE
The argument \-\- (a double dash) tells task to treat all other args
The argument \-\- (a double dash) tells taskwarrior to treat all other args
as description:
.RS
@@ -465,7 +547,7 @@ $ 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:
Taskwarrior stores its configuration in a file in the user's home directory:
~/.taskrc . The default configuration file can be overridden with
.TP
@@ -509,7 +591,7 @@ can be configured in the configuration file.
~/.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>.
Taskwarrior was written by P. Beckingham <paul@beckingham.net>.
.br
Copyright (C) 2006 \- 2010 P. Beckingham
@@ -518,16 +600,17 @@ and supplemented by Federico Hernandez.
Thank also to T. Charles Yun.
task is distributed under the GNU General Public License. See
Taskwarrior 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)
.BR task-faq(5),
.BR task-color(5),
.BR task-sync(5)
For more information regarding task, the following may be referenced:
For more information regarding taskwarrior, the following may be referenced:
.TP
The official site at
@@ -543,5 +626,5 @@ You can contact the project by writing an email to
.SH REPORTING BUGS
.TP
Bugs in task may be reported to the issue-tracker at
Bugs in taskwarrior may be reported to the issue-tracker at
<http://taskwarrior.org>

View File

@@ -1,4 +1,4 @@
.TH taskrc 5 2010-05-22 "task 1.9.2" "User Manuals"
.TH taskrc 5 2010-10-07 "task 1.9.2" "User Manuals"
.SH NAME
taskrc \- Configuration file for the task(1) command
@@ -9,7 +9,7 @@ taskrc \- Configuration file for the task(1) command
.B task rc:<directory-path>/.taskrc
.SH DESCRIPTION
.B task
.B taskwarrior
obtains its configuration data from a file called
.I .taskrc
\&. This file is normally located in the user's home directory:
@@ -27,7 +27,7 @@ $ task rc:<directory-path>/.taskrc
.RE
Individual option can be overridden by using the
.I rc.<name>:
.I rc.<name>:
attribute when running task:
.RS
@@ -35,14 +35,14 @@ $ task rc.<name>:<value> ...
.RE
If
.B task
.B taskwarrior
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:
The taskwarrior 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>
@@ -66,9 +66,9 @@ 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".
Note that taskwarrior 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'
@@ -84,14 +84,14 @@ To delete an entry, use this command:
$ 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:
Taskwarrior 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:
Taskwarrior will also display all your settings with this command:
.RS
$ task config
@@ -109,7 +109,8 @@ statement:
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.
By using include files you can divide your main configuration file into several
ones containing just the relevant configuration data like colors, etc.
There are two excellent uses of includes in your .taskrc, shown here:
@@ -119,8 +120,8 @@ include /usr/local/share/doc/task/rc/holidays-US.rc
include /usr/local/share/doc/task/rc/dark-16.theme
.RE
This includes two standard files that are distributed with task, which define a
set of US holidays, and set up a 16-color theme for task to use, to color the
This includes two standard files that are distributed with taskwarrior, which
define a set of US holidays, and set up a 16-color theme to use, to color the
reports and calendar.
.SH CONFIGURATION VARIABLES
@@ -130,8 +131,8 @@ Valid variable names and their default values are:
.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
This is a path to the directory containing all the taskwarrior files. By
default, it is set up to be ~/.task, for example: /home/paul/.task
Note that you can use the
.B ~
@@ -139,8 +140,8 @@ 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
Determines whether to use file locking when accessing the pending.data and
completed.data files. Defaults to "on". Solaris users who store the 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.
@@ -148,7 +149,7 @@ 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
Determines whether to use ncurses to establish the size of the window you are
using, for text wrapping.
.TP
@@ -159,27 +160,32 @@ The width of tables used when ncurses support is not available. Defaults to 80.
.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".
command is used. Taskwarrior will first look for this configuration variable. If
found, it is used. Otherwise it 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.
code. If not specified, will assume en-US. If specified, taskwarrior 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 verbose=yes
Controls some of the verbosity of taskwarrior.
.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".
May be "yes" or "no", and determines whether taskwarrior 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
May be "yes" or "no", and causes the display of the ID and description of any
task when you run the start, stop, do, undo or delete commands. The default
value is "yes".
@@ -249,8 +255,8 @@ 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:
Taskwarrior shuts off color automatically when the output is not sent directly
to a TTY. For example, this command:
.RS
.RS
@@ -266,7 +272,8 @@ $ task rc._forcecolor=yes list > file
.TP
.B blanklines=yes
Turning this value off causes task to generate a more vertically compact output.
Turning this value off causes taskwarrior to generate a more vertically compact
output.
.TP
.B shell.prompt=task>
@@ -294,24 +301,25 @@ and one for a week from tomorrow.
.TP
.B undo.style=side
When the 'undo' command is run, task presents a before and after comparison of the
data. This can be in either the 'side' style, which compares values side-by-side
in a table, or 'diff' style, which uses a format similar to the 'diff' command.
When the 'undo' command is run, taskwarrior presents a before and after
comparison of the data. This can be in either the 'side' style, which compares
values side-by-side in a table, or 'diff' style, which uses a format similar to
the 'diff' command.
.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.
Taskwarrior 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. Several commands you may use are actually aliases - 'history',
for example, or 'export'.
Taskwarrior 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 the commands. Several commands you may use are actually aliases -
the 'history' report, for example, or 'export'.
.SS DATES
@@ -325,10 +333,10 @@ for example, or 'export'.
.B dateformat.annotation=m/d/Y
.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
This is a string of characters that define how taskwarrior formats date values.
The precedence order for the configuration variable is report.X.dateformat then
dateformat.report then dateformat. While report.X.dateformat only formats the
due date in reports, dateformat.report 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.
@@ -384,7 +392,7 @@ M-D-Y would use for input and output 07-24-2009
.RE
.RS
Examples for other values of reportdateformat:
Examples for other values of dateformat.report:
.RE
.RS
@@ -394,7 +402,7 @@ 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"
vV a Y-M-D would do an output as "v30 Fri 2009-07-24"
.RE
.RE
@@ -436,8 +444,23 @@ 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".
.SS Journal entries
.TP
.B Holidays
.B journal.time=no
May be yes or no, and determines whether the 'start' and 'stop' commands should
record an annotation when being executed. The default value is "no". The text of
the corresponding annotations is controlled by
.TP journal.time.start.annotation=Started task
The text of the annotation that is recorded when executing the start command and
having set journal.time.
.TP journal.time.stop.annotation=Stopped task
The text of the annotation that is recorded when executing the stop command and
having set journal.time.
.SS 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:
@@ -461,7 +484,9 @@ 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:
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
@@ -473,8 +498,8 @@ holiday.eastersunday.date=easter
.RE
.RE
Note that the task distribution contains example holiday files that can be
included like this:
Note that the taskwarrior distribution contains example holiday files that can
be included like this:
.RS
.RS
@@ -487,14 +512,24 @@ include /usr/local/share/doc/task/rc/holidays-US.rc
.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.
specified, taskwarrior will only show as many that will fit.
.SS DEPENDENCIES
.TP
.B dependency.reminder=on
Determines whether dependency chain violations generate reminders.
.TP
.B dependency.confirm=yes
Determines whether dependency chain repair requires confirmation.
.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.
May be "on" or "off". Determines whether taskwarrior uses color. When "off",
will use dashes (-----) to underline column headings.
.TP
.B fontunderline=on
@@ -502,7 +537,7 @@ Determines if font underlines or ASCII dashes should be used to underline
headers, even when color is enabled.
.RE
Task has a number of coloration rules. They correspond to a particular
Taskwarrior 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:
@@ -512,39 +547,50 @@ terminal, can be obtained by running the command:
.RE
.RS
The coloration rules and their defaults are:
Note that no default values are listed here - the defaults now correspond to the
dark-256.theme (Linux) and dark-16.theme (other) theme values.
The coloration rules are as follows:
.RE
.RS
.B color.overdue=bold red
The color for overdue tasks.
.B color.due.today
Task is due today
.br
.B color.due.today=bold magenta
The color of tasks due today.
.B color.active
Task is started, therefore active.
.br
.B color.due=bold yellow
The color of due tasks.
.B color.blocked
Task is blocked by a dependency.
.br
.B color.pri.H=bold
The color of priority:H tasks.
.B color.overdue
Task is overdue (due some time prior to now).
.br
.B color.pri.M=on yellow
The color of priority:M tasks. No default value.
.B color.due
Task is coming due.
.br
.B color.pri.L=on green
The color of priority:L tasks. No default value.
.B color.project.none
Task does not have an assigned project.
.br
.B color.pri.none=white on blue
The color of priority: tasks. No default value.
.B color.tag.none
Task has no tags.
.br
.B color.active=bold cyan
The color of active tasks.
.B color.tagged
Task has at least one tag.
.br
.B color.tagged=yellow
The color of tagged tasks.
.B color.recurring
Task is recurring.
.br
.B color.recurring=on red
The color for recurring tasks.
.B color.pri.H
Task has priority H.
.br
.B color.pri.M
Task has priority M.
.br
.B color.pri.L
Task has priority L.
.br
.B color.pri.none
Task has no priority.
.RE
.RE
@@ -665,17 +711,38 @@ Colors used by the undo command, to indicate the values both before and after
a change that is to be reverted.
.RE
.TP
.B color.sync.added=green
.RE
.br
.B color.sync.changed=yellow
.RE
.br
.B color.sync.rejected=red
.RS
Colors the output of the merge command.
.RE
.TP
.B rule.precedence.color=overdue,tag,project,keyword,active,...
.RS
This setting specifies the precedence of the color rules, from highest to
lowest. Note that the prefix 'color.' is omitted (for brevity), and that any
wildcard values (color.tag.XXX) is shortened to 'tag', which places all specific
tag rules at the same precedence, again for brevity.
.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.
taskwarrior, 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
@@ -689,8 +756,8 @@ configuration variable. The format is identical to that of
.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.
When this value is set to "on", taskwarrior will display a message whenever the
shadow file is updated by some task command.
.SS DEFAULTS
@@ -711,7 +778,7 @@ 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
Provides a default command that is run every time taskwarrior is invoked with no
arguments. For example, if set to:
.RS
@@ -721,8 +788,8 @@ default.command=list project:foo
.RE
.RS
then task will run the "list project:foo" command if no command is specified.
This means that by merely typing
then taskwarrior will run the "list project:foo" command if no command is
specified. This means that by merely typing
.RE
.RS
@@ -756,9 +823,9 @@ 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.
id, uuid, project, priority, priority_long, entry, start, end, due, countdown,
countdown_compact, age, age_compact, active, tags, depends, description_only,
description, recur, recurrence_indicator, tag_indicator and wait.
The IDs are separated by commas.
.TP
@@ -770,7 +837,10 @@ labels are a comma separated list.
.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
or a "-" for descending sort order. The sort IDs are separated by commas.
For example:
report.list.sort=due+,priority-,active-,project+
.TP
.B report.X.filter
@@ -780,7 +850,7 @@ 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
column. If it is not set then dateformat.report and dateformat will be used in
this order. See the
.B DATES
section for details on the sequence placeholders.
@@ -798,8 +868,8 @@ 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:
Taskwarrior comes with a number of predefined reports in its default
configuration file. These reports are:
.TP
.B long
@@ -854,22 +924,23 @@ Lists all tasks matching the specified criteria.
Lists all tasks with upcoming due dates matching the specified criteria.
.SH "CREDITS & COPYRIGHTS"
task was written by P. Beckingham <paul@beckingham.net>.
Taskwarrior 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
Taskwarrior 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)
.BR task-faq(5),
.BR task-color(5),
.BR task-sync(5)
For more information regarding task, the following may be referenced:
For more information regarding taskwarrior, the following may be referenced:
.TP
The official site at
@@ -885,5 +956,5 @@ You can contact the project by writing an email to
.SH REPORTING BUGS
.TP
Bugs in task may be reported to the issue-tracker at
Bugs in taskwarrior may be reported to the issue-tracker at
<http://taskwarrior.org>

View File

@@ -1,8 +1,8 @@
# This is a full BNF grammar for the task command line. It is intended that a
# future release of task will incorporate a complete lexer/parser implementing
# this grammar, which will allow for more sophisticated command lines, for
# example:
# This is a full BNF grammar for the taskwarrior command line. It is intended
# that a future release of taskwarrior will incorporate a complete lexer/parser
# implementing this grammar, which will allow for more sophisticated command
# lines, for example:
#
# task delete 1 2 4-7
# task add pri:H pro:X -- pro pri 1 ///

533
doc/misc/run.193 Executable file
View File

@@ -0,0 +1,533 @@
#! /bin/bash
rm -f /Users/paul/.task/pending.data /Users/paul/.task/completed.data /Users/paul/.task/undo.data
echo 'data.location=~/.task' > /Users/paul/.taskrc
echo 'color=off' >> /Users/paul/.taskrc
echo 'color.summary.background=on gray3' >> /Users/paul/.taskrc
echo '#include /usr/local/share/doc/task/rc/dark-blue-256.theme' >> /Users/paul/.taskrc
echo '#include /usr/local/share/doc/task/rc/dark-red-256.theme' >> /Users/paul/.taskrc
echo '#include /usr/local/share/doc/task/rc/dark-256.theme' >> /Users/paul/.taskrc
# 1 Intro
# 2 Basic usage
echo Basic usage --------------------------------------------------------------
echo $ task add Select a free weekend in November
task add Select a free weekend in November
echo $ task add Select and book a venue
task add Select and book a venue
echo $ task add Come up with a guest list
task add Come up with a guest list
echo $ task add Mail invitations
task add Mail invitations
echo $ task add Select a caterer
task add Select a caterer
echo $ task list
task list
echo $ task log Order a special cake
task log Order a special cake
echo $ task 4 duplicate /Mail/Design/
task 4 duplicate /Mail/Design/
echo $ task 4 duplicate /Mail/Print/
task 4 duplicate /Mail/Print/
echo $ task list
task list
echo $ task 3 done
task 3 done
echo $ task list
task list
# 3 Projects
echo Projects --------------------------------------------------------------
echo $ task add Pay teh rent on teh 31st
task add Pay teh rent on teh 31st
echo $ task 7 /teh/the/g
task 7 /teh/the/g
echo $ task list
task list
echo $ task 7 project:home
task 7 project:home
echo $ task 1-6 project:party
echo 'All' | task 1-6 project:party
echo $ task projects
task projects
echo $ task list project:home
task list project:home
echo $ task li pro:par
task li pro:par
# 4 Priorities
echo Priorities --------------------------------------------------------------
echo $ task 1-3,5 priority:H
echo 'All' | task 1-3,5 priority:H
echo $ task list
task list
echo $ task 3 pri:
task 3 pri:
# 5 Tags
echo Tags --------------------------------------------------------------
echo $ task list
task list
echo $ task 3,5,6 +mall
echo 'All' | task 3,5,6 +mall
echo $ task long
task long
echo $ task list +mall
task list +mall
echo $ task 3 -mall
task 3 -mall
# 6 Modifications
echo Modifications --------------------------------------------------------------
echo $ task 7 Pay rent at the end of the month
echo 'Yes' | task 7 Pay rent at the end of the month
echo $ task add music
task add music
echo $ task 8 prepend Select some
task 8 prepend Select some
echo $ task 8 append for after dinner
task 8 append for after dinner
echo $ task list
task list
echo $ task edit
#task edit
echo $ task add Hire a band?
#task add Hire a band?
echo $ task add Hire a band\?
#task add Hire a band\?
echo $ task add "Hire a band?"
#task add "Hire a band?"
echo $ task add -- Hire a band\? +dj
task add -- Hire a band\? +dj
echo $ task undo
echo 'y' | task undo
echo $ task 1 delete
echo 'y' | task 1 delete
echo $ task undo
echo 'y' | task undo
# 7 Info
echo Info --------------------------------------------------------------
echo $ task 1 info
task 1 info
echo $ task stats
task stats
# 8 Annotations
echo Annotations --------------------------------------------------------------
echo $ task 1 annotate the 13 looks good
task 1 annotate the 13 looks good
sleep 1
echo $ task 1 annotate or the 14th
task 1 annotate or the 14th
echo $ task list
task list
echo $ task list rc.annotations:full
task list rc.annotations:full
echo $ task list rc.annotations:sparse
task list rc.annotations:sparse
echo $ task list rc.annotations:none
task list rc.annotations:none
echo $ task 1 denotate 14th
task 1 denotate 14th
echo $ task list
task list
# 9 Configuration
echo Configuration --------------------------------------------------------------
echo $ task show
task show
echo $ task config answer forty-two
echo 'y' | task config answer forty-two
echo $ task show answer
task show answer
echo $ task config answer
echo 'y' | task config answer
echo $ task rc.report.list.sort=description+ list
task rc.report.list.sort=description+ list
# 10 Defaults
echo Defaults --------------------------------------------------------------
echo $ task config default.command list
echo 'y' | task config default.command list
echo $ task
task
echo $ task config default.priority H
echo 'y' | task config default.priority H
echo $ task config default.project Work
echo 'y' | task config default.project Work
echo $ task add New task
task add New task
echo $ task list
task list
echo $ task undo
echo 'y' | task undo
echo $ task config default.priority
echo 'y' | task config default.priority
echo $ task config default.project
echo 'y' | task config default.project
# 11 Aliases
echo Aliases --------------------------------------------------------------
echo $ task config alias.zzz list
echo 'y' | task config alias.zzz list
echo $ task zzz
task zzz
echo $ task z
task z
# 12 Color
echo Color --------------------------------------------------------------
echo $ task config color on
echo 'y' | task config color on
echo $ task list
task list
echo $ task 1 bg:on_red
task 1 bg:on_red
echo $ task list
task list
echo $ task 1 bg:
task 1 bg:
echo $ task color
task color
echo $ task color white on red
task color white on red
echo $ task color legend
task color legend
echo vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-blue-256.theme
#vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-blue-256.theme
echo 'include /usr/local/share/doc/task/rc/dark-blue-256.theme' >> x
echo $ task color legend
task color legend
echo $ task list
task list
echo vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-red-256.theme
#vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-red-256.theme
sed 's/blue/red/' x >x2 && mv x2 x
echo $ task color legend
task color legend
echo $ task list
task list
echo vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-256.theme
#vi ~/.taskrc # include /usr/local/share/doc/task/rc/dark-256.theme
sed 's/red-//' x >x2 && mv x2 x
echo $ task list
task list
echo $ task "rc.color.project.party=on rgb001" rc.color.keyword.invit=bold list
task "rc.color.project.party=on rgb001" rc.color.keyword.invit=bold list
echo $ man task-color
#man task-color
# 13 Active tasks
echo Active tasks --------------------------------------------------------------
echo $ task 2 start
task 2 start
echo $ task list
task list
echo $ task active
task active
echo $ task 2 stop
task 2 stop
echo $ task config journal.time on
task config journal.time on
echo $ task config rc.dateformat.xxx xxx
task config rc.dateformat.xxx xxx
echo $ task config dateformat.annotation 'Y/m/d H:N'
task config dateformat.annotation 'Y/m/d H:N'
echo $ task 2 start
task 2 start
echo $ task list venue
task list venue
echo $ task 2 stop
task 2 stop
echo $ task list venue
task list venue
# 14 Due dates
echo Due dates --------------------------------------------------------------
echo $ task 1 due:7/31/2010
task 1 due:7/31/2010
echo $ task 1 due:2wks
task 1 due:2wks
echo $ task 1 due:-2wks
task 1 due:-2wks
echo $ task 1 due:eom
task 1 due:eom
echo $ task 2 due:8th
task 2 due:8th
echo $ task 2 due:sunday
task 2 due:sunday
echo $ task 5 due:eow
task 5 due:eow
echo $ task list
task list
echo $ task overdue
task overdue
echo $ task rc.dateformat.report:Y-M-DTH:N:SZ list
task rc.dateformat.report:Y-M-DTH:N:SZ list
# 15 Calendar
echo Calendar --------------------------------------------------------------
echo $ task calendar
task calendar
echo $ vi ~/.taskrc # include /usr/local/share/doc/task/rc/holidays-US.rc
#vi ~/.taskrc # include /usr/local/share/doc/task/rc/holidays-US.rc
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo $ task calendar
task calendar
echo $ task cal 2010
task cal 2010
echo $ task rc.calendar.details:full cal
task rc.calendar.details:full cal
echo $ task rc.calendar.holidays:full cal
task rc.calendar.holidays:full cal
# 16 Recurrence
echo Recurrence --------------------------------------------------------------
echo $ task 7 info
task 7 info
echo $ task 7 due:eom recur:monthly
task 7 due:eom recur:monthly
echo $ task 7
task 7
echo $ task 7 until:eoy
task 7 until:eoy
echo $ task recurring
task recurring
echo $ task add Pay taxes due:4/15/2007 recur:yearly
task add Pay taxes due:4/15/2007 recur:yearly
echo $ task long
task long
echo $ task 11 delete
printf "y\ny\n" | task 11 delete # y, y
echo $ task list
task list
# 17 Shell
echo Shell --------------------------------------------------------------
echo $ task shell
#task shell
echo '> projects'
#> projects
echo '> tags'
#> tags
echo '> list'
#> list
echo '> quit'
#> quit
# 18 Special tags
echo Special tags --------------------------------------------------------------
echo $ task 6 +nocolor
task 6 +nocolor
echo $ task list
task list
echo $ task tags
task tags
echo $ task 6 -nocolor
task 6 -nocolor
# 19 Waiting
echo Waiting --------------------------------------------------------------
echo $ task add Look for new apartment due:eoy
task add Look for new apartment due:eoy
echo $ task list
task list
echo $ task 10 wait:12/1/2010
task 10 wait:12/1/2010
echo $ task list
task list
echo $ task waiting
task waiting
echo $ task add Do something in a few seconds
task add Do something in a few seconds
echo $ task 11 wait:5s
task 11 wait:5s
echo $ task list
task list
sleep 5
echo $ task list
task list
echo $ task 11 rc.confirmation:no delete
task 11 rc.confirmation:no delete
# 20 Dependencies
echo Dependencies --------------------------------------------------------------
echo $ task list pro:party
task list pro:party
echo $ task 3 depends:6
task 3 depends:6
echo $ task 6 dep:5
task 6 dep:5
echo $ task 2 dep:1
task 2 dep:1
echo $ task 5 dep:1,2
task 5 dep:1,2
echo $ task 4 dep:1
task 4 dep:1
echo $ task long pro:party
task long pro:party
echo $ task 5 dep:-1
task 5 dep:-1
echo $ task blocked
task blocked
echo $ task unblocked
task unblocked
echo $ task 1 info
task 1 info
echo $ task 2 info
task 2 info
echo $ task 2 done
echo 'y' | task 2 done
echo $ task 1 info
task 1 info
# 21 Reports
echo Reports --------------------------------------------------------------
echo $ task minimal
task minimal
echo $ task ls
task ls
echo $ task list
task list
echo $ task long
task long
echo $ task all
task all
echo $ task completed
task completed
echo $ task recurring
task recurring
echo $ task waiting
task waiting
echo $ task blocked
task blocked
echo $ task oldest
task oldest
echo $ task newest
task newest
echo $ task timesheet
task timesheet
echo $ task next
task next
# 22 Custom report
echo Custom report --------------------------------------------------------------
echo 'report.foo.description=My own report' >> x
echo 'report.foo.columns=id,entry,description' >> x
echo 'report.foo.labels=ID,Entered,Description' >> x
echo 'report.foo.sort=entry+,description+' >> x
echo 'report.foo.filter=status:pending' >> x
echo 'task help | grep foo'
task help | grep foo
echo $ task show report.foo
task show report.foo
echo $ task foo
task foo
# 23 Charts
echo Charts --------------------------------------------------------------
echo $ task history
task history
echo $ task history.annual
task history.annual
echo $ task ghistory
task ghistory
echo $ task ghistory.annual
task ghistory.annual
echo $ task summary
task summary
# 24 Advanced filters
echo Advanced filters --------------------------------------------------------------
echo $ task list
task list
echo $ task list invit
task list invit
echo $ task list description.contains:invit
task list description.contains:invit
echo $ task list desc.word:the
task list desc.word:the
echo $ task list desc.noword:invitations
task list desc.noword:invitations
echo $ task list pro:party
task list pro:party
echo $ task list pro.is:party
task list pro.is:party
echo $ task list pro.not:party
task list pro.not:party
echo $ task list pro:party priority.over:L
task list pro:party priority.over:L
echo $ task list pro:party limit:2
task list pro:party limit:2
echo $ task list limit:page
task list limit:page
echo $ task all status:pending
task all status:pending
echo $ task all status:waiting
task all status:waiting
# 25 Import/export
echo Import/export --------------------------------------------------------------
echo $ task export.csv
task export.csv
echo $ task export.csv venue
task export.csv venue
echo $ task export.vcalendar venue
task export.vcalendar venue
echo $ task export.yaml venue
task export.yaml venue
cat <<EOF >file.text
Remember to read the task man page
EOF
cat file.text
echo $ task import file.text
printf "y\n" | task import file.text
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Visit http://taskwarrior.org
due: 1281844800
entry: 1281289630
priority: H
project: work
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
cat file.yaml
echo $ task import file.yaml
printf "y\n" | task import file.yaml
echo $ task new limit:2
task new limit:2
# 26 Help
echo Help --------------------------------------------------------------
echo $ task help
task help
echo $ man task
#man task
echo $ man taskrc
#man taskrc
echo $ man task-color
#man task-color
echo $ man task-tutorial
#man task-tutorial
echo $ man task-faq
#man task-faq
echo $ man task-sync
#man task-sync
# 27 Wrap up
echo Wrap up --------------------------------------------------------------
echo $ task version
task version
exit

71
doc/misc/run.sample.annotate Executable file
View File

@@ -0,0 +1,71 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task calendar sep 2010'
task rc:x calendar sep 2010
echo
echo '$ task calendar'
task rc:x calendar
echo
echo '$ task overdue'
task rc:x 2 done
exit

71
doc/misc/run.sample.attmod Executable file
View File

@@ -0,0 +1,71 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task calendar sep 2010'
task rc:x calendar sep 2010
echo
echo '$ task calendar'
task rc:x calendar
echo
echo '$ task overdue'
task rc:x 2 done
exit

74
doc/misc/run.sample.blue Executable file
View File

@@ -0,0 +1,74 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-blue-256.theme' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task 1 annotate Try the blue one first'
task rc:x 1 annotate Try the blue one first
echo
echo '$ task list'
task rc:x list
echo
echo '$ task list due.before:eow'
task rc:x list due.before:eow
echo
echo '$ task 2 done'
task rc:x 2 done
exit

71
doc/misc/run.sample.cal Executable file
View File

@@ -0,0 +1,71 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task calendar sep 2010'
task rc:x calendar sep 2010
echo
echo '$ task calendar'
task rc:x calendar
echo
echo '$ task overdue'
task rc:x 2 done
exit

19
doc/misc/run.sample.color Executable file
View File

@@ -0,0 +1,19 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'include /usr/local/share/doc/task/rc/dark-green-256.theme' >> x
# Now the visible part.
echo
echo '$ task color'
task rc:x color
exit

38
doc/misc/run.sample.deps Executable file
View File

@@ -0,0 +1,38 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Now the visible part.
echo
echo $ task add project:Cake Mix the ingredients
task rc:x add project:Cake Mix the ingredients
echo
echo $ task add project:Cake Bake the cake depends:1
task rc:x add project:Cake Bake the cake depends:1
echo
echo $ task add project:Cake Eat the cake depends:2
task rc:x add project:Cake Eat the cake depends:2
echo
echo $ task 2 info
task rc:x 2 info
exit

50
doc/misc/run.sample.format Executable file
View File

@@ -0,0 +1,50 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=95' >> x
echo 'include /usr/local/share/doc/task/rc/dark-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'due=6' >> x
echo 'dateformat=YMD-H:N' >> x
echo 'dateformat.report=YMD-H:N' >> x
echo 'color.due=rgb530' >> x
echo 'report.list.columns=id,project,priority_long,due,recur,description' >> x
echo 'report.list.labels=ID,Pro,Pri,Due,Recur,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Now the visible part.
echo
echo '$ task config rc.dateformat YMD-H:N'
echo "Are you sure you want to add 'dateformat' with a value of 'YMD-H:N'? (y/n) y"
echo 'Config file .taskrc modified.'
echo
echo '$ task add Spa appointment due:20100917-11:30'
task rc:x add Lunch with Sue due:20100917-11:30
echo
echo '$ task list'
task rc:x list
echo
echo '$ task list rc.dateformat.report=m-d-Y'
task rc:x list rc.dateformat.report=m-d-Y
echo
echo '$ task list rc.dateformat.report=YMDHNS'
task rc:x list rc.dateformat.report=YMDHNS
echo
echo '$ task list rc.dateformat.report="A, B D, Y (wkV)"'
task rc:x list rc.dateformat.report="A, B D, Y (wkV)"
exit

71
doc/misc/run.sample.ghistory Executable file
View File

@@ -0,0 +1,71 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task calendar sep 2010'
task rc:x calendar sep 2010
echo
echo '$ task calendar'
task rc:x calendar
echo
echo '$ task overdue'
task rc:x 2 done
exit

47
doc/misc/run.sample.holidays Executable file
View File

@@ -0,0 +1,47 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=95' >> x
echo 'monthsperline=3' >> x
echo 'calendar.details.report=list' >> x
echo 'calendar.details=full' >> x
echo 'calendar.holidays=full' >> x
echo 'calendar.legend=yes' >> x
echo 'include /usr/local/share/doc/task/rc/dark-green-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Put some more sample screenshots on taskwarrior.org
entry: 1283593511
project: 1.9.3
status: pending
due: 1284647841
uuid: 89295b14-9e15-4771-9dd9-7e82cf8b67b5
annotation:
entry: 1283593519
description: Show the calendar with holidays
annotation:
entry: 1283693560
description: Show a task that is due
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task calendar'
task rc:x calendar
exit

39
doc/misc/run.sample.info Executable file
View File

@@ -0,0 +1,39 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=95' >> x
echo 'include /usr/local/share/doc/task/rc/light-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=on rgb253' >> x
echo 'due=6' >> x
echo 'color.due=color0' >> x
echo 'color.tagged=color0' >> x
echo 'report.list.columns=id,project,priority_long,due,recur,description' >> x
echo 'report.list.labels=ID,Pro,Pri,Due,Recur,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Now the visible part.
echo
echo '$ task add Get stationery supplies proj:office pri:H due:sat +@mall +@weekend'
task rc:x add Get stationery supplies proj:office pri:H due:sat +@mall +@weekend
echo
echo '$ task annotate 1 Remember to get batteries'
task rc:x annotate 1 Remember to get batteries
sleep 2
echo
echo '$ task annotate 1 I wonder if they have that antique fanfold computer paper'
task rc:x annotate 1 I wonder if they have that antique fanfold computer paper
echo
echo '$ task 1 info'
task rc:x 1 info

42
doc/misc/run.sample.journal Executable file
View File

@@ -0,0 +1,42 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=90' >> x
echo 'journal.time=yes' >> x
echo 'dateformat.annotation=Y/m/d H:N' >> x
#echo 'include /usr/local/share/doc/task/rc/dark-256.theme' >> x
#echo 'include /usr/local/share/doc/task/rc/dark-green-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/dark-yellow-green.theme' >> x
# Now the visible part.
echo
echo '$ task add Complete the client report due:friday +@work'
task rc:x add Complete the client report due:friday +@work
echo
echo '$ task config journal.time on'
echo "Are you sure you want to add 'journal.time' with a value of 'on'? (y/n) y"
echo 'Config file .taskrc modified.'
echo
echo '$ task start 1'
task rc:x start 1
echo
echo '(some work happens)'
sleep 2
echo
echo '$ task list'
task rc:x list
echo
echo '$ task stop 1'
task rc:x stop 1
echo
echo '$ task list'
task rc:x list
exit

35
doc/misc/run.sample.recur Executable file
View File

@@ -0,0 +1,35 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=95' >> x
echo 'monthsperline=3' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'due=3' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Now the visible part.
echo
echo '$ task add Deposit paycheck due:friday recur:14days +@bank'
task rc:x add Deposit paycheck due:friday recur:14days
echo
echo '$ task calendar rc.recurrence.limit=6'
task rc:x calendar rc.recurrence.limit=6
echo
echo '$ task list'
task rc:x list
exit

74
doc/misc/run.sample.red Executable file
View File

@@ -0,0 +1,74 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-red-256.theme' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task 1 annotate Try the red one next'
task rc:x 1 annotate Try the red one next
echo
echo '$ task list'
task rc:x list
echo
echo '$ task 2 done'
task rc:x 2 done
echo
echo '$ task summary'
task rc:x summary
exit

71
doc/misc/run.sample.summary Executable file
View File

@@ -0,0 +1,71 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task calendar sep 2010'
task rc:x calendar sep 2010
echo
echo '$ task calendar'
task rc:x calendar
echo
echo '$ task overdue'
task rc:x 2 done
exit

63
doc/misc/run.sample.timesheet Executable file
View File

@@ -0,0 +1,63 @@
#! /bin/bash
# Small script to create a fragment of output for display on the front page
# of taskwarrior.org, as a teaser.
rm pending.data completed.data undo.data
echo 'data.location=.' > x
echo '_forcecolor=on' >> x
echo 'defaultwidth=120' >> x
echo 'include /usr/local/share/doc/task/rc/dark-violets-256.theme' >> x
echo 'include /usr/local/share/doc/task/rc/holidays-US.rc' >> x
echo 'color.alternate=' >> x
echo 'report.list.columns=id,project,priority_long,start,due,recur,age_compact,tags,description' >> x
echo 'report.list.labels=ID,Project,Pri,Started,Due,Recur,Age,Tags,Description' >> x
echo 'report.list.sort=due+,priority_long-,project+' >> x
# Import tasks with old timestamps
cat <<EOF >file.yaml
%YAML 1.1
---
task:
description: Try out the color themes
entry: 1281914800
start: 1282044800
project: software
status: pending
uuid: 13afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Visit http://taskwarrior.org
entry: 1281089630
tags: www
priority: H
project: software
status: pending
uuid: 23afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Review task list
entry: 1281289630
due: 1282844800
recur: weekly
project: gtd
status: pending
uuid: 33afada0-a446-8d5a-c213-30d99d52c4b0
task:
description: Try out latest FireFox beta
entry: 1281289630
project: software
status: pending
uuid: 43afada0-a446-8d5a-c213-30d99d52c4b0
...
EOF
printf "y\n" | task rc:x import file.yaml
# Now the visible part.
echo
echo '$ task timesheet 2'
task rc:x timesheet 2
exit

534
doc/misc/script-193.txt Normal file
View File

@@ -0,0 +1,534 @@
[Make window 116x32 for movie recording, light text, dark background]
This is the script from which a 1.9.3-specific movie will be made. On the left
are the typed commands, and on the right is the voice track.
It is intended that the left and right be combined and the result will be a new
task-tutorial.5 man page.
---------------------------------------- Intro -----------------------------------------------------
http://taskwarrior.org Hello, and welcome to this taskwarrior version 1.9.3 demo.
I'm going to show you over 100 features, so don't blink, or
you'll miss some. Even experienced users are going to learn
*something*.
I will start off with basic usage, and proceed to more
sophisticated commands as we go along.
---------------------------------------- Basic Usage -----------------------------------------------
Let's get started. We're planning a party, and there is a
lot of work to do, so let's capture these tasks.
task add Select a free weekend in August First decide 'when'.
task add Select and book a venue Then decide 'where'.
task add Come up with a guest list Then decide 'who'.
task add Mail invitations Let's send out nice invitations.
task add Select a caterer And a caterer.
task list Let's take a look. Good.
task log Order a special cake Now I've already ordered a cake, so rather than 'add' this,
I'm going to 'log' it. This just means that I want to keep
track of the task, but I've already done it. It saves me a
step.
task 4 duplicate /Mail/Design/ As for those invitations, I'm going to need to design them
task 4 dup /Mail/Print/ first. And I'm also going to need print them. Here we are
task list duplicating a task and making a substitution. Notice how
the commands can be abbreviated, provided they are still
unique.
task 3 done That looks good - but now I think of it, I already have my
task list guest list, so I can mark that one as done.
And that's basic usage, and you already know enough to be
productive using taskwarrior. If you stopped here, you
would be perfectly able to manage your task list.
But if you want to see what it can really do, keep watching...
---------------------------------------- Projects --------------------------------------------------
task add Pay teh rent on teh 31st Remember to pay the rent at the end of the month. Oh,
task 7 /teh/teh/g that was sloppy, but it can be fixed with a global
task list substitution.
task 7 project:home We can now use projects to separate home chores from the
party preparation. Let's assign that last task to the
'home' project. Note that a task may only belong to one
project.
task 1-6 project:party And we will put those first six tasks in the 'party'
project. See how we specify a range of tasks? Taskwarrior
will want to confirm bulk changes like this, but we'll
accept all changes here.
task projects Now that we have multiple projects, as shown here, we can
task list project:home use project as a filter for the list report. You can see
task li pro:par again that we can abbreviate 'list' and 'project', but when
we abbreviate 'party', we are filtering all the projects
that begin with 'par'.
---------------------------------------- Priorities ------------------------------------------------
task 1-3,5 priority:H Priorities are another way to organize tasks. You can use
task list priority values of high, medium and low, and taskwarrior
knows these as H, M or L.
task 3 pri: You can remove priorities by specifying a blank value.
---------------------------------------- Tags ------------------------------------------------------
task list A task may only have one project, but it may have any number
of tags, which are just single words associated with the task.
task 3,5,6 +mall I can go to the print shop at the mall, and do all the
invitation tasks, so let's tag them all.
task long The long report shows tags, too,
task list +mall and I can use tags as a filter to any report too.
task 3 -mall I made a mistake - I can't mail out the invitations at the
mall, so let's remove that tag.
---------------------------------------- Modifications ---------------------------------------------
task 7 Pay rent at the end of the month Task 7 is not worded correctly, so I can modify that by
specifying a task ID and a new description. This is also
considered a bulk change, and so requires confirmation.
task add music We'll need music.
task 8 prepend Select some I can prepend to that.
task 8 append for after dinner I can append to that.
task list
task edit I can also go straight into an editor and modify anything.
task add Hire a band? <--- Sometimes the command will confuse the shell. In this case,
what would happen if there was a file named 'bands' in the
current directory? The shell would expand that wildcard,
so to avoid that, you can...
task add Hire a band\? <--- escape the wildcard...
task add "Hire a band?" <--- or quote the whole description...
task add -- Hire a band\? +dj You can also use the minus minus operator which tells
taskwarrior to stop being clever and interpret the rest
of the arguments as a task description. Otherwise, that
+dj would be interpreted as a tag.
task undo We don't need a band, so the easiest way to get rid of that
task is to undo the last change. Taskwarrior has a
complete undo stack, so you can undo all the way back to
the beginning.
task 1 delete The undo operation gets rid of the task completely, but I
task undo could also have just deleted the task, then the deletion
itself would be tracked, and also undoable.
---------------------------------------- Info ------------------------------------------------------
task 1 info During that undo operation, taskwarrior displayed metadata
task 1 that is associated with the task. You can display this
with the info command, and its shortcut.
task stats There are also statistics that taskwarrior gathers, which
I can display.
---------------------------------------- Annotations -----------------------------------------------
task 1 annotate the 12th looks good Annotations are little notes that can be added to a task.
task 1 annotate or the 13th There can be any number, and each has a time stamp.
task list
task list rc.annotations:full You can choose to display annotations in different ways.
task list rc.annotations:sparse
task list rc.annotations:none
task 1 denotate 13th Annotations can be removed by providing a matching pattern.
task list
---------------------------------------- Configuration ---------------------------------------------
task show There is a 'show' command, that is used to display the
active configuration. There are hundreds of settings that
can be changed, and every one has a sensible default.
man taskrc If you want a complete list of all the settings and their
meanings, read the man page.
task config answer 42 The 'config' command is used to modify the settings, and in
this case the configuration variable 'answer' is given the
value of 42.
task show answer The 'show' command indicates that the value was changed,
task config answer and also that the variable is unrecognized. The show
command performs a detailed check on your configuration, and
alerts you to several kinds of problem. The config command
can also remove a value.
task rc.report.list.sort=description+ list
A very powerful feature is the ability to override the
configuration variables temporarily. Here I am requesting
an ascending sort on the description field only.
---------------------------------------- Defaults --------------------------------------------------
task config default.command list There is a default command, which can be set to anything,
task in this case it is set to the 'list' report. Then running
taskwarrior with no command name runs the default command.
task config default.priority H I can also specify a default priority and project, which
task config default.project Work means that any tasks added will use them, unless an
task add New task alternative is provided.
task list
task undo Let's just revert those changes, to clean up.
task config default.priority
task config default.project
---------------------------------------- Aliases ---------------------------------------------------
task config alias.zzz list You can create aliases to effectively rename commands.
task zzz
task z You can abbreviate those, too.
---------------------------------------- Color -----------------------------------------------------
task config color on All the examples so far have been shown with color turned
task list off. How about some color?
What you see is the result of a set of color rules being
applied to the tasks. There is a hierarchy of color rules
that colorize a task based on the metadata
task 1 "bg:on red" Here is an example of an explicit override to the color
task list rules where a specific task is given a red background.
task 1 bg: Note that the quotes are necessary, otherwise the shell
will consider "bg:on" and "red" to be separate arugments.
task color Taskwarrior supports 256 colors on certain terminal
emulators, and this shows the range of colors available.
task color white on red This is how to show a color sample.
task color legend Or samples of all the active color settings.
Themes are a simple way to use coordinated color schemes
so by including a color theme into the configuration file,
you can see some striking effects.
A blue theme.
# include /usr/local/share/doc/task/rc/dark-blue-256.theme
vi ~/.taskrc
task color legend
task list
A red theme.
# include /usr/local/share/doc/task/rc/dark-red-256.theme
vi ~/.taskrc
task color legend
task list
A general dark theme.
# include /usr/local/share/doc/task/rc/dark-256.theme
vi ~/.taskrc
task list
Here is are two color rules that specify a dark blue
background for all tasks that are part of the 'party'
project, and uses bold to identify any tasks with the
keyword 'invitations' in the description.
task "rc.color.project.party=on rgb001" rc.color.keyword.invit=bold list
man task-color There is a man page with a writeup of all the color
capabilities.
---------------------------------------- Active tasks ----------------------------------------------
task 2 start I'm selecting a venue, so let's indicate that task 2 is
task list active by starting it. See how active tasks are affected
by the color rules.
task active There is an active report that shows only active tasks, and
task 2 stop you can mark any active task as inactive, by stopping it.
task config journal.time on (y) There is a journalling feature that records the start and
task config dateformat.annotation 'Y/m/d H:N' (y)
task 2 start stop times as annotations. We'll turn that on, and add
task list venue the time to the annotation date format.
task 2 stop
task list venue
---------------------------------------- Due dates -------------------------------------------------
task 1 due:7/31/2010 Due dates can be specified as dates...
task 1 due:2wks as some distance into the future...
task 1 due:-2wks or past...
task 1 due:eom or by mnemonic (end of month)...
task 2 due:8th or by ordinal...
task 2 due:sunday or by day of week...
task 5 due:eow
task list Some of these dates are in the past, so now you see there
task overdue are overdue tasks. Due dates have different colors for
due, imminent, today and overdue values.
task rc.dateformat.report:Y-M-DTH:N:SZ list
You can also choose the format - for input and output.
---------------------------------------- Calendar --------------------------------------------------
task calendar When tasks have due dates, you can see them on the calendar.
vi ~/.taskrc
# include /usr/local/share/doc/task/rc/holidays-US.rc
task calendar
Taskwarrior provides sample holiday files. You can create
your own, or use one of the samples to show holidays on the
calendar.
task cal 2010 You can see the whole year.
task rc.calendar.details:full cal You can see the tasks with due dates also.
task rc.calendar.holidays:full cal And you can see the holidays.
---------------------------------------- Recurrence ------------------------------------------------
task 7 info Remember the task we added to pay the rent? We're going to
task 7 due:eom recur:monthly need to do that every month. Recurring tasks allow us to
task 7 set up a single task that keeps coming back, just as you'd
expect.
task 7 until:eoy You can also limit the extent of the recurrence. Let's make
sure the task doesn't recur after the lease ends.
task recurring And there is a recurring report that shows you only the
recurring tasks.
To illustrate a point, let's set up a recurring annual task
as a reminder to pay taxes, and put the due date in the past.
This will cause task to fill in the gaps, and create a series
of severely overdue tasks.
task add Pay taxes due:4/15/2007 recur:yearly
task long
task 11 delete # y y Deletions to recurring tasks can be escalated to include all
task list the recurrences of a task.
---------------------------------------- Shell -----------------------------------------------------
task shell You can use the shell command to create a more immersive
task> projects environment. Any task command you run outside the shell
task> tags can also be run inside the shell, without the need to prefix
task> list every command with "task".
task> quit
---------------------------------------- Special Tags ----------------------------------------------
task 6 +nocolor You've seen tags, but there are also 'special tags' that
task list have effects on individual tasks. The 'nocolor' special
tag causes the color rules to be bypassed.
task tags Special tags are highlighted by the 'tags' command.
task 6 -nocolor There are others - the 'nonag' special tag prevents the
generation of nag messages when you work on low priority
tasks when there are more important ones.
The 'nocal' special tag will prevent a task from appearing
on the calendar.
---------------------------------------- Waiting ---------------------------------------------------
task add Look for new apartment due:eoy When you have a task with a due date that is far out into
task list the future, you may want to hide that task for a while.
task 10 wait:12/1/2010 You can provide a wait date for a task, and it will remain
task list hidden until that date. It will no longer be cluttering
task waiting your task list, but it is still there, and visible using
the 'waiting' report. When the wait date comes, the task
will just pop back into the list.
task add Do something in a few seconds To illustrate this, let's set up a task with a very short
task 11 wait:5s wait time of five seconds.
task list It's gone.
(sleep 5) We wait for 5 seconds...
task list And it's back.
task 11 rc.confirmation:no delete And now it's deleted.
---------------------------------------- Dependencies ----------------------------------------------
task list pro:party Taskwarrior supports dependencies. Let's take a look at the
party planning tasks, and assign dependencies.
task 3 depends:6 Let's see. I can't mail invitations until they are printed.
task 6 dep:5 I can't print them until I design them.
task 2 dep:1 I need to select a weekend before a location.
task 5 dep:1,2 Design depends on location and weekend.
task 4 dep:1 And the caterer needs to know where.
task long pro:party All my tasks are blocked except task 1. That makes sense.
task 5 dep:-1 Hmm, that double dependency isn't right.
task blocked Here are the blocked tasks.
task unblocked and the opposite, the unblocked tasks.
task 1 info If we look at task 1 closely, we can see that it is blocking
task 2 info 2 and 4. And if we look at task 2, we see that it is
blocked by 1, and blocking 5.
This is called a dependency chain, which is a string of tasks
that are all connected not only by their project, but by
dependencies.
Now we understand that task 1 should be done first, but you
may still violate the laws of physics if you wish. Let's
complete task 2 and see what happens.
task 2 done (y) Taskwarrior realizes what you are doing, and offers to fix
task 1 info the dependency chain to reflect what you have done.
---------------------------------------- Reports ---------------------------------------------------
task minimal Taskwarrior has a good many reports. There is the bare minimum.
task ls The simple.
task list The standard.
task long The kitchen sink.
task all The packrat.
task completed Nostalgia.
task recurring Groundhog day.
task waiting Surprises.
task blocked Wedged.
task unblocked Unencumbered.
task oldest Ancient history.
task newest Contemporary.
task timesheet Corporate.
task next And "what should I work on next?" This one can be useful
because it pulls a few of the highest priority tasks from
all the projects. It's the report we should all be using.
---------------------------------------- Custom Report ---------------------------------------------
You can even define your own custom report. Let's quickly
create a custom report - we'll call it foo - and I can
choose from a long list of fields to include in the report,
but I want to see the ID, the date when I entered the task,
and the description. I can specify the labels for those
columns, the sort order of the report, and I can filter.
cat >> ~/.taskrc
report.foo.description=My own report
report.foo.columns=id,entry,description
report.foo.labels=ID,Entered,Description
report.foo.sort=entry+,description+
report.foo.filter=status:pending
task help | grep foo Custom reports also show up on the help output.
task show report.foo I can inspect the configuration.
task foo And they can be run just like the other reports.
---------------------------------------- Charts ----------------------------------------------------
task history The history report gives monthly totals of tasks added,
task history.annual completed and deleted. There is also an annual version.
task ghistory There is a graphical monthly...
task ghistory.annual and annual version.
task summary There is a project summary report that shows progress in
all the projects.
---------------------------------------- Advanced Filters ------------------------------------------
task list Filters are a very powerful tool. First here is an
task list invit unfiltered list, which shows all tasks. Now again, but with
the text 'invit', which acts as a filter on the description
field.
task list description.contains:invit This is the equivalent form using attribute modifiers. In
this example we are filtering on descriptions that contain
the word fragment. Here we are using the 'contains'
modifier, but there are many others.
task list desc.word:the All tasks containing the whole word 'the'. See how
annotations are also searched?
task list desc.noword:invitations Here is a list of all tasks that do not contain the whole
word 'invitations'.
task list pro:party Here list all tasks in the 'party' project.
task list pro.is:party And the full equivalent.
task list pro.not:party Here list tasks that are not in the 'party' project. I
could have also used 'isnt' here - there are several
synonyms for modifiers, so that the filter can be written
so that it reads naturally.
task list pro:party pri.over:L Here the 'over' modifier is filtering on priorities that
sort higher than 'Low', and also filtering on the 'party'
project. There are two terms in this filter.
task list pro:party limit:2 Same again, but only show me the first two tasks.
task list limit:page Now all tasks, but just show the first page of tasks. I
don't have a page full of tasks here, but you get the idea.
task all status:pending Now you can see how some of the built-in reports work. The
'list' report is just all tasks, filtered so that only the
pending tasks are shown.
task all status:waiting The 'waiting' report is similarly defined.
---------------------------------------- Import/Export ---------------------------------------------
task export.csv You can export your tasks. Here you see all tasks being
exported in CSV format.
task export.csv venue Let's just export one task in CSV format...
task export.vcalendar venue Or in VCalendar format...
task export.yaml venue Or YAML.
cat file.text I can also import. Here I am importing simple lines of
task import file.text text. Taskwarrior recognizes the format and confirms.
cat file.yaml Here is a YAML example. Taskwarrior can read several
task import file.yaml formats, including old versions of its data files. Using
YAML, you can round-trip the data without loss.
task new limit:2 Here are the imported tasks.
---------------------------------------- Help ------------------------------------------------------
task help You'll find a quick reference page built in, with the 'help'
man task command, or perhaps you'll want to take a look at the several
man taskrc man pages installed. This demo has superficially shown
man task-color many features which have more capability and depth which you
can find in the man pages, and online.
man task-tutorial This screencast is actually just a recording of me going
through the tutorial.
man task-faq Some frequently asked questions are answered here.
man task-sync You've patiently watched this whole movie, so here's your
reward - taskwarrior 1.9.3 has network synchronization
features, for sharing tasks across computers. But this is
just a teaser - synch will be shown in the next movie.
---------------------------------------- Wrap up ---------------------------------------------------
task version And that's it. Don't forget to take a look at
taskwarrior.org.
Thank you for watching.
---------------------------------------- End -------------------------------------------------------

View File

@@ -1,5 +1,5 @@
Hello. This is a demonstration of the
task program color capabilities coming
taskwarrior color capabilities coming
in version 1.9.
task color The color command shows the various

View File

@@ -1,5 +1,5 @@
$ # Q: What is a formatting hook?
$ # A: Lua code that modifies task output at run time.
$ # A: Lua code that modifies taskwarrior output at run time.
$
$ cat > hooks.lua

View File

@@ -1,5 +1,5 @@
$
$ # Task now has Lua 5.1.4 built in.
$ # Taskwarrior now has Lua 5.1.4 built in.
$
$ task version
$ cat > hooks.lua
@@ -9,18 +9,18 @@ function foo ()
end
^D
$
$ # Task can call into Lua at many points during execution.
$ # This one is called immediately before task quits.
$ # Taskwarrior can call into Lua at many points during execution.
$ # This one is called immediately before taskwarrior 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.
$ # While taskwarrior is calling Lua code, the Lua can also call
$ # back into a taskwarrior API, for information.
$
$ cat > hooks.lua
function foo ()
print "Lua version is " .. task_lua_version ())
print "Task version is " .. task_version ())
print "Taskwarrior version is " .. task_version ())
return 0, nil
end
^D

View File

@@ -1,4 +1,5 @@
Hello, and welcome to this quick demo of the task program.
Hello, and welcome to this quick demo of the
taskwarrior program.
task add do laundry Let's add some tasks
I need to do laundry
@@ -68,7 +69,6 @@ task 3 fg:
task colors There are many combinations to choose from
(Slashes!!!)
task 1 due:6/8/2008 Let's add a due date
date

View File

@@ -1,4 +1,31 @@
# Sample task 1.9 (or later) dark 16-color theme
################################################################################
# Sample taskwarrior 1.9 (or later) dark 16-color theme
#
# taskwarrior - 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
#
################################################################################
color=on
color.header=yellow
@@ -33,5 +60,8 @@ color.pri.H=bold white
color.pri.M=white
color.pri.L=
color.tagged=green
color.blocked=black on white
color.project.none=
color.tag.none=
color.alternate=

View File

@@ -1,4 +1,31 @@
# Sample task 1.9 (or later) dark 256-color theme
###############################################################################
# Sample taskwarrior 1.9 (or later) dark 256-color theme
#
# taskwarrior - 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
#
################################################################################
color=on
color.header=color3
@@ -33,5 +60,8 @@ color.pri.H=color255
color.pri.M=color250
color.pri.L=color245
color.tagged=rgb031
color.blocked=white on color8
color.project.none=
color.tag.none=
color.alternate=on color233

View File

@@ -1,4 +1,31 @@
# Sample task 1.9 (or later) dark 256-color theme, featuring blue.
###############################################################################
# Sample taskwarrior 1.9 (or later) dark 256-color theme, featuring blue.
#
# taskwarrior - 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
#
################################################################################
color=on
color.header=rgb013
@@ -33,5 +60,8 @@ color.pri.H=rgb035
color.pri.M=rgb025
color.pri.L=rgb015
color.tagged=color246
color.blocked=white on rgb001
color.project.none=
color.tag.none=
color.alternate=on color233

View File

@@ -1,4 +1,31 @@
# Sample task 1.9 (or later) dark 256-color theme, featuring green.
###############################################################################
# Sample taskwarrior 1.9 (or later) dark 256-color theme, featuring green.
#
# taskwarrior - 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
#
################################################################################
color=on
color.header=rgb031
@@ -33,5 +60,8 @@ color.pri.H=rgb050
color.pri.M=rgb030
color.pri.L=rgb010
color.tagged=color246
color.blocked=white on rgb010
color.project.none=
color.tag.none=
color.alternate=on color233

View File

@@ -1,4 +1,31 @@
# Sample task 1.9 (or later) dark 256-color theme, featuring red.
###############################################################################
# Sample taskwarrior 1.9 (or later) dark 256-color theme, featuring red.
#
# taskwarrior - 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
#
################################################################################
color=on
color.header=rgb100
@@ -33,5 +60,8 @@ color.pri.H=rgb500
color.pri.M=rgb400
color.pri.L=rgb300
color.tagged=color246
color.blocked=white on rgb100
color.project.none=
color.tag.none=
color.alternate=on color233

View File

@@ -0,0 +1,67 @@
################################################################################
# Sample taskwarrior 1.9 (or later) dark violet 256-color theme
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Kathryn Andersen
# 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
#
################################################################################
color=on
color.header=rgb013
color.footnote=rgb013
color.debug=rgb013
color.summary.bar=on rgb103
color.summary.background=on color0
color.history.add=color0 on rgb105
color.history.done=color0 on rgb205
color.history.delete=color0 on rgb305
color.undo.before=rgb103
color.undo.after=rgb305
color.calendar.today=color15 on rgb103
color.calendar.due=color0 on rgb325
color.calendar.due.today=color0 on rgb404
color.calendar.overdue=color0 on color9
color.calendar.weekend=gray12 on gray3
color.calendar.holiday=color15 on rgb022
color.calendar.weeknumber=rgb104
color.recurring=rgb115
color.overdue=color9
color.due.today=rgb533
color.due=rgb055
color.active=rgb445 on rgb213
color.pri.none=
color.pri.H=rgb404
color.pri.M=rgb304
color.pri.L=rgb325
color.tagged=rgb334
color.blocked=white on rgb101
color.project.none=
color.tag.none=
color.alternate=on gray2

View File

@@ -0,0 +1,67 @@
################################################################################
# Sample taskwarrior 1.9 (or later) dark-yellow-green 256-color theme
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Kathryn Andersen
# 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
#
################################################################################
color=on
color.header=rgb031
color.footnote=rgb031
color.debug=rgb031
color.summary.bar=on rgb030
color.summary.background=on color0
color.history.add=color0 on rgb010
color.history.done=color0 on rgb030
color.history.delete=color0 on rgb050
color.undo.before=rgb031
color.undo.after=rgb053
color.calendar.today=color15 on rgb110
color.calendar.due=color0 on rgb430
color.calendar.due.today=color0 on rgb410
color.calendar.overdue=color0 on rgb400
color.calendar.weekend=on color235
color.calendar.holiday=rgb151 on rgb020
color.calendar.weeknumber=rgb110
color.recurring=rgb343
color.overdue=rgb400
color.due.today=rgb410
color.due=rgb420
color.active=rgb451 on rgb310
color.pri.none=
color.pri.H=rgb450
color.pri.M=rgb030
color.pri.L=rgb010
color.tagged=rgb342
color.blocked=white on rgb110
color.project.none=
color.tag.none=
color.alternate=on gray0

76
doc/rc/holidays-CA.rc Normal file
View File

@@ -0,0 +1,76 @@
################################################################################
# Sample calendar for Canada
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Cory Donnelly.
# 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
#
################################################################################
calendar.holidays=sparse
# 2010
holiday.labourday.name=Labour Day
holiday.labourday.date=20100906
holiday.thanksgiving.name=Thanksgiving Day
holiday.thanksgiving.date=20101011
holiday.remembranceday.name=Remembrance Day
holiday.remembranceday.date=20101111
holiday.christmasday.name=Christmas Day
holiday.christmasday.date=20101225
holiday.boxingday.name=Boxing Day
holiday.boxingday.date=20101226
holiday.newyearseve.name=New Year's Eve
holiday.newyearseve.date=20101231
# 2011
holiday.newyearsday.name=New Year's Day
holiday.newyearsday.date=20110101
holiday.familyday.name=Family Day
holiday.familyday.date=20110117
holiday.goodfriday.name=Good Friday
holiday.goodfriday.date=20110422
holiday.eastermonday.name=Easter Monday
holiday.eastermonday.date=20110425
holiday.victoriaday.name=Victoria Day
holiday.victoriaday.date=20110524
holiday.canadaday.name=Canada Day
holiday.canadaday.date=20110701
holiday.firstmondayofaugust.name=First Monday of August
holiday.firstmondayofaugust.date=20110801
# Commented out to prevent collision with names of 2010 holidays
# that haven't happened yet
#holiday.labourday.name=Labour Day
#holiday.labourday.date=20110905
#holiday.thanksgiving.name=Thanksgiving Day
#holiday.thanksgiving.date=20111010
#holiday.remembranceday.name=Remembrance Day
#holiday.remembranceday.date=20111111
#holiday.christmasday.name=Christmas Day
#holiday.christmasday.date=20111225
#holiday.boxingday.name=Boxing Day
#holiday.boxingday.date=20111226
#holiday.newyearseve.name=New Year's Eve
#holiday.newyearseve.date=20111231

87
doc/rc/holidays-DE.rc Normal file
View File

@@ -0,0 +1,87 @@
################################################################################
# Sample calendar for Germany
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Federico Hernandez.
# 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
#
################################################################################
calendar.holidays=sparse
# 2010
holiday.reformationstag.name=Reformationstag (BB,MV,SN,ST,TH)
holiday.reformationstag.date=20101031
holiday.allerheiligen.name=Allerheiligen (BW,BY,NRW,RP,SL)
holiday.allerheiligen.date=20101101
holiday.bussundbettag.name=Buss und Bettag (SN)
holiday.bussundbettag.date=20101117
holiday.heiligabend.name=Heilig Abend
holiday.heiligabend.date=20101224
holiday.weihnachtstag.name=Weihnachtstag
holiday.weihnachtstag.date=20101225
holiday.zweiterweihnachtstag.name=Zweiter Weihnachtstag
holiday.zweiterweihnachtstag.date=20101226
holiday.sylvester.name=Sylvester
holiday.sylvester.date=20101231
# 2011
holiday.neujahr.name=Neujahr
holiday.neujahr.date=20110101
holiday.heiligedreikonige.name=Heilige drei Könige (BW,BY,ST)
holiday.heiligedreikonige.date=20110106
holiday.karfreitag.name=Karfreitag
holiday.karfreitag.date=20110422
holiday.ostern.name=Ostern
holiday.ostern.date=20110424
holiday.ostermontag.name=Ostermontag
holiday.ostermontag.date=20110425
holiday.maifeiertag.name=Erster Maifeiertag
holiday.maifeiertag.date=20110501
holiday.christihimmelfahrt.name=Christi Himmelfahrt
holiday.christihimmelfahrt.date=20110602
holiday.pfingstsonntag.name=Pfingstsonntag
holiday.pfingstsonntag.date=20110612
holiday.pfingstmontag.name=Pfingstmontag
holiday.pfingstmontag.date=20110613
holiday.fronleichnam.name=Fronleichnam (BW,BY,HE,NRW,RP,SL,(SN,TH))
holiday.fronleichnam.date=20110623
holiday.mariahimmelfahrt.name=Mariä Himmelfahrt (SL)
holiday.mariahimmelfahrt.date=20110815
holiday.einheit.name=Tag der Deutschen Einheit
holiday.einheit.date=20111003
#holiday.reformationstag.name=Reformationstag (BB,MV,SN,ST,TH)
#holiday.reformationstag.date=20111031
#holiday.allerheiligen.name=Allerheiligen (BW,BY,NRW,RP,SL)
#holiday.allerheiligen.date=20111101
#holiday.bussundbettag.name=Buss und Bettag (SN)
#holiday.bussundbettag.date=20111116
#holiday.heiligabend.name=Heilig Abend
#holiday.heiligabend.date=20111224
#holiday.weihnachtstag.name=Weihnachtstag
#holiday.weihnachtstag.date=20111225
#holiday.zweiterweihnachtstag.name=Zweiter Weihnachtstag
#holiday.zweiterweihnachtstag.date=20111226
#holiday.sylvester.name=Sylvester
#holiday.sylvester.date=20111231

73
doc/rc/holidays-ES.rc Normal file
View File

@@ -0,0 +1,73 @@
################################################################################
# Sample calendar for Spain
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Federico Hernandez.
# 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
#
################################################################################
calendar.holidays=sparse
# 2010
holiday.fiestanacional.name=Fiesta Nacional de España
holiday.fiestanacional.date=20101012
holiday.santos.name=Dia de todos los Santos
holiday.santos.date=20101101
holiday.constitucion.name=Dia de la Constitución
holiday.constitucion.date=20101206
holiday.concepcion.name=Inmaculada Concepción
holiday.concepcion.date=20101208
holiday.nochebuena.name=Noche Buena
holiday.nochebuena.date=20101224
holiday.navidad.name=Navidad
holiday.navidad.date=20101225
holiday.nochevieja.name=Noche Vieja
holiday.nochevieja.date=20101231
# 2011
holiday.anonuevo.name=Año Nuevo
holiday.anonuevo.date=20110101
holiday.reyes.name=Día de los Reyes
holiday.reyes.date=20110106
holiday.viernessanto.name=Viernes Santo
holiday.viernessanto.date=20110422
holiday.trabajo.name=Fiesta del Trabajo
holiday.trabajo.date=20110501
holiday.virgen.name=Asunción de la Virgen
holiday.virgen.date=20110815
#holiday.fiestanacional.name=Fiesta Nacional de España
#holiday.fiestanacional.date=20111012
#holiday.santos.name=Dia de todos los Santos
#holiday.santos.date=20111101
#holiday.constitucion.name=Dia de la Constitución
#holiday.constitucion.date=20111206
#holiday.concepcion.name=Inmaculada Concepción
#holiday.concepcion.date=20111208
#holiday.nochebuena.name=Noche Buena
#holiday.nochebuena.date=20111224
#holiday.navidad.name=Navidad
#holiday.navidad.date=20111225
#holiday.nochevieja.name=Noche Vieja
#holiday.nochevieja.date=20111231

62
doc/rc/holidays-FR.rc Normal file
View File

@@ -0,0 +1,62 @@
################################################################################
# Sample calendar for France
#
# taskwarrior - a command line task list manager.
#
# Copyright 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
#
################################################################################
calendar.holidays=sparse
# 2010
holiday.toussaint.name=La Toussaint
holiday.toussaint.date=20101101
holiday.armistice.name=Jour d'armistice
holiday.armistice.date=20101111
holiday.noël.name=Noël
holiday.noël.date=20101225
# 2011
holiday.jourdelan.name=Jour de l'an
holiday.jourdelan.date=20110101
holiday.travail.name=Fête du premier mai
holiday.travail.date=20110501
holiday.victoire.name=la Fête de Victoire 45
holiday.victoire.date=20110508
holiday.ascencion.name=l'Ascencion
holiday.ascencion.date=20110602
holiday.pentecôte.name=la Pentecôte
holiday.pentecôte.date=20110612
holiday.bastille.name=Fête nationale
holiday.bastille.date=20110714
holiday.assomption.name=Assomption
holiday.assomption.date=20110815
#holiday.toussaint.name=La Toussaint
#holiday.toussaint.date=20111101
#holiday.armistice.name=Jour d'armistice
#holiday.armistice.date=20111111
#holiday.noël.name=Noël
#holiday.noël.date=20111225

101
doc/rc/holidays-NL.rc Normal file
View File

@@ -0,0 +1,101 @@
################################################################################
# Sample calendar for the Netherlands
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Charles T. Yun
# 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
#
################################################################################
calendar.holidays=sparse
# 2010
holiday.sinterklaas.name=Sinterklaas
holiday.sinterklaas.date=20101205
holiday.koninkrijksdag.name=Koninkrijksdag
holiday.koninkrijksdag.date=20101215
holiday.kerstmis.name=Kerstmis
holiday.kerstmis.date=20101225
holiday.kerstmis.name=Tweede Kerstdag
holiday.kerstmis.date=20101226
# 2011
holiday.nieuwjaar.name=Nieuwjaar
holiday.nieuwjaar.date=20110101
holiday.goedevrijdag.name=Goede Vrijdag
holiday.goedevrijdag.date=20110422
holiday.pasen.name=Pasen
holiday.pasen.date=20110424
holiday.pasen.name=Tweede Paasdag
holiday.pasen.date=20100425
holiday.koninginnedag.name=Koninginnedag
holiday.koninginnedag.date=20110430
holiday.dodenherdenking.name=Dodenherdenking
holiday.dodenherdenking.date=20110504
holiday.bevrijdingsdag.name=Bevrijdingsdag
holiday.bevrijdingsdag.date=20110505
holiday.hemelvaartsdag.name=Hemelvaartsdag
holiday.hemelvaartsdag.date=20110602
holiday.pinksteren.name= Pinksteren
holiday.pinksteren.date=20110612
holiday.pinksteren.name=Tweede Pinksterdag
holiday.pinksteren.date=20110613
#holiday.sinterklaas.name=Sinterklaas
#holiday.sinterklaas.date=20111205
#holiday.koninkrijksdag.name=Koninkrijksdag
#holiday.koninkrijksdag.date=20111215
#holiday.kerstmis.name=Kerstmis
#holiday.kerstmis.date=20111225
#holiday.kerstmis.name=Tweede Kerstdag
#holiday.kerstmis.date=20111226
# 2012
#holiday.nieuwjaar.name=Nieuwjaar
#holiday.nieuwjaar.date=20120101
#holiday.goedevrijdag.name=Goede Vrijdag
#holiday.goedevrijdag.date=20120406
#holiday.pasen.name=Pasen
#holiday.pasen.date=20120408
#holiday.pasen.name=Tweede Pasdag
#holiday.pasen.date=20120409
#holiday.koninginnedag.name=Koninginnedag
#holiday.koninginnedag.date=20120430
#holiday.dodenherdenking.name=Dodenherdenking
#holiday.dodenherdenking.date=20120504
#holiday.bevrijdingsdag.name=Bevrijdingsdag
#holiday.bevrijdingsdag.date=20120505
#holiday.hemelvaartsdag.name=Hemelvaartsdag
#holiday.hemelvaartsdag.date=20120617
#holiday.pinksteren.name= Pinksteren
#holiday.pinksteren.date=20120627
#holiday.pinksteren.name=Tweede Pinksterdag
#holiday.pinksteren.date=20120628
#holiday.sinterklaas.name=Sinterklaas
#holiday.sinterklaas.date=20121205
#holiday.koninkrijksdag.name=Koninkrijksdag
#holiday.koninkrijksdag.date=20121215
#holiday.kerstmis.name=Kerstmis
#holiday.kerstmis.date=20121225
#holiday.kerstmis.name=Tweede Kerstdag
#holiday.kerstmis.date=20121226

113
doc/rc/holidays-NO.rc Normal file
View File

@@ -0,0 +1,113 @@
################################################################################
# Sample calendar for Norway
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Jostein Berntsen
# 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
#
################################################################################
calendar.holidays=sparse
# 2010
holiday.julaften.name=Julaften
holiday.julaften.date=20101224
holiday.juledag.name=Juledag
holiday.juledag.date=20101225
holiday.juledag2.name=Juledag
holiday.juledag2.date=20101226
holiday.nyttårsaften.name=Nyttårsaften
holiday.nyttårsaften.date=20101231
# 2011
holiday.nyttårsdag.name=Nyttårsdag
holiday.nyttårsdag.date=20110101
holiday.fastelavn.name=Fastelavn
holiday.fastelavn.date=20110306
holiday.palmesøndag.name=Palmesøndag
holiday.palmesøndag.date=20110417
holiday.skjærtorsdag.name=Skjærtorsdag
holiday.skjærtorsdag.date=20110421
holiday.langfredag.name=Langfredag
holiday.langfredag.date=20110422
holiday.påskedag.name=Påskedag
holiday.påskedag.date=20110424
holiday.påskedag2.name=Påskedag
holiday.påskedag2.date=20110425
holiday.offentlighøytidsdag.name=Offentlig Høytidsdag
holiday.offentlighøytidsdag.date=20110501
holiday.frigjøringsdag.name=Frigjøringsdag 1945
holiday.frigjøringsdag.date=20110508
holiday.grunnlovsdag.name=Grunnlovsdag
holiday.grunnlovsdag.date=20110517
holiday.KristiHimmelfartsdag.name=Kristi Himmelfartsdag
holiday.KristiHimmelfartsdag.date=20110602
holiday.pinsedag.name=Pinsedag
holiday.pinsedag.date=20110612
holiday.pinsedag2.name=Pinsedag
holiday.pinsedag2.date=20110613
#holiday.julaften.name=Julaften
#holiday.julaften.date=20111224
#holiday.juledag.name=Juledag
#holiday.juledag.date=20111225
#holiday.juledag2.name=Juledag
#holiday.juledag2.date=20111226
#holiday.nyttårsaften.name=Nyttårsaften
#holiday.nyttårsaften.date=20111231
# 2012
#holiday.nyttårsdag.name=Nyttårsdag
#holiday.nyttårsdag.date=20120101
#holiday.fastelavn.name=Fastelavn
#holiday.fastelavn.date=20120219
#holiday.palmesøndag.name=Palmesøndag
#holiday.palmesøndag.date=20120401
#holiday.skjærtorsdag.name=Skjærtorsdag
#holiday.skjærtorsdag.date=20120405
#holiday.langfredag.name=Langfredag
#holiday.langfredag.date=20120406
#holiday.påskedag.name=Påskedag
#holiday.påskedag.date=20120408
#holiday.påskedag2.name=Påskedag
#holiday.påskedag2.date=20120409
#holiday.offentlighøytidsdag.name=Offentlig Høytidsdag
#holiday.offentlighøytidsdag.date=20120501
#holiday.frigjøringsdag.name=Frigjøringsdag 1945
#holiday.frigjøringsdag.date=20120508
#holiday.grunnlovsdag.name=Grunnlovsdag
#holiday.grunnlovsdag.date=20120517
#holiday.KristiHimmelfartsdag.name=Kristi Himmelfartsdag
#holiday.KristiHimmelfartsdag.date=20120517
#holiday.pinsedag.name=Pinsedag
#holiday.pinsedag.date=20120527
#holiday.pinsedag2.name=Pinsedag
#holiday.pinsedag2.date=20120528
#holiday.julaften.name=Julaften
#holiday.julaften.date=20121224
#holiday.juledag.name=Juledag
#holiday.juledag.date=20121225
#holiday.juledag2.name=Juledag
#holiday.juledag2.date=20121226
#holiday.nyttårsaften.name=Nyttårsaften
#holiday.nyttårsaften.date=20121231

View File

@@ -1,29 +1,35 @@
################################################################################
# Sample calendar for Sweden
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Federico Hernandez.
# 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
#
################################################################################
calendar.holidays=sparse
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
# 2010
holiday.allahelgonsdag.name=Alla Helgons Dag
holiday.allahelgonsdag.date=20101106
holiday.julafton.name=Julafton
@@ -34,3 +40,40 @@ holiday.annandagjul.name=Annandag jul
holiday.annandagjul.date=20101226
holiday.nyårsafton.name=Nyårsafton
holiday.nyårsafton.date=20101231
# 2011
holiday.nyårsdagen.name=Nyårsdagen
holiday.nyårsdagen.date=20110101
holiday.trettondedagjul.name=Trettondedag jul
holiday.trettondedagjul.date=20110106
holiday.långfredagen.name=Långfredagen
holiday.långfredagen.date=20110422
holiday.påskdagen.name=Påskdagen
holiday.påskdagen.date=20110424
holiday.annandagpåsk.name=Annandag påsk
holiday.annandagpåsk.date=20110425
holiday.valborgmässoafton.name=Valborgmässoafton
holiday.valborgmässoafton.date=20110430
holiday.förstamaj.name=Första maj
holiday.förstamaj.date=20110501
holiday.kristihimmelfärdsdag.name=Kristi Himmelsfärdsdag
holiday.kristihimmelfärdsdag.date=20110602
holiday.nationaldagen.name=Nationaldagen
holiday.nationaldagen.date=20110606
holiday.pingstdagen.name=Pingstdagen
holiday.pingstdagen.date=20110612
holiday.midsommarafton.name=Midsommarafton
holiday.midsommarafton.date=20110624
holiday.midsommardagen.name=Midsommardagen
holiday.midsommardagen.date=20110625
# holiday.allahelgonsdag.name=Alla Helgons Dag
# holiday.allahelgonsdag.date=20111105
# holiday.julafton.name=Julafton
# holiday.julafton.date=20111224
# holiday.juldagen.name=Juldagen
# holiday.juldagen.date=20111225
# holiday.annandagjul.name=Annandag jul
# holiday.annandagjul.date=20111226
# holiday.nyårsafton.name=Nyårsafton
# holiday.nyårsafton.date=20111231

56
doc/rc/holidays-UK.rc Normal file
View File

@@ -0,0 +1,56 @@
################################################################################
# Sample calendar for the UK
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Federico Hernandez.
# 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
#
################################################################################
calendar.holidays=sparse
# 2010
holiday.christmas.name=Christmas Day
holiday.christmas.date=20101225
holiday.boxingday.name=Boxing Day
holiday.boxingday.date=20101226
# 2011
holiday.newyear.name=New Year's Day
holiday.newyear.date=20110101
holiday.goodfriday.name=Good Friday
holiday.goodfriday.date=20110422
holiday.eastermonday.name=Easter Monday
holiday.eastermonday.date=20110425
holiday.may.name=Early May Bank Holiday
holiday.may.name=20110502
holiday.spring.name=Spring Bank Holiday
holiday.spring.name=20110530
holiday.august.name=August Bank Holiday
holiday.august.name=20110829
#holiday.christmas.name=Christmas Day
#holiday.christmas.date=20111225
#holiday.boxingday.name=Boxing Day
#holiday.boxingday.date=20111226

View File

@@ -1,19 +1,35 @@
################################################################################
# Sample calendar for the US
#
# taskwarrior - a command line task list manager.
#
# Copyright 2010, Federico Hernandez.
# 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
#
################################################################################
calendar.holidays=sparse
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
# 2010
holiday.laborday.name=Labor Day
holiday.laborday.date=20100906
holiday.columbusday.name=Columbus Day
@@ -24,5 +40,33 @@ 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.name=New Year's Eve
holiday.newyearseve.date=20101231
# 2011
holiday.newyearsday.name=New Year's Day
holiday.newyearsday.date=20110101
holiday.martinlutherkingday.name=Birthday of Martin Luther King, Jr.
holiday.martinlutherkingday.date=20110117
holiday.presidentsday.name=Washington's Birthday
holiday.presidentsday.date=20110221
holiday.patriotsday.name=Patriots' Day
holiday.patriotsday.date=20110419
holiday.memorialday.name=Memorial Day
holiday.memorialday.date=20110530
holiday.independenceday.name=Independence Day
holiday.independenceday.date=20110704
# holiday.laborday.name=Labor Day
# holiday.laborday.date=20110905
# holiday.columbusday.name=Columbus Day
# holiday.columbusday.date=20111010
# holiday.veteransdays.name=Veterans Day
# holiday.veteransdays.date=20111111
# holiday.thanksgiving.name=Thanksgiving Day
# holiday.thanksgiving.date=20111124
# holiday.christmasday.name=Christmas Day
# holiday.christmasday.date=20111225
# holiday.newyearseve.name=New Year's Eve
# holiday.newyearseve.date=20111231

View File

@@ -1,4 +1,31 @@
# Sample task 1.9 (or later) light 16-color theme
###############################################################################
# Sample taskwarrior 1.9 (or later) light 16-color theme
#
# taskwarrior - 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
#
################################################################################
color=on
color.header=blue
@@ -33,5 +60,8 @@ color.pri.H=bold black
color.pri.M=black
color.pri.L=
color.tagged=green
color.blocked=white on black
color.project.none=
color.tag.none=
color.alternate=

View File

@@ -1,5 +1,31 @@
# Sample task 1.9 (or later) light 256-color theme
###############################################################################
# Sample taskwarrior 1.9 (or later) light 256-color theme
#
# taskwarrior - 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
#
################################################################################
color=on
color.header=color4
color.footnote=color4
@@ -33,5 +59,8 @@ color.pri.H=color232
color.pri.M=color237
color.pri.L=color242
color.tagged=rgb020
color.blocked=gray12 on gray4
color.project.none=
color.tag.none=
color.alternate=on color254

View File

@@ -1,9 +1,9 @@
# 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.
# The taskwarrior 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:
#
@@ -18,7 +18,7 @@
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.
108 Interactive mode 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
@@ -61,6 +61,8 @@
230 config
231 show
235 diagnostics
# 3xx Attributes - must be sequential
300 project
301 priority

View File

@@ -1,9 +1,9 @@
# 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.
# The taskwarrior 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
# default. 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:
#

View File

@@ -1,5 +1,72 @@
%
first tip
For bash users, try 'alias t=task' to save some keystrokes.
%
second tip
Have you tried 'task edit 1' to use your text editor to modify all aspects of
task 1?
%
Did you know that 'task 1 wait:eom' will hide task 1 until the end of the
month? You can then see all waiting tasks with 'task waiting'.
%
Did you know that 'task 1 wait:' will restore a waiting task to pending status?
%
If you put 'default.command=list project:home' in your .taskrc file, then just
running 'task' will automatically run 'task list project:home' for you. Save
some keystrokes!
%
If you edit your pending.data file, make sure that your text editor doesn't
strip the trailing \n characters from the end of the file.
%
If you must edit your pending.data file, make sure that your text editor doesn't
convert from a Unix to a DOS file encoding.
%
Did you build task from source? If you didn't have ncurses installed at the
time, then you're missing out on text wrapping and task cannot take advantage of
the full terminal width. Consider rebuilding with ncurses installed, or install
from a pre-built package for your OS.
%
Do you have the latest version of task installed? Check http://taskwarrior.org
periodically for news of updates. That feature you wanted might be ready...
%
Don't forget the online docs at http://taskwarrior.org/wiki/taskwarrior, and if
you find errors, please let us know. Then again, it is a wiki, so feel free to
correct them yourself.
%
Don't forget the online docs at http://taskwarrior.org/wiki/taskwarrior, but if
you cannot find documentation on a particular topic, either create a ticket
requesting it, email support@taskwarrior.org asking for it, or start it
yourself.
%
Did you know there are man pages for task? Try 'man task', 'man taskrc',
'man task-tutorial', 'man task-color' and 'man task-faq'.
%
Did you know there are several 256-color themes available for task?
%
Did you know that running 'task show' will perform various checks on your
.taskrc file, looking for errors?
%
Are you making the most of color? Try 'task color' to see what colors your
system supports.
%
Are you using projects? If you do, taskwarrior will keep track of the project
completion percentage and report it to you whenever it changes.
%
Did you know you can list tasks that have priorities like 'task list
priority.above:L'?
%
The http://tasktools.org/latest URL can tell you which is the latest version.
%
To make your task list clear and actionable, always describe it starting with a
verb, like "call" or "clean" or "get".
%
Don't like the name of a command? Create an alias.
%
You can choose whether your searches are case sensitive or not, by running
'task config search.case.sensitive yes'
%
Back up your data files by making copies of the ~/.taskrc file and ~/.task
directory.
%
Accidentally changed a task? The undo command makes it a breeze to recover from
any inadvertent change -- even a deletion!
%

View File

@@ -1,5 +1,14 @@
%
första tips
För bash användare, med 'alias t=task' kan du spara på nedslagningar på tangentbordet.
%
andra tips
Har du försökt att använda 'task edit 1' för att ändra alla aspekter av task 1 i din texteditor?
%
Med 'task 1 wait:eom' kan du göma task 1 fram till slutet av månaden. För att se
alla task som väntar kan du använda 'task waiting'.
%
Visste du att 'task 1 wait:' återställa en väntande task till "peding" igen?
%
Skriv 'default.command=list project:home' i din .taskrc fil. När du sen använder
'task' körs det en 'task list project:home' istäälet för dig. Spara på nedslagningar
på tangetbordet.
%

Binary file not shown.

View File

@@ -31,9 +31,10 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
$ cd ~/task-package.git
2.2 Making sure you have the right version of the code. This assumes you are
building task 1.9.2, but any version number is interchangeable. Check out
the correct branch, and make sure it is sitting at the correct commit, via
a tag. Note that while 1.9.2 is a branch name, v1.9.2 is a tag name.
building taskwarrior 1.9.2, but any version number is interchangeable.
Check out the correct branch, and make sure it is sitting at the correct
commit, via a tag. Note that while 1.9.2 is a branch name, v1.9.2 is a tag
name.
$ git checkout 1.9.2
$ git reset --hard v1.9.2
@@ -41,7 +42,7 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
If there is an error in this step, stop, capture the output, and report the
errors.
3. Build task
3. Build taskwarrior
3.1 First build the task binary. Note the "-j 2" tells make to use both cores
in your dual-core Intel CPU, which means faster compiles. If you own a quad
@@ -61,9 +62,9 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
4. Build the test suite
4.1 The test suite exists to prove that we do not break task features from one
release to the next. While this is not a perfect solution, it has saved us
many times from releasing code that is inferior.
4.1 The test suite exists to prove that we do not break taskwarrior features
from one release to the next. While this is not a perfect solution, it has
saved us many times from releasing code that is inferior.
The first step is to modify the test suite Makefile to remove the Lua line.
This is because we do not yet have dynamic detection of the Lua library for
@@ -111,7 +112,7 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
6.1 Launch the package manager.
$ open -a /Developer/Applications/Utilies/PackageManager.app
$ open -a /Developer/Applications/Utilities/PackageManager.app
6.2 Close the 'Untitled' window that opens - we will be using a different
file. Note that PackageManager is still running - it just has no windows.
@@ -123,13 +124,13 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
<figure 1>
This is the file from the last time a package was created. It needs some
adjustments. Start by clicking on the "Task x.x.x Distribution" with a
package icon in the top left part of the window.
adjustments. Start by clicking on the "Taskwarrior x.x.x Distribution" with
a package icon in the top left part of the window.
6.4 Click on the "Configuration" button/tab.
- Change the "Title" to "Task 1.9.2"
- Change the "Description" to "Task 1.9.2 install for Snow Leopard"
- Change the "Title" to "Taskwarrior 1.9.2"
- Change the "Description" to "Taskwarrior 1.9.2 install for Snow Leopard"
<figure 2>
@@ -203,7 +204,7 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
one
- Make sure "Restart Action" is "None"
- Make sure "Require admin authentication" is checked
- Make sure "PAckage Location" is "Self-Contained"
- Make sure "Package Location" is "Self-Contained"
<figure 12>
@@ -238,8 +239,8 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
8. Test the package
8.1 Double-click on the package you just created, and install task. You
should see the README file in the UI, and the COPYING file on another
8.1 Double-click on the package you just created, and install taskwarrior.
You should see the README file in the UI, and the COPYING file on another
page. It should succeed.
<figure 14>
@@ -257,12 +258,13 @@ Note: This is being written from the OSX 10.6 perspective, and may therefore
task 1.9.2 built for darwin-ncurses
Copyright (C) 2006 - 2010 P. Beckingham, F. Hernandez.
Task may be copied only under the terms of the GNU General Public License,
which may be found in the task source kit.
Documentation for task can be found using 'man task', 'man taskrc', 'man
task-tutorial', 'man task-color', 'man task-faq' or at http://taskwarrior.org
Taskwarrior may be copied only under the terms of the GNU General Public
License, which may be found in the taskwarrior source kit.
Documentation for taskwarrior can be found using 'man task', 'man taskrc',
'man task-tutorial', 'man task-color', 'man task-faq' or at
http://taskwarrior.org
$ man task
...

View File

@@ -5,6 +5,7 @@ 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/doc/task/scripts/fish
mkdir -p local/share/doc/task/rc
mkdir -p local/share/man/man1
mkdir -p local/share/man/man5
@@ -25,6 +26,7 @@ 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 ../../scripts/fish/* local/share/doc/task/scripts/fish
cp ../../doc/rc/*.theme local/share/doc/task/rc
cp ../../doc/rc/holidays* local/share/doc/task/rc

View File

@@ -1,9 +1,9 @@
# bash completion support for task
# bash completion support for taskwarrior
#
# Copyright 2009-2010 Federico Hernandez
# All rights reserved.
#
# This script is part of the task project.
# This script is part of the taskwarrior 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
@@ -117,6 +117,32 @@ _task()
COMPREPLY=( $(compgen -W "${config}" -- ${cur}) )
return 0
;;
*)
case "${prev}" in
merge)
local servers=$(_task_get_config | grep merge | grep uri | sed 's/^merge\.\(.*\)\.uri/\1/')
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
_known_hosts_real -a "$cur"
return 0
;;
push)
local servers=$(_task_get_config | grep push | grep uri | sed 's/^push\.\(.*\)\.uri/\1/')
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
_known_hosts_real -a "$cur"
return 0
;;
pull)
local servers=$(_task_get_config | grep pull | grep uri | sed 's/^pull\.\(.*\)\.uri/\1/')
COMPREPLY=( $(compgen -W "${servers}" -- ${cur}) )
_known_hosts_real -a "$cur"
return 0
;;
import)
COMPREPLY=( $(compgen -o "default" -- ${cur}) )
return 0
;;
esac
;;
esac
;;
esac

138
scripts/fish/task.fish Normal file
View File

@@ -0,0 +1,138 @@
# Taskwarrior <http://taskwarrior.org> tab completions for the Fish shell
# <http://fishshell.org>.
#
# Copy this script to ~/.config/fish/completions/task.fish, open a new shell,
# and enjoy.
#
# Objects completed:
# * Commands
# * Projects
# * Priorities
# * Tags
# * Attribute names and modifiers
#
# License:
# Copyright 2009 Mick Koch <kchmck@gmail.com>
#
# This script is free software. It comes without any warranty, to the extent
# permitted by applicable law. You can redistribute it and/or modify it under
# the terms of the Do What The Fuck You Want To Public License, Version 2, as
# published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
# details.
function __fish.task.bare
test (count (commandline -c -o)) -eq 1
end
function __fish.task.complete
complete -c task -u $argv
end
function __fish.task.head
task _ids
task _commands
end
function __fish.task.attrs
echo project
echo priority
echo due
echo recur
echo until
echo limit
echo wait
echo rc
end
function __fish.task.mods
echo before
echo after
echo over
echo under
echo none
echo is
echo isnt
echo has
echo hasnt
echo startswith
echo endswith
echo word
echo noword
end
function __fish.task.combos
echo $argv[1]:$argv[2]
for mod in (__fish.task.mods)
echo $argv[1].$mod:$argv[2]
end
end
function __fish.task.combos.simple
__fish.task.combos $argv ""
end
function __fish.task.projects
__fish.task.combos.simple project
for project in (task _projects)
__fish.task.combos project $project
end
end
function __fish.task.priorities
__fish.task.combos.simple priority
for priority in H M L
__fish.task.combos priority $priority
end
end
function __fish.task.rc
echo rc:
for value in (task _config)
echo rc.$value:
end
end
function __fish.task.tags
for tag in (task _tags)
echo +$tag
echo -$tag
end
end
function __fish.task.match
__fish.task.attrs | grep \^(echo $argv | sed -E "s/(\w+).+/\1/")
end
function __fish.task.attr
for attr in (__fish.task.match $argv)
switch $attr
case project
__fish.task.projects
case priority
__fish.task.priorities
case rc
__fish.task.rc
case "*"
__fish.task.combos.simple $attr
end
end
end
function __fish.task.body
set token (commandline -ct)
if test -n $token
__fish.task.attr $token
else
__fish.task.attrs
end
__fish.task.tags
end
__fish.task.complete -f -n __fish.task.bare -a "(__fish.task.head)"
__fish.task.complete -f -n "not __fish.task.bare" -a "(__fish.task.body)"

View File

@@ -1,5 +1,5 @@
Configure VIM for Syntax Highlighting of Task Data
Configure VIM for Syntax Highlighting of Taskwarrior Data
The task data files (pending.data, completed.data and undo.data),
@@ -24,12 +24,12 @@ You may prefer instead to read the help online at:
http://vimdoc.sourceforge.net/htmldoc/syntax.html#syntax
Configuring VIM to Understand Task Data
Configuring VIM to Understand Taskwarrior 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:
types properly, configuring it for use with taskwarrior is simple. You simply
need to copy some files that came with taskwarrior into your home directory so
that you have:
~/.vim/ftdetect/task.vim
~/.vim/syntax/taskdata.vim

View File

@@ -1,4 +1,4 @@
" Vim support file to detect Task Warrior data and configuration files and
" Vim support file to detect Taskwarrior data and configuration files and
" single task edits
"
" Maintainer: John Florian <jflorian@doubledog.org>
@@ -10,13 +10,13 @@
" For the full text of this license, see COPYING.
" Task Warrior data files
" Taskwarrior data files
au BufRead,BufNewFile {pending,completed,undo}.data set filetype=taskdata
" Task Warrior configuration file
" Taskwarrior configuration file
au BufRead,BufNewFile .taskrc set filetype=taskrc
" Task Warrior handling of 'task 42 edit'
" Taskwarrior handling of 'task 42 edit'
au BufRead,BufNewFile *.task set filetype=taskedit
" vim:noexpandtab

View File

@@ -1,5 +1,5 @@
" Vim syntax file
" Language: task data
" Language: taskwarrior data
" Maintainer: John Florian <jflorian@doubledog.org>
" Updated: Wed Jul 8 19:46:20 EDT 2009
"

View File

@@ -1,5 +1,5 @@
" Vim syntax file
" Language: support for editing task configuration file
" Language: support for editing taskwarrior configuration file
" Maintainer: John Florian <jflorian@doubledog.org>
" Updated: Sat Feb 20 14:14:44 EST 2010
"

View File

@@ -1,17 +1,17 @@
#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.
# of taskwarrior. We welcome any zsh user that wants to contribute to
# taskwarrior 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 taskwarrior.
#
# zsh completion for task
# zsh completion for taskwarrior
#
# Copyright 2009 P.C. Shyamshankar
# All rights reserved.
#
# This script is part of the task project.
# This script is part of the taskwarrior 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

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// Task Lua API
// Taskwarrior Lua API
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -47,8 +47,8 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream> // TODO Remove
#include <algorithm>
#include <iostream>
#include "Context.h"
#include "API.h"
@@ -58,7 +58,8 @@ Task* the_task = NULL;
#ifdef HAVE_LIBLUA
////////////////////////////////////////////////////////////////////////////////
// Returns a string representing the task version number, such as '1.9.0'.
// Returns a string representing the taskwarrior version number, such as
// '1.9.0'.
static int api_task_version (lua_State* L)
{
lua_pushstring (L, PACKAGE_VERSION);
@@ -223,7 +224,8 @@ static int api_task_debug_message (lua_State* L)
static int api_task_exit (lua_State* L)
{
// TODO Is this the correct exception? How does the shell handle this?
throw std::string ("Exiting.");
std::cout << "Exiting." << std::endl;
exit (0);
return 0;
}
@@ -612,14 +614,14 @@ bool API::callProgramHook (
// Make call.
if (lua_pcall (L, 0, 2, 0) != 0)
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1);
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";
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";
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);
@@ -684,17 +686,17 @@ bool API::callTaskHook (
// Make call.
if (lua_pcall (L, 1, 2, 0) != 0)
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1);
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";
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";
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);
@@ -737,17 +739,17 @@ bool API::callFieldHook (
// Make call.
if (lua_pcall (L, 2, 3, 0) != 0)
throw std::string ("Error calling '") + function + "' - " + lua_tostring (L, -1);
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";
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";
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";
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);

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -25,6 +25,7 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include <sstream>
#include <stdlib.h>
#include <string.h>
@@ -50,6 +51,7 @@ static const char* internalNames[] =
"limit",
"status",
"description",
"tags",
// Note that annotations are not listed.
};
@@ -63,6 +65,7 @@ static const char* modifiableNames[] =
"recur",
"until",
"wait",
"depends",
};
// Synonyms on the same line.
@@ -252,10 +255,11 @@ bool Att::validNameValue (
{
std::string error = "Ambiguous attribute '" + name + "' - could be either of "; // TODO i18n
std::sort (matches.begin (), matches.end ());
std::string combined;
join (combined, ", ", matches);
throw error + combined;
throw error + combined + ".";
}
name = matches[0];
@@ -271,17 +275,18 @@ bool Att::validNameValue (
autoComplete (mod, candidates, matches);
if (matches.size () == 0)
throw std::string ("Unrecognized modifier '") + mod + "'";
throw std::string ("Unrecognized modifier '") + mod + "'.";
else if (matches.size () != 1)
{
std::string error = "Ambiguous modifier '" + mod + "' - could be either of "; // TODO i18n
std::sort (matches.begin (), matches.end ());
std::string combined;
join (combined, ", ", matches);
error += combined;
throw error + combined;
throw error + combined + ".";
}
mod = matches[0];
@@ -334,13 +339,45 @@ bool Att::validNameValue (
// modify 'value' here accordingly.
}
// Dates can now be either a date, or a duration that is added as an offset
// to the current date.
else if (name == "due" ||
name == "until" ||
name == "wait")
{
// Validate and convert to epoch.
if (value != "")
value = Date (value, context.config.get ("dateformat")).toEpochString ();
{
// Try parsing as a duration. If unsuccessful, try again, as a date.
try
{
Date now;
Duration dur (value);
if (dur.negative ())
value = (now - (time_t)dur).toEpochString ();
else
value = (now + (time_t)dur).toEpochString ();
}
// If the date parsing failed, try parsing as a duration. If successful,
// add the duration to the current date. If unsuccessful, propagate the
// original date parse error.
// Try parsing as a date. If unsuccessfull, throw.
catch (...)
{
try
{
value = Date (value, context.config.get ("dateformat")).toEpochString ();
}
catch (std::string& e)
{
throw e;
}
}
}
}
else if (name == "recur")
@@ -378,7 +415,7 @@ bool Att::validNameValue (
"\" is not a valid status. Use 'pending', 'completed', 'deleted', 'recurring' or 'waiting'.";
}
else if (! validInternalName (name) &&
else if (! validInternalName (name) &&
! validModifiableName (name))
throw std::string ("'") + name + "' is not a recognized attribute.";
@@ -401,11 +438,11 @@ bool Att::validMod (const std::string& mod)
std::string Att::type (const std::string& name) const
{
if (name == "due" ||
name == "wait" ||
name == "until" ||
name == "start" ||
name == "entry" ||
name == "end" ||
name == "wait")
name == "end")
return "date";
else if (name == "recur")
@@ -466,10 +503,10 @@ void Att::parse (Nibbler& n)
if (validMod (mod))
mMod = mod;
else
throw std::string ("The name '") + mod + "' is not a valid modifier"; // TODO i18n
throw std::string ("The name '") + mod + "' is not a valid modifier."; // TODO i18n
}
else
throw std::string ("Missing . or : after modifier"); // TODO i18n
throw std::string ("Missing . or : after modifier."); // TODO i18n
}
if (n.skip (':'))
@@ -483,10 +520,10 @@ void Att::parse (Nibbler& n)
}
}
else
throw std::string ("Missing : after attribute name"); // TODO i18n
throw std::string ("Missing : after attribute name."); // TODO i18n
}
else
throw std::string ("Missing : after attribute name"); // TODO i18n
throw std::string ("Missing : after attribute name."); // TODO i18n
/* TODO This might be too slow to include. Test this assumption.
validNameValue (mName, mMod, mValue);
@@ -505,16 +542,17 @@ bool Att::match (const Att& other) const
if (mMod == "")
{
// Exact matches on dates should only compare m/d/y, not h:m:s. This allows
// Comapisons like "task list due:today" (bug #405).
// comparisons like "task list due:today" (bug #405).
std::string which = type (mName);
if (which == "date")
{
if (other.mValue == "")
return false;
Date left (mValue);
Date right (other.mValue);
if (left.year () != right.year () ||
left.month () != right.month () ||
left.day () != right.day ())
if (! left.sameDay (right))
return false;
}
else
@@ -718,7 +756,7 @@ std::string Att::composeF4 () const
void Att::mod (const std::string& input)
{
if (input != "" && !validMod (input))
throw std::string ("The name '") + input + "' is not a valid modifier"; // TODO i18n
throw std::string ("The name '") + input + "' is not a valid modifier."; // TODO i18n
mMod = input;
}

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, 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
@@ -26,12 +26,12 @@
////////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include "Cmd.h"
#include "Context.h"
#include "util.h"
#include "text.h"
#include "i18n.h"
#include "main.h"
#include <Cmd.h>
#include <Context.h>
#include <util.h>
#include <text.h>
#include <i18n.h>
#include <main.h>
extern Context context;
@@ -55,45 +55,67 @@ Cmd::~Cmd ()
////////////////////////////////////////////////////////////////////////////////
// Determines whether the string represents a unique command name or custom
// report name.
//
// To be a valid command:
// 1. 'input' should autocomplete to one of 'commands'.
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;
autoComplete (lowerCase (input), commands, matches);
if (matches.size () == 1)
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
// Determines whether the string represents a valid custom report name.
//
// To be a valid custom command:
// 1. 'input' should autocomplete to one of 'commands'.
// 2. the result, canonicalized, should autocomplete to one of
// 'customreports'.
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;
autoComplete (lowerCase (input), commands, matches);
if (matches.size () == 1)
{
std::string canonical = context.canonicalize (matches[0]);
matches.clear ();
autoComplete (canonical, customReports, matches);
if (matches.size () == 1)
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
// To be a valid custom command:
// 1. 'input' should autocomplete to one of 'commands'.
// 2. the result may then canonicalize to another command.
void Cmd::parse (const std::string& input)
{
load ();
std::string candidate = lowerCase (context.canonicalize (input));
std::vector <std::string> matches;
autoComplete (candidate, commands, matches);
autoComplete (input, commands, matches);
if (1 == matches.size ())
command = matches[0];
command = context.canonicalize (matches[0]);
else if (0 == matches.size ())
command = "";
else
{
std::string error = "Ambiguous command '" + candidate + "' - could be either of "; // TODO i18n
std::string error = "Ambiguous command '" + input + "' - could be either of "; // TODO i18n
std::sort (matches.begin (), matches.end ());
std::string combined;
join (combined, ", ", matches);
throw error + combined;
@@ -112,44 +134,49 @@ void Cmd::load ()
commands.push_back ("_ids");
commands.push_back ("_config");
commands.push_back ("_version");
commands.push_back ("_merge");
commands.push_back ("_urgency");
commands.push_back ("export.csv");
commands.push_back ("export.ical");
commands.push_back ("export.yaml");
commands.push_back ("history.monthly");
commands.push_back ("history.annual");
commands.push_back ("ghistory.monthly");
commands.push_back ("ghistory.annual");
// Commands whose names are localized.
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_DENOTATE, "denotate"));
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_SHOW, "show"));
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_HELP, "help"));
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_LOG, "log"));
commands.push_back (context.stringtable.get (CMD_PREPEND, "prepend"));
commands.push_back (context.stringtable.get (CMD_PROJECTS, "projects"));
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_DENOTATE, "denotate"));
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_SHOW, "show"));
commands.push_back (context.stringtable.get (CMD_DELETE, "delete"));
commands.push_back (context.stringtable.get (CMD_DIAGNOSTICS, "diagnostics"));
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_HELP, "help"));
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_LOG, "log"));
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"));
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"));
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"));
commands.push_back (context.stringtable.get (CMD_MERGE, "merge"));
commands.push_back (context.stringtable.get (CMD_PUSH, "push"));
commands.push_back (context.stringtable.get (CMD_PULL, "pull"));
// Now load the custom reports.
std::vector <std::string> all;
@@ -177,6 +204,10 @@ void Cmd::load ()
}
}
}
// Now load the aliases.
foreach (i, context.aliases)
commands.push_back (i->first);
}
}
@@ -199,31 +230,35 @@ void Cmd::allCommands (std::vector <std::string>& all) const
// 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 == "export.csv" ||
command == "export.ical" ||
command == "history.monthly" ||
command == "history.annual" ||
command == "ghistory.monthly" ||
command == "ghistory.annual" ||
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_SHOW, "show") ||
command == context.stringtable.get (CMD_HELP, "help") ||
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") ||
if (command == "_projects" ||
command == "_tags" ||
command == "_commands" ||
command == "_ids" ||
command == "_config" ||
command == "_version" ||
command == "_urgency" ||
command == "export.csv" ||
command == "export.ical" ||
command == "export.yaml" ||
command == "history.monthly" ||
command == "history.annual" ||
command == "ghistory.monthly" ||
command == "ghistory.annual" ||
command == context.stringtable.get (CMD_CALENDAR, "calendar") ||
command == context.stringtable.get (CMD_COLORS, "colors") ||
command == context.stringtable.get (CMD_DIAGNOSTICS, "diagnostics") ||
command == context.stringtable.get (CMD_CONFIG, "config") ||
command == context.stringtable.get (CMD_SHOW, "show") ||
command == context.stringtable.get (CMD_HELP, "help") ||
command == context.stringtable.get (CMD_INFO, "info") ||
command == context.stringtable.get (CMD_PROJECTS, "projects") ||
command == context.stringtable.get (CMD_PUSH, "push") ||
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;
@@ -234,7 +269,7 @@ bool Cmd::isReadOnlyCommand ()
// Commands that directly modify the data files.
bool Cmd::isWriteCommand ()
{
if (command == "_merge" ||
if (command == context.stringtable.get (CMD_MERGE, "merge") ||
command == context.stringtable.get (CMD_ADD, "add") ||
command == context.stringtable.get (CMD_APPEND, "append") ||
command == context.stringtable.get (CMD_ANNOTATE, "annotate") ||
@@ -246,6 +281,7 @@ bool Cmd::isWriteCommand ()
command == context.stringtable.get (CMD_IMPORT, "import") ||
command == context.stringtable.get (CMD_LOG, "log") ||
command == context.stringtable.get (CMD_PREPEND, "prepend") ||
command == context.stringtable.get (CMD_PULL, "pull") ||
command == context.stringtable.get (CMD_START, "start") ||
command == context.stringtable.get (CMD_STOP, "stop") ||
command == context.stringtable.get (CMD_UNDO, "undo"))

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, 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

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -127,15 +127,18 @@ Color::Color (const std::string& spec)
// X where X is one of black, red, blue ...
else if ((index = find (word)) != -1)
{
if (bg)
if (index)
{
bg_value |= _COLOR_HASBG;
bg_value |= index << 8;
}
else
{
fg_value |= _COLOR_HASFG;
fg_value |= index;
if (bg)
{
bg_value |= _COLOR_HASBG;
bg_value |= index << 8;
}
else
{
fg_value |= _COLOR_HASFG;
fg_value |= index;
}
}
}
@@ -349,24 +352,26 @@ void Color::blend (const Color& other)
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)
else
{
value |= _COLOR_HASFG; // There is now a color.
value &= ~_COLOR_FG; // Remove previous color.
value |= (c.value & _COLOR_FG); // Apply other color.
}
// Upgrade either color, if necessary.
if (!(value & _COLOR_256)) upgrade ();
if (!(c.value & _COLOR_256)) c.upgrade ();
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.
// 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.
}
}
}

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

102
src/Column.cpp Normal file
View File

@@ -0,0 +1,102 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// 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 <Column.h>
extern Context context;
////////////////////////////////////////////////////////////////////////////////
static Column* Column::factory (const std::string& name)
{
if (name == "description") return new ColumnDescription ();
throw std::string ("Unrecognized column type '") + name + "'";
return NULL;
}
////////////////////////////////////////////////////////////////////////////////
Column::Column ()
: _name ("")
, _minimum (0)
, _maximum (0)
, _wrap (false)
, _just (left)
, _sizing (minimal)
{
}
////////////////////////////////////////////////////////////////////////////////
Column::Column (const Column& other)
{
_name = other._name;
_minimum = other._minimum;
_maximum = other._maximum;
_wrap = other._wrap;
_just = other._just;
_sizing = other._sizing;
}
////////////////////////////////////////////////////////////////////////////////
Column& Column::operator= (const Column& other)
{
if (this != &other)
{
_name = other._name;
_minimum = other._minimum;
_maximum = other._maximum;
_wrap = other._wrap;
_just = other._just;
_sizing = other._sizing;
}
return *this;
}
////////////////////////////////////////////////////////////////////////////////
bool Column::operator== (const Column& other) const
{
return _name == other._name &&
_minimum == other._minimum &&
_maximum == other._maximum &&
_wrap == other._wrap &&
_just == other._just &&
_sizing == other._sizing;
}
////////////////////////////////////////////////////////////////////////////////
Column::~Column ()
{
}
////////////////////////////////////////////////////////////////////////////////
void Column::setName (const std::string& name)
{
_name = name;
}
////////////////////////////////////////////////////////////////////////////////

66
src/Column.h Normal file
View File

@@ -0,0 +1,66 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// 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_COLUMN
#define INCLUDED_COLUMN
#include <string>
class Column
{
public:
enum just {right = 0, left, center};
enum sizing {minimal = 0, fixed, proportional, maximal};
static Column* factory (const std::string&);
Column ();
Column (const Column&);
Column& operator= (const Column&);
bool operator== (const Column&) const; // TODO Is this necessary?
~Column ();
void setName (const std::string&);
std::string render (Task*, int, int, const std::string style = "default");
std::string type () const;
private:
std::string _name;
int _minimum;
int _maximum;
bool _wrap;
just _just;
sizing _sizing;
};
class ColumnDescription : public Column
{
public:
private:
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -46,160 +46,208 @@
// 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"
"# Taskwarrior 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"
"# #variable=foo -- By commenting out the line, or deleting it, this uses the default\n"
"\n"
"# Use the command 'task show' to see all defaults and overrides\n"
"\n"
"# Files\n"
"data.location=~/.task\n"
"locking=on # Use file-level locking\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"
"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"
"recurrence.limit=1 # Number of future recurring pending tasks\n"
"undo.style=side # Undo style - can be 'side', or 'diff'\n"
"verbose=yes # Provide extra feedback\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"
"recurrence.limit=1 # Number of future recurring pending tasks\n"
"undo.style=side # Undo style - can be 'side', or 'diff'\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 reports\n"
"dateformat.annotation=m/d/Y # Preferred display date format for reports\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"
"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 reports\n"
"dateformat.annotation=m/d/Y # Preferred display date format for annotations\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"
"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"
"# Journal controls\n"
"journal.time=no # Record start/stop commands as annotation\n"
"journal.time.start.annotation=Started task # Annotation description for the start journal entry\n"
"journal.time.stop.annotation=Stopped task # Annotation description for the stop journal entry\n"
"\n"
"# Dependency controls\n"
"dependency.reminder=on # Nags on dependency chain violations\n"
"dependency.confirmation=on # Should dependency chain repair be confirmed?\n"
"\n"
"# Urgency Coefficients\n"
"urgency.next.coefficient=10.0 # Urgency coefficients for 'next' special tag\n"
"urgency.blocking.coefficient=9.0 # Urgency coefficients for blocking tasks\n"
"urgency.blocked.coefficient=8.0 # Urgency coefficients for blocked tasks\n"
"urgency.due.coefficient=7.0 # Urgency coefficients for due dates\n"
"urgency.priority.coefficient=6.0 # Urgency coefficients for priorities\n"
"urgency.waiting.coefficient=5.0 # Urgency coefficients for waiting status\n"
"urgency.active.coefficient=4.0 # Urgency coefficients for active tasks\n"
"urgency.project.coefficient=3.0 # Urgency coefficients for projects\n"
"urgency.tags.coefficient=2.0 # Urgency coefficients for tags\n"
"urgency.annotations.coefficient=1.0 # Urgency coefficients for annotations\n"
"\n"
"#urgency.user.project.foo.coefficient=5.0 # Urgency coefficients for 'foo' project\n"
"#urgency.user.tag.foo.coefficient=5.0 # Urgency coefficients for 'foo' tag\n"
"\n"
"# Color controls.\n"
"color=on # Enable color\n"
"color=on # Enable color\n"
#ifdef LINUX
"color.header=color3 # Color of header messages\n"
"color.footnote=color3 # Color of footnote messages\n"
"color.debug=color3 # Color of diagnostic output\n"
"color.header=color3 # Color of header messages\n"
"color.footnote=color3 # Color of footnote messages\n"
"color.debug=color3 # Color of diagnostic output\n"
"color.alternate=on color233 # Alternate color for line coloring\n"
"\n"
"color.summary.bar=on rgb141 # Color of summary report progress bar\n"
"color.summary.background=on color0 # Color of summary report background\n"
"color.summary.bar=on rgb141 # Color of summary report progress bar\n"
"color.summary.background=on color0 # Color of summary report background\n"
"\n"
"color.history.add=color0 on rgb500 # Color of added tasks in ghistory report\n"
"color.history.done=color0 on rgb050 # Color of completed tasks in ghistory report\n"
"color.history.delete=color0 on rgb550 # Color of deleted tasks in ghistory report\n"
"color.history.add=color0 on rgb500 # Color of added tasks in ghistory report\n"
"color.history.done=color0 on rgb050 # Color of completed tasks in ghistory report\n"
"color.history.delete=color0 on rgb550 # Color of deleted tasks in ghistory report\n"
"\n"
"color.undo.before=color1 # Color of values before a change\n"
"color.undo.after=color2 # Color of values after a change\n"
"color.sync.added=rgb005 # Color of added tasks in sync output\n"
"color.sync.changed=rgb550 # Color of changed tasks in sync output\n"
"color.sync.rejected=rgb500 # Color of rejected tasks in sync output\n"
"\n"
"color.undo.before=color1 # Color of values before a change\n"
"color.undo.after=color2 # Color of values after a change\n"
"\n"
"color.calendar.today=color15 on rgb013 # Color of today in calendar\n"
"color.calendar.due=color0 on color1 # Color of days with due tasks in calendar\n"
"color.calendar.due.today=color15 on color1 # Color of today with due tasks in calendar\n"
"color.calendar.overdue=color0 on color9 # Color of days with overdue tasks in calendar\n"
"color.calendar.weekend=color235 # Color of weekend days in calendar\n"
"color.calendar.holiday=color0 on color11 # Color of public holidays in calendar\n"
"color.calendar.weeknumber=rgb013 # Color of the weeknumbers in calendar\n"
"color.calendar.due=color0 on color1 # Color of days with due tasks in calendar\n"
"color.calendar.due.today=color15 on color1 # Color of today with due tasks in calendar\n"
"color.calendar.overdue=color0 on color9 # Color of days with overdue tasks in calendar\n"
"color.calendar.weekend=color235 # Color of weekend days in calendar\n"
"color.calendar.holiday=color0 on color11 # Color of public holidays in calendar\n"
"color.calendar.weeknumber=rgb013 # Color of the weeknumbers in calendar\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=rgb013 # [1] Color of recur.any: tasks\n"
"color.overdue=color9 # [2] Color of overdue tasks\n"
"color.due.today=rgb400 # [3] Color of tasks due today\n"
"color.due=color1 # [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=rgb555 on rgb410 # [8] Color of active tasks\n"
"color.pri.none= # [9] Color of priority: tasks\n"
"color.pri.H=rgb255 # [9] Color of priority:H tasks\n"
"color.pri.M=rgb250 # [9] Color of priority:M tasks\n"
"color.pri.L=rgb245 # [9] Color of priority:L tasks\n"
"color.tagged=rgb031 # [10] Color of tagged tasks\n"
"color.alternate=on color233 # [11] Alternate color for line coloring\n"
"# Here are the color rules.\n"
"color.recurring=rgb013 # Color of recur.any: tasks\n"
"color.overdue=color9 # Color of overdue tasks\n"
"color.due.today=rgb400 # Color of tasks due today\n"
"color.due=color1 # Color of due tasks\n"
"#color.keyword.car=on blue # Color of description.contains:car tasks\n"
"#color.project.garden=on green # Color of project:garden tasks\n"
"#color.project.none= # Color of tasks with no project\n"
"#color.tag.bug=yellow # Color of +bug tasks\n"
"#color.tag.none= # Color of tag-less tasks\n"
"color.active=rgb555 on rgb410 # Color of active tasks\n"
"color.pri.none= # Color of priority: tasks\n"
"color.pri.H=rgb255 # Color of priority:H tasks\n"
"color.pri.M=rgb250 # Color of priority:M tasks\n"
"color.pri.L=rgb245 # Color of priority:L tasks\n"
"color.tagged=rgb031 # Color of tagged tasks\n"
"color.blocked=white on color8 # Color of blocked tasks\n"
#else
"color.header=yellow # Color of header messages\n"
"color.footnote=yellow # Color of footnote messages\n"
"color.debug=yellow # Color of diagnostic output\n"
"color.header=yellow # Color of header messages\n"
"color.footnote=yellow # Color of footnote messages\n"
"color.debug=yellow # Color of diagnostic output\n"
"color.alternate= # Alternate color for line coloring\n"
"\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.summary.bar=on green # Color of summary report progress bar\n"
"color.summary.background=on black # Color of summary report background\n"
"\n"
"color.history.add=black on red # Color of added tasks in ghistory report\n"
"color.history.done=black on green # Color of completed tasks in ghistory report\n"
"color.history.delete=black on yellow # Color of deleted tasks in ghistory report\n"
"color.history.add=black on red # Color of added tasks in ghistory report\n"
"color.history.done=black on green # Color of completed tasks in ghistory report\n"
"color.history.delete=black on yellow # Color of deleted tasks in ghistory report\n"
"\n"
"color.undo.before=red # Color of values before a change\n"
"color.undo.after=green # Color of values after a change\n"
"color.sync.added=green # Color of added tasks in sync output\n"
"color.sync.changed=yellow # Color of changed tasks in sync output\n"
"color.sync.rejected=red # Color of rejected tasks in sync output\n"
"\n"
"color.undo.before=red # Color of values before a change\n"
"color.undo.after=green # Color of values after a change\n"
"\n"
"color.calendar.today=bold white on bright blue # Color of today in calendar\n"
"color.calendar.due=white on red # Color of days with due tasks in calendar\n"
"color.calendar.due.today=bold white on red # Color of today with due tasks in calendar\n"
"color.calendar.overdue=black on bright red # Color of days with overdue tasks in calendar\n"
"color.calendar.weekend=white on bright 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=bold blue # Color of the weeknumbers in calendar\n"
"color.calendar.due=white on red # Color of days with due tasks in calendar\n"
"color.calendar.due.today=bold white on red # Color of today with due tasks in calendar\n"
"color.calendar.overdue=black on bright red # Color of days with overdue tasks in calendar\n"
"color.calendar.weekend=white on bright 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=bold blue # Color of the weeknumbers in calendar\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=magenta # [1] Color of recur.any: tasks\n"
"color.overdue=bold red # [2] Color of overdue tasks\n"
"color.due.today=red # [3] Color of tasks due today\n"
"color.due=red # [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=black on bright green # [8] Color of active tasks\n"
"color.pri.none= # [9] Color of priority: tasks\n"
"color.pri.H=bold white # [9] Color of priority:H tasks\n"
"color.pri.M=white # [9] Color of priority:M tasks\n"
"color.pri.L= # [9] Color of priority:L tasks\n"
"color.tagged=green # [10] Color of tagged tasks\n"
"color.alternate= # [11] Alternate color for line coloring\n"
"# Here are the color rules.\n"
"color.recurring=magenta # Color of recur.any: tasks\n"
"color.overdue=bold red # Color of overdue tasks\n"
"color.due.today=red # Color of tasks due today\n"
"color.due=red # Color of due tasks\n"
"#color.keyword.car=on blue # Color of description.contains:car tasks\n"
"#color.project.garden=on green # Color of project:garden tasks\n"
"#color.project.none= # Color of tasks with no project\n"
"#color.tag.bug=yellow # Color of +bug tasks\n"
"#color.tag.none= # Color of tag-less tasks\n"
"color.active=black on bright green # Color of active tasks\n"
"color.pri.none= # Color of priority: tasks\n"
"color.pri.H=bold white # Color of priority:H tasks\n"
"color.pri.M=white # Color of priority:M tasks\n"
"color.pri.L= # Color of priority:L tasks\n"
"color.tagged=green # Color of tagged tasks\n"
"color.blocked=black on white # Color of blocked tasks\n"
#endif
"\n"
"# Here is the rule precedence order, highest to lowest.\n"
"# Note that these are just the color rule names, without the leading 'color.'\n"
"# and any trailing '.value'.\n"
"rule.precedence.color=due.today,active,blocked,overdue,due,keyword,project,tag,recurring,pri,tagged\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"
"#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"
"#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"
"complete.all.tags=no # Include old tag names in '_ags' command\n"
"list.all.projects=no # Include old project names in 'projects' command\n"
"list.all.tags=no # Include old tag names in 'tags' command\n"
"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"
"_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"
"complete.all.tags=no # Include old tag names in '_ags' command\n"
"list.all.projects=no # Include old project names in 'projects' command\n"
"list.all.tags=no # Include old tag names in 'tags' command\n"
"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"
"\n"
"# Merge options\n"
"#\n"
"# WARNING: Please read the documentation (man task-sync) before proceeding with these\n"
"# synchronization features. Improperly used, data can be lost!\n"
"merge.autopush=ask # Push database to remote origin after merge: yes, no, ask\n"
"#merge.default.uri=user@host.xz:.task/ # URI for merge\n"
"#pull.default.uri=rsync://host.xz/task-backup/ # URI for pull\n"
"\n"
"# Import heuristics - alternate names for fields (comma-separated list of names)\n"
"#import.synonym.bg=?\n"
"#import.synonym.description=?\n"
@@ -217,19 +265,19 @@ std::string Config::defaults =
"#import.synonym.uuid=?\n"
"\n"
"# Export Controls\n"
"export.ical.class=PRIVATE # Could be PUBLIC, PRIVATE or CONFIDENTIAL\n"
"export.ical.class=PRIVATE # Could be PUBLIC, PRIVATE or CONFIDENTIAL\n"
"\n"
"# Aliases - alternate names for commands\n"
"alias.rm=delete # Alias for the delete command\n"
"alias.history=history.monthly # Prefer monthly over annual history reports\n"
"alias.ghistory=ghistory.monthly # Prefer monthly graphical over annual history reports\n"
"alias.export=export.csv # Prefer CSV over iCal export\n"
"alias.export.vcalendar=export.ical # They are the same\n"
"alias.rm=delete # Alias for the delete command\n"
"alias.history=history.monthly # Prefer monthly over annual history reports\n"
"alias.ghistory=ghistory.monthly # Prefer monthly graphical over annual history reports\n"
"alias.export=export.yaml # Prefer YAML over CSV or iCal export\n"
"alias.export.vcalendar=export.ical # They are the same\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
"# Fields: id, uuid, project, priority, priority_long, entry, start, end,\n"
"# due, countdown, countdown_compact, age, age_compact, active, tags,\n"
"# depends, description_only, description, recur, recurrence_indicator,\n"
"# tag_indicator, wait.\n"
"# Description: This report is ...\n"
"# Sort: due+,priority-,project+\n"
"# Filter: pro:x pri:H +bug limit:10\n"
@@ -237,8 +285,8 @@ std::string Config::defaults =
"\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.columns=id,project,priority,entry,start,due,recur,countdown,age,depends,tags,description\n"
"report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Countdown,Age,Deps,Tags,Description\n"
"report.long.sort=due+,priority-,project+\n"
"report.long.filter=status:pending\n"
"#report.long.dateformat=m/d/Y\n"
@@ -294,7 +342,7 @@ std::string Config::defaults =
"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-,active-,project+\n"
"report.overdue.filter=status:pending due.before:today\n"
"report.overdue.filter=status:pending due.before:now\n"
"#report.overdue.dateformat=m/d/Y\n"
"#report.overdue.annotations=full\n"
"\n"
@@ -336,9 +384,10 @@ std::string Config::defaults =
"\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-,active-,project+\n"
"report.all.columns=id,project,priority,due,end,active,age,description\n"
"report.all.labels=ID,Project,Pri,Due,Completed,Active,Age,Description\n"
"report.all.sort=project+,due+,end+,priority-,active-,description+\n"
"report.all.filter=status.not:deleted\n"
"#report.all.dateformat=m/d/Y\n"
"#report.all.annotations=full\n"
"\n"
@@ -347,9 +396,25 @@ std::string Config::defaults =
"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-,active-,project+\n"
"report.next.filter=status:pending limit:page\n"
"report.next.filter=status:pending limit:page depends.none:\n"
"#report.next.dateformat=m/d/Y\n"
"#report.next.annotations=full\n"
"\n"
"# task blocked\n"
"report.blocked.description=Lists all blocked tasks matching the specified criteria\n"
"report.blocked.columns=id,depends,project,priority,due,active,age,description\n"
"report.blocked.labels=ID,Deps,Project,Pri,Due,Active,Age,Description\n"
"report.blocked.sort=due+,priority-,active-,project+\n"
"report.blocked.filter=status:pending depends.any:\n"
"#report.blocked.dateformat=m/d/Y\n"
"\n"
"# task unblocked\n"
"report.unblocked.description=Lists all unblocked tasks matching the specified criteria\n"
"report.unblocked.columns=id,depends,project,priority,due,active,age,description\n"
"report.unblocked.labels=ID,Deps,Project,Pri,Due,Active,Age,Description\n"
"report.unblocked.sort=due+,priority-,active-,project+\n"
"report.unblocked.filter=status:pending depends.none:\n"
"#report.unblocked.dateformat=m/d/Y\n"
"\n";
////////////////////////////////////////////////////////////////////////////////
@@ -361,6 +426,7 @@ std::string Config::defaults =
//
// In all real use cases, Config::load is called.
Config::Config ()
: original_file ()
{
}
@@ -444,13 +510,13 @@ void Config::parse (const std::string& input, int nest /* = 1 */)
if (included.readable ())
this->load (included, nest + 1);
else
throw std::string ("Could not read include file '") + included.data + "'";
throw std::string ("Could not read include file '") + included.data + "'.";
}
else
throw std::string ("Can only include files with absolute paths, not '") + included.data + "'";
}
else
throw std::string ("Malformed entry '") + line + "'";
throw std::string ("Malformed entry '") + line + "'.";
}
}
}
@@ -468,15 +534,25 @@ void Config::createDefaultRC (const std::string& rc, const std::string& data)
contents << "# [Created by "
<< PACKAGE_STRING
<< " "
<< now.toStringWithTime ()
<< now.toString ("m/d/Y H:N:S")
<< "]\n"
<< defaults.substr (0, loc + 14)
<< data
<< defaults.substr (loc + 21);
<< "\n\n# Color theme (uncomment one to use)\n"
<< "#include /usr/local/share/doc/task/rc/light-16.theme\n"
<< "#include /usr/local/share/doc/task/rc/light-256.theme\n"
<< "#include /usr/local/share/doc/task/rc/dark-16.theme\n"
<< "#include /usr/local/share/doc/task/rc/dark-256.theme\n"
<< "#include /usr/local/share/doc/task/rc/dark-red-256.theme\n"
<< "#include /usr/local/share/doc/task/rc/dark-green-256.theme\n"
<< "#include /usr/local/share/doc/task/rc/dark-blue-256.theme\n"
<< "#include /usr/local/share/doc/task/rc/dark-violets-256.theme\n"
<< "#include /usr/local/share/doc/task/rc/dark-yellow-green.theme\n"
<< "\n";
// Write out the new file.
if (! File::write (rc, contents.str ()))
throw std::string ("Could not write to '") + rc + "'";
throw std::string ("Could not write to '") + rc + "'.";
}
////////////////////////////////////////////////////////////////////////////////
@@ -578,7 +654,6 @@ void Config::all (std::vector<std::string>& items)
////////////////////////////////////////////////////////////////////////////////
std::string Config::checkForDeprecatedColor ()
{
int count = 0;
std::vector <std::string> deprecated;
foreach (i, *this)
{
@@ -586,24 +661,53 @@ std::string Config::checkForDeprecatedColor ()
{
std::string value = get (i->first);
if (value.find ("_") != std::string::npos)
{
++count;
deprecated.push_back (i->first);
}
}
}
std::stringstream out;
if (count)
if (deprecated.size ())
{
out << "Your .taskrc file contains color settings that use deprecated "
<< "underscores. Please check:"
<< std::endl;
<< "underscores. Please check:\n";
foreach (i, deprecated)
out << " " << *i << "=" << get (*i) << std::endl;
out << " " << *i << "=" << get (*i) << "\n";
out << std::endl;
out << "\n";
}
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
std::string Config::checkForDeprecatedColumns ()
{
std::vector <std::string> deprecated;
foreach (i, *this)
{
if (i->first.find ("report") == 0)
{
std::string value = get (i->first);
if (value.find ("entry_time") != std::string::npos ||
value.find ("start_time") != std::string::npos ||
value.find ("end_time") != std::string::npos)
deprecated.push_back (i->first);
}
}
std::stringstream out;
out << "\n";
if (deprecated.size ())
{
out << "Your .taskrc file contains reports with deprecated columns. "
<< "Please check for entry_time, start_time or end_time in:\n";
foreach (i, deprecated)
out << " " << *i << "\n";
out << "\n";
}
return out.str ();

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -60,6 +60,7 @@ public:
void all (std::vector <std::string>&);
std::string checkForDeprecatedColor ();
std::string checkForDeprecatedColumns ();
public:
File original_file;

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, 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
@@ -125,8 +125,6 @@ void Context::initialize ()
if (locale != "")
stringtable.load (location.data + "/strings." + locale);
// TODO Handle "--version, -v" right here?
// init TDB.
tdb.clear ();
std::vector <std::string> all;
@@ -163,18 +161,19 @@ int Context::run ()
if (config.getBoolean ("debug"))
foreach (d, debugMessages)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeDebug (*d) << std::endl;
std::cout << colorizeDebug (*d) << "\n";
else
std::cout << *d << std::endl;
std::cout << *d << "\n";
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;
if (config.getBoolean ("verbose"))
foreach (h, headers)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeHeader (*h) << "\n";
else
std::cout << *h << "\n";
hooks.trigger ("post-header");
// Dump the report output.
@@ -184,11 +183,12 @@ int Context::run ()
// 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;
if (config.getBoolean ("verbose"))
foreach (f, footnotes)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeFootnote (*f) << "\n";
else
std::cout << *f << "\n";
hooks.trigger ("post-footnote");
hooks.trigger ("pre-exit");
@@ -233,6 +233,7 @@ int Context::dispatch (std::string &out)
else if (cmd.command == "stop") { rc = handleStop (out); }
else if (cmd.command == "export.csv") { rc = handleExportCSV (out); }
else if (cmd.command == "export.ical") { rc = handleExportiCal (out); }
else if (cmd.command == "export.yaml") { rc = handleExportYAML (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); }
@@ -240,19 +241,24 @@ int Context::dispatch (std::string &out)
else if (cmd.command == "shell") { handleShell ( ); }
#endif
else if (cmd.command == "undo") { handleUndo ( ); }
else if (cmd.command == "_merge") { handleMerge (out); }
else if (cmd.command == "merge") { tdb.gc ();
handleMerge (out); }
else if (cmd.command == "push") { handlePush (out); }
else if (cmd.command == "pull") { handlePull (out); }
else if (cmd.command == "diagnostics") { handleDiagnostics (out); }
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 == "_urgency") { rc = handleUrgency (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); }
// Commands that display IDs and therefore need TDB::gc first.
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");
@@ -320,7 +326,7 @@ void Context::shadow ()
// Optionally display a notification that the shadow file was updated.
if (config.getBoolean ("shadow.notify"))
footnote (std::string ("[Shadow file '") + shadowFile.data + "' updated]");
footnote (std::string ("[Shadow file '") + shadowFile.data + "' updated.]");
inShadow = false;
}
@@ -368,6 +374,45 @@ void Context::disallowModification () const
+ "' command does not allow further modification of a task.";
}
////////////////////////////////////////////////////////////////////////////////
// Takes a vector of args (foo, rc.name:value, bar), extracts any rc.name:value
// args and sets the name/value in context.config, returning only the plain args
// (foo, bar) as output.
void Context::applyOverrides (
const std::vector <std::string>& input,
std::vector <std::string>& output)
{
bool foundTerminator = false;
foreach (in, input)
{
if (*in == "--")
{
foundTerminator = true;
output.push_back (*in);
}
else if (!foundTerminator && in->substr (0, 3) == "rc.")
{
std::string name;
std::string value;
Nibbler n (*in);
if (n.getLiteral ("rc.") && // rc.
n.getUntilOneOf (":=", name) && // xxx
n.skipN (1)) // :
{
n.getUntilEOS (value); // Don't care if it's blank.
config.set (name, value);
var_overrides += " " + *in;
footnote ("Configuration override " + in->substr (3));
}
else
footnote ("Problem with override: " + *in);
}
else
output.push_back (*in);
}
}
////////////////////////////////////////////////////////////////////////////////
void Context::loadCorrectConfigFile ()
{
@@ -418,8 +463,8 @@ void Context::loadCorrectConfigFile ()
{
if (*arg == "--")
break;
else if (arg->substr (0, 17) == "rc.data.location:" ||
arg->substr (0, 17) == "rc.data.location=")
else if (arg->substr (0, 16) == "rc.data.location" &&
((*arg)[16] == ':' || (*arg)[16] == '='))
{
data = Directory (arg->substr (17));
header ("Using alternate data.location " + data.data); // TODO i18n
@@ -430,60 +475,23 @@ void Context::loadCorrectConfigFile ()
// 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
if (!confirm ("A configuration file could not be found in " // TODO i18n
+ home
+ "\n\n"
+ "Would you like a sample "
+ rc.data
+ " created, so taskwarrior can proceed?"))
throw std::string ("Cannot proceed without rc file.");
config.createDefaultRC (rc, data);
}
// 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".
// Apply rc overrides.
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);
}
applyOverrides (args, filtered);
args = filtered;
}
@@ -592,6 +600,18 @@ void Context::parse (
tagRemovals.push_back (arg->substr (1));
}
// Substitution of description and/or annotation text.
else if (parseSubst.valid (*arg))
{
if (foundSequence)
foundSomethingAfterSequence = true;
foundNonSequence = true;
debug ("parse subst '" + *arg + "'");
parseSubst.parse (*arg);
}
// Atributes - name[.mod]:[value]
else if (attribute.valid (*arg))
{
@@ -638,18 +658,6 @@ void Context::parse (
}
}
// Substitution of description and/or annotation text.
else if (parseSubst.valid (*arg))
{
if (foundSequence)
foundSomethingAfterSequence = true;
foundNonSequence = 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))
@@ -749,7 +757,7 @@ void Context::parse (
else
throw stringtable.get (
CMD_MISSING,
"You must specify a command, or a task ID to modify");
"You must specify a command, or a task ID to modify.");
}
// If the command "task 123" is entered, but with no modifier arguments,
@@ -757,7 +765,7 @@ void Context::parse (
else if (!foundNonSequence &&
(parseTask.id != 0 || parseSequence.size () != 0))
{
std::cout << "No command - assuming 'info'." << std::endl;
std::cout << "No command - assuming 'info'.\n";
parseCmd.command = "info";
}
}
@@ -833,11 +841,8 @@ void Context::autoFilter (Att& a, Filter& f)
{
}
// The mechanism for filtering on tags is +/-<tag>.
// Do not handle here - see below.
else if (a.name () == "tags")
{
}
// Note: Tags are handled via the +/-<tag> syntax, but also via attribute
// modifiers.
// Generic attribute matching.
else

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -68,6 +68,7 @@ public:
std::string canonicalize (const std::string&) const;
void disallowModification () const;
void applyOverrides (const std::vector <std::string>&, std::vector <std::string>&);
private:
void loadCorrectConfigFile ();

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// All rights reserved.
@@ -24,7 +24,6 @@
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <iomanip>
#include <sstream>
#include <time.h>
@@ -82,7 +81,7 @@ Date::Date (const int m, const int d, const int y,
}
////////////////////////////////////////////////////////////////////////////////
Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
Date::Date (const std::string& input, const std::string& format /* = "m/d/Y" */)
{
int month = 0;
int day = 0;
@@ -92,105 +91,109 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
int second = 0;
// Perhaps it is an epoch date, in string form?
if (isEpoch (mdy))
if (isEpoch (input))
return;
// Before parsing according to "format", perhaps this is a relative date?
if (isRelativeDate (mdy))
if (isRelativeDate (input))
return;
unsigned int i = 0; // Index into mdy.
unsigned int i = 0; // Index into input.
// Format may include: mMdDyYVaAbBhHNS
//
// Note that the format should never include T or Z, as that interferes with
// the potential parsing for ISO dates constructed from the above format.
for (unsigned int f = 0; f < format.length (); ++f)
{
switch (format[f])
{
// Single or double digit.
case 'm':
if (i >= mdy.length () ||
! isdigit (mdy[i]))
if (i >= input.length () ||
! isdigit (input[i]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (m).";
throw std::string ("\"") + input + "\" 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 < input.length () &&
(input[i + 0] == '0' || input[i + 0] == '1') &&
isdigit (input[i + 1]))
{
month = atoi (mdy.substr (i, 2).c_str ());
month = atoi (input.substr (i, 2).c_str ());
i += 2;
}
else
{
month = atoi (mdy.substr (i, 1).c_str ());
month = atoi (input.substr (i, 1).c_str ());
++i;
}
break;
case 'd':
if (i >= mdy.length () ||
! isdigit (mdy[i]))
if (i >= input.length () ||
! isdigit (input[i]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (d).";
throw std::string ("\"") + input + "\" 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]))
if (i + 1 < input.length () &&
(input[i + 0] == '0' || input[i + 0] == '1' || input[i + 0] == '2' || input[i + 0] == '3') &&
isdigit (input[i + 1]))
{
day = atoi (mdy.substr (i, 2).c_str ());
day = atoi (input.substr (i, 2).c_str ());
i += 2;
}
else
{
day = atoi (mdy.substr (i, 1).c_str ());
day = atoi (input.substr (i, 1).c_str ());
++i;
}
break;
// Double digit.
case 'y':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
if (i + 1 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (y).";
throw std::string ("\"") + input + "\" is not a valid date (y).";
}
year = atoi (mdy.substr (i, 2).c_str ()) + 2000;
year = atoi (input.substr (i, 2).c_str ()) + 2000;
i += 2;
break;
case 'M':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
if (i + 1 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (M).";
throw std::string ("\"") + input + "\" is not a valid date (M).";
}
month = atoi (mdy.substr (i, 2).c_str ());
month = atoi (input.substr (i, 2).c_str ());
i += 2;
break;
case 'D':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
if (i + 1 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (D).";
throw std::string ("\"") + input + "\" is not a valid date (D).";
}
day = atoi (mdy.substr (i, 2).c_str ());
day = atoi (input.substr (i, 2).c_str ());
i += 2;
break;
case 'V':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
if (i + 1 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (V).";
throw std::string ("\"") + input + "\" is not a valid date (V).";
}
i += 2;
@@ -198,134 +201,134 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
// Quadruple digit.
case 'Y':
if (i + 3 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]) ||
! isdigit (mdy[i + 2]) ||
! isdigit (mdy[i + 3]))
if (i + 3 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]) ||
! isdigit (input[i + 2]) ||
! isdigit (input[i + 3]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (Y).";
throw std::string ("\"") + input + "\" is not a valid date (Y).";
}
year = atoi (mdy.substr (i, 4).c_str ());
year = atoi (input.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]))
if (i + 2 >= input.length () ||
isdigit (input[i + 0]) ||
isdigit (input[i + 1]) ||
isdigit (input[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (a).";
throw std::string ("\"") + input + "\" 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]))
if (i + 2 >= input.length () ||
isdigit (input[i + 0]) ||
isdigit (input[i + 1]) ||
isdigit (input[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (b).";
throw std::string ("\"") + input + "\" is not a valid date (b).";
}
month = Date::monthOfYear (mdy.substr (i, 3).c_str());
month = Date::monthOfYear (input.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]))
if (i + 2 >= input.length () ||
isdigit (input[i + 0]) ||
isdigit (input[i + 1]) ||
isdigit (input[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (A).";
throw std::string ("\"") + input + "\" is not a valid date (A).";
}
i += Date::dayName( Date::dayOfWeek (mdy.substr (i, 3).c_str()) ).size();
i += Date::dayName( Date::dayOfWeek (input.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]))
if (i + 2 >= input.length () ||
isdigit (input[i + 0]) ||
isdigit (input[i + 1]) ||
isdigit (input[i + 2]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (B).";
throw std::string ("\"") + input + "\" is not a valid date (B).";
}
month = Date::monthOfYear (mdy.substr (i, 3).c_str());
month = Date::monthOfYear (input.substr (i, 3).c_str());
i += Date::monthName(month).size();
break;
// Single or double digit.
case 'h':
if (i >= mdy.length () ||
! isdigit (mdy[i]))
if (i >= input.length () ||
! isdigit (input[i]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (h).";
throw std::string ("\"") + input + "\" 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]))
if (i + 1 < input.length () &&
(input[i + 0] == '0' || input[i + 0] == '1' || input[i + 0] == '2') &&
isdigit (input[i + 1]))
{
hour = atoi (mdy.substr (i, 2).c_str ());
hour = atoi (input.substr (i, 2).c_str ());
i += 2;
}
else
{
hour = atoi (mdy.substr (i, 1).c_str ());
hour = atoi (input.substr (i, 1).c_str ());
++i;
}
break;
case 'H':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
if (i + 1 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (H).";
throw std::string ("\"") + input + "\" is not a valid date (H).";
}
hour = atoi (mdy.substr (i, 2).c_str ());
hour = atoi (input.substr (i, 2).c_str ());
i += 2;
break;
case 'N':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
if (i + 1 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (N).";
throw std::string ("\"") + input + "\" is not a valid date (N).";
}
minute = atoi (mdy.substr (i, 2).c_str ());
minute = atoi (input.substr (i, 2).c_str ());
i += 2;
break;
case 'S':
if (i + 1 >= mdy.length () ||
! isdigit (mdy[i + 0]) ||
! isdigit (mdy[i + 1]))
if (i + 1 >= input.length () ||
! isdigit (input[i + 0]) ||
! isdigit (input[i + 1]))
{
throw std::string ("\"") + mdy + "\" is not a valid date (S).";
throw std::string ("\"") + input + "\" is not a valid date (S).";
}
second = atoi (mdy.substr (i, 2).c_str ());
second = atoi (input.substr (i, 2).c_str ());
i += 2;
break;
default:
if (i >= mdy.length () ||
mdy[i] != format[f])
if (i >= input.length () ||
input[i] != format[f])
{
throw std::string ("\"") + mdy + "\" is not a valid date (DEFAULT).";
throw std::string ("\"") + input + "\" is not a valid date (DEFAULT).";
}
++i;
break;
@@ -340,11 +343,11 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
year = default_year->tm_year + 1900;
}
if (i < mdy.length ())
throw std::string ("\"") + mdy + "\" is not a valid date in " + format + " format.";
if (i < input.length ())
throw std::string ("\"") + input + "\" is not a valid date in " + format + " format.";
if (!valid (month, day, year))
throw std::string ("\"") + mdy + "\" is not a valid date (VALID).";
throw std::string ("\"") + input + "\" is not a valid date (VALID).";
// Convert to epoch.
struct tm t = {0};
@@ -457,19 +460,6 @@ 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)
{
@@ -817,6 +807,12 @@ bool Date::sameYear (const Date& rhs)
return false;
}
////////////////////////////////////////////////////////////////////////////////
Date Date::operator- (const int delta)
{
return Date (mT - delta);
}
////////////////////////////////////////////////////////////////////////////////
Date Date::operator+ (const int delta)
{
@@ -846,8 +842,9 @@ time_t Date::operator- (const Date& rhs)
////////////////////////////////////////////////////////////////////////////////
bool Date::isEpoch (const std::string& input)
{
if (digitsOnly (input) &&
input.length () > 8)
if (digitsOnly (input) &&
input.length () > 8 &&
input.length () <= 10 )
{
mT = (time_t) atoi (input.c_str ());
return true;
@@ -871,6 +868,7 @@ bool Date::isEpoch (const std::string& input)
// eow (end of week)
// eom (end of month)
// eoy (end of year)
// now
bool Date::isRelativeDate (const std::string& input)
{
std::string in (lowerCase (input));
@@ -888,8 +886,15 @@ bool Date::isRelativeDate (const std::string& input)
supported.push_back ("tomorrow");
supported.push_back ("yesterday");
supported.push_back ("eow");
supported.push_back ("eoww");
supported.push_back ("eocw");
supported.push_back ("eom");
supported.push_back ("eoy");
supported.push_back ("sow");
supported.push_back ("soww");
supported.push_back ("socw");
supported.push_back ("som");
supported.push_back ("soy");
supported.push_back ("goodfriday");
supported.push_back ("easter");
supported.push_back ("eastermonday");
@@ -897,6 +902,7 @@ bool Date::isRelativeDate (const std::string& input)
supported.push_back ("pentecost");
supported.push_back ("midsommar");
supported.push_back ("midsommarafton");
supported.push_back ("now");
std::vector <std::string> matches;
if (autoComplete (in, supported, matches) == 1)
@@ -906,11 +912,25 @@ bool Date::isRelativeDate (const std::string& input)
// If day name.
int dow;
if ((dow = Date::dayOfWeek (found)) != -1 ||
found == "eow")
found == "eow" ||
found == "eoww" ||
found == "eocw" ||
found == "sow" ||
found == "soww" ||
found == "socw")
{
if (found == "eow")
if (found == "eow" || found == "eoww")
dow = 5;
if (found == "eocw")
dow = (Date::dayOfWeek (context.config.get ("weekstart")) + 6) % 7;
if (found == "sow" || found == "soww")
dow = 1;
if (found == "socw")
dow = Date::dayOfWeek (context.config.get ("weekstart"));
if (today.dayOfWeek () >= dow)
today += (dow - today.dayOfWeek () + 7) * 86400;
else
@@ -961,6 +981,25 @@ bool Date::isRelativeDate (const std::string& input)
mT = then.mT;
return true;
}
else if (found == "som")
{
int m = today.month () + 1;
int y = today.year ();
if (m > 12)
{
m -=12;
y++;
}
Date then (m, 1, y);
mT = then.mT;
return true;
}
else if (found == "soy")
{
Date then (1, 1, today.year () + 1);
mT = then.mT;
return true;
}
else if (found == "goodfriday")
{
Date then (Date::easter(today.year()));
@@ -1015,6 +1054,11 @@ bool Date::isRelativeDate (const std::string& input)
}
}
}
else if (found == "now")
{
mT = time (NULL);
return true;
}
}
// Support "21st" to indicate the next date that is the 21st day.

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// All rights reserved.
@@ -50,7 +50,6 @@ public:
std::string toISO ();
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);
@@ -86,6 +85,7 @@ public:
bool sameYear (const Date&);
Date operator+ (const int);
Date operator- (const int);
Date& operator+= (const int);
Date& operator-= (const int);

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2009, Paul Beckingham.
// All rights reserved.

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -35,6 +35,59 @@
#include "util.h"
#include "Duration.h"
static const char* durations[] =
{
"annual",
"biannual",
"bimonthly",
"biweekly",
"biyearly",
"daily",
"days",
"day",
"d",
"fortnight",
"hours",
"hrs",
"h",
"minutes",
"mins",
"min",
"m",
"mnths",
"monthly",
"months",
"month",
"mos",
"mo",
"mths",
"quarterly",
"quarters",
"qrtrs",
"qtrs",
"q",
"seconds",
"secs",
"sec",
"s",
"semiannual",
"sennight",
"weekdays",
"weekly",
"weeks",
"wks",
"w",
"yearly",
"years",
"yrs",
"y",
"-",
};
#define NUM_DURATIONS (sizeof (durations) / sizeof (durations[0]))
////////////////////////////////////////////////////////////////////////////////
Duration::Duration ()
: mSecs (0)
@@ -42,6 +95,13 @@ Duration::Duration ()
{
}
////////////////////////////////////////////////////////////////////////////////
Duration::Duration (const Duration& other)
{
mSecs = other.mSecs;
mNegative = other.mNegative;
}
////////////////////////////////////////////////////////////////////////////////
Duration::Duration (time_t input)
{
@@ -59,6 +119,8 @@ Duration::Duration (time_t input)
////////////////////////////////////////////////////////////////////////////////
Duration::Duration (const std::string& input)
: mSecs (0)
, mNegative (false)
{
parse (input);
}
@@ -73,7 +135,7 @@ Duration::operator time_t ()
Duration::operator std::string ()
{
std::stringstream s;
s << (mNegative ? -mSecs : mSecs);
s << (mNegative ? - (long) mSecs : (long) mSecs);
return s.str ();
}
@@ -168,80 +230,39 @@ Duration::~Duration ()
{
}
////////////////////////////////////////////////////////////////////////////////
bool Duration::negative () const
{
return mNegative;
}
////////////////////////////////////////////////////////////////////////////////
bool Duration::valid (const std::string& input) const
{
std::string lower_input = lowerCase (input);
// Assume the ordinal is 1, but look for an integer, just in case.
int value = 1;
Nibbler n (lower_input);
n.skipAll (' ');
n.getInt (value);
n.skipAll (' ');
if (value < 0)
value = -value;
std::string units;
n.getUntilEOS (units);
// Auto complete against all supported durations.
std::vector <std::string> supported;
supported.push_back ("daily"); // TODO i18n
supported.push_back ("day"); // TODO i18n
supported.push_back ("weekly"); // TODO i18n
supported.push_back ("weekdays"); // TODO i18n
supported.push_back ("sennight"); // TODO i18n
supported.push_back ("biweekly"); // TODO i18n
supported.push_back ("fortnight"); // TODO i18n
supported.push_back ("monthly"); // TODO i18n
supported.push_back ("bimonthly"); // TODO i18n
supported.push_back ("quarterly"); // TODO i18n
supported.push_back ("biannual"); // TODO i18n
supported.push_back ("biyearly"); // TODO i18n
supported.push_back ("annual"); // TODO i18n
supported.push_back ("semiannual"); // TODO i18n
supported.push_back ("yearly"); // TODO i18n
for (unsigned int i = 0; i < NUM_DURATIONS; ++i)
supported.push_back (durations[i]);
std::vector <std::string> matches;
if (autoComplete (lower_input, supported, matches) == 1)
if (autoComplete (units, supported, matches) == 1)
return true;
// Support \s+ -? \d+ \s? s|secs?|m|mins?|h|hrs?|d|days?|wks?|mo|mths?|y|yrs?|-
// Note: Does not support a sign character. That must be external to
// Duration.
Nibbler n (lower_input);
int value;
n.skipAll (' ');
n.skip ('-');
if (n.getUnsignedInt (value))
{
n.skipAll (' ');
if (n.getLiteral ("yrs") && n.depleted ()) return true;
else if (n.getLiteral ("yr") && n.depleted ()) return true;
else if (n.getLiteral ("y") && n.depleted ()) return true;
else if (n.getLiteral ("qtrs") && n.depleted ()) return true;
else if (n.getLiteral ("qtr") && n.depleted ()) return true;
else if (n.getLiteral ("q") && n.depleted ()) return true;
else if (n.getLiteral ("mths") && n.depleted ()) return true;
else if (n.getLiteral ("mth") && n.depleted ()) return true;
else if (n.getLiteral ("mo") && n.depleted ()) return true;
else if (n.getLiteral ("wks") && n.depleted ()) return true;
else if (n.getLiteral ("wk") && n.depleted ()) return true;
else if (n.getLiteral ("w") && n.depleted ()) return true;
else if (n.getLiteral ("days") && n.depleted ()) return true;
else if (n.getLiteral ("day") && n.depleted ()) return true;
else if (n.getLiteral ("d") && n.depleted ()) return true;
else if (n.getLiteral ("hrs") && n.depleted ()) return true;
else if (n.getLiteral ("hr") && n.depleted ()) return true;
else if (n.getLiteral ("h") && n.depleted ()) return true;
else if (n.getLiteral ("mins") && n.depleted ()) return true;
else if (n.getLiteral ("min") && n.depleted ()) return true;
else if (n.getLiteral ("m") && n.depleted ()) return true;
else if (n.getLiteral ("secs") && n.depleted ()) return true;
else if (n.getLiteral ("sec") && n.depleted ()) return true;
else if (n.getLiteral ("s") && n.depleted ()) return true;
else if (n.getLiteral ("-") && n.depleted ()) return true;
}
return false;
}
@@ -250,95 +271,98 @@ void Duration::parse (const std::string& input)
{
std::string lower_input = lowerCase (input);
std::vector <std::string> supported;
supported.push_back ("daily"); // TODO i18n
supported.push_back ("day"); // TODO i18n
supported.push_back ("weekly"); // TODO i18n
supported.push_back ("weekdays"); // TODO i18n
supported.push_back ("sennight"); // TODO i18n
supported.push_back ("biweekly"); // TODO i18n
supported.push_back ("fortnight"); // TODO i18n
supported.push_back ("monthly"); // TODO i18n
supported.push_back ("bimonthly"); // TODO i18n
supported.push_back ("quarterly"); // TODO i18n
supported.push_back ("biannual"); // TODO i18n
supported.push_back ("biyearly"); // TODO i18n
supported.push_back ("annual"); // TODO i18n
supported.push_back ("semiannual"); // TODO i18n
supported.push_back ("yearly"); // TODO i18n
// Assume the ordinal is 1, but look for an integer, just in case.
int value = 1;
Nibbler n (lower_input);
n.skipAll (' ');
n.getInt (value);
std::vector <std::string> matches;
if (autoComplete (lower_input, supported, matches) == 1)
n.skipAll (' ');
if (value < 0)
{
std::string found = matches[0];
if (found == "daily" || found == "day") mSecs = 86400 * 1; // TODO i18n
else if (found == "weekdays") mSecs = 86400 * 1; // TODO i18n
else if (found == "weekly" || found == "sennight") mSecs = 86400 * 7; // TODO i18n
else if (found == "biweekly" || found == "fortnight") mSecs = 86400 * 14; // TODO i18n
else if (found == "monthly") mSecs = 86400 * 30; // TODO i18n
else if (found == "bimonthly") mSecs = 86400 * 61; // TODO i18n
else if (found == "quarterly") mSecs = 86400 * 91; // TODO i18n
else if (found == "semiannual") mSecs = 86400 * 183; // TODO i18n
else if (found == "yearly" || found == "annual") mSecs = 86400 * 365; // TODO i18n
else if (found == "biannual" || found == "biyearly") mSecs = 86400 * 730; // TODO i18n
mNegative = true;
value = -value;
}
// Support -? \d+ \s? s|secs?|m|mins?|h|hrs?|d|days?|wks?|mo|mths?|y|yrs?|-
// Note: Does not support a sign character. That must be external to
// Duration.
else
{
Nibbler n (lower_input);
n.skipAll (' ');
mNegative = false;
if (n.skip ('-'))
mNegative = true;
int value;
if (n.getUnsignedInt (value))
{
n.skipAll (' ');
std::string units;
n.getUntilEOS (units);
if (n.getLiteral ("yrs") && n.depleted ()) mSecs = value * 86400 * 365;
else if (n.getLiteral ("yr") && n.depleted ()) mSecs = value * 86400 * 365;
else if (n.getLiteral ("y") && n.depleted ()) mSecs = value * 86400 * 365;
// Auto complete against all supported durations.
std::vector <std::string> supported;
for (unsigned int i = 0; i < NUM_DURATIONS; ++i)
supported.push_back (durations[i]);
else if (n.getLiteral ("qtrs") && n.depleted ()) mSecs = value * 86400 * 91;
else if (n.getLiteral ("qtr") && n.depleted ()) mSecs = value * 86400 * 91;
else if (n.getLiteral ("q") && n.depleted ()) mSecs = value * 86400 * 91;
mSecs = 0;
std::vector <std::string> matches;
if (autoComplete (units, supported, matches) == 1)
{
std::string match = matches[0];
else if (n.getLiteral ("mths") && n.depleted ()) mSecs = value * 86400 * 30;
else if (n.getLiteral ("mth") && n.depleted ()) mSecs = value * 86400 * 30;
else if (n.getLiteral ("mo") && n.depleted ()) mSecs = value * 86400 * 30;
if (match == "biannual") mSecs = value * 86400 * 730;
else if (match == "biyearly") mSecs = value * 86400 * 730;
else if (n.getLiteral ("wks") && n.depleted ()) mSecs = value * 86400 * 7;
else if (n.getLiteral ("wk") && n.depleted ()) mSecs = value * 86400 * 7;
else if (n.getLiteral ("w") && n.depleted ()) mSecs = value * 86400 * 7;
else if (match == "yearly") mSecs = value * 86400 * 365;
else if (match == "annual") mSecs = value * 86400 * 365;
else if (match == "years") mSecs = value * 86400 * 365;
else if (match == "yrs") mSecs = value * 86400 * 365;
else if (match == "y") mSecs = value * 86400 * 365;
else if (match == "yearly") mSecs = value * 86400 * 365;
else if (match == "annual") mSecs = value * 86400 * 365;
else if (n.getLiteral ("days") && n.depleted ()) mSecs = value * 86400;
else if (n.getLiteral ("day") && n.depleted ()) mSecs = value * 86400;
else if (n.getLiteral ("d") && n.depleted ()) mSecs = value * 86400;
else if (match == "semiannual") mSecs = value * 86400 * 183;
else if (n.getLiteral ("hrs") && n.depleted ()) mSecs = value * 3600;
else if (n.getLiteral ("hr") && n.depleted ()) mSecs = value * 3600;
else if (n.getLiteral ("h") && n.depleted ()) mSecs = value * 3600;
else if (match == "bimonthly") mSecs = value * 86400 * 61;
else if (match == "quarterly") mSecs = value * 86400 * 91;
else if (match == "quarters") mSecs = value * 86400 * 91;
else if (match == "qrtrs") mSecs = value * 86400 * 91;
else if (match == "qtrs") mSecs = value * 86400 * 91;
else if (match == "q") mSecs = value * 86400 * 91;
else if (n.getLiteral ("mins") && n.depleted ()) mSecs = value * 60;
else if (n.getLiteral ("min") && n.depleted ()) mSecs = value * 60;
else if (n.getLiteral ("m") && n.depleted ()) mSecs = value * 60;
else if (match == "monthly") mSecs = value * 86400 * 30;
else if (match == "month") mSecs = value * 86400 * 30;
else if (match == "months") mSecs = value * 86400 * 30;
else if (match == "mnths") mSecs = value * 86400 * 30;
else if (match == "mos") mSecs = value * 86400 * 30;
else if (match == "mo") mSecs = value * 86400 * 30;
else if (match == "mths") mSecs = value * 86400 * 30;
else if (n.getLiteral ("secs") && n.depleted ()) mSecs = value;
else if (n.getLiteral ("sec") && n.depleted ()) mSecs = value;
else if (n.getLiteral ("s") && n.depleted ()) mSecs = value;
else if (match == "biweekly") mSecs = value * 86400 * 14;
else if (match == "fortnight") mSecs = value * 86400 * 14;
else if (n.getLiteral ("-") && n.depleted ()) mSecs = 0;
}
else if (match == "weekly") mSecs = value * 86400 * 7;
else if (match == "sennight") mSecs = value * 86400 * 7;
else if (match == "weeks") mSecs = value * 86400 * 7;
else if (match == "wks") mSecs = value * 86400 * 7;
else if (match == "w") mSecs = value * 86400 * 7;
else if (match == "daily") mSecs = value * 86400 * 1;
else if (match == "day") mSecs = value * 86400 * 1;
else if (match == "weekdays") mSecs = value * 86400 * 1;
else if (match == "days") mSecs = value * 86400 * 1;
else if (match == "d") mSecs = value * 86400 * 1;
else if (match == "hours") mSecs = value * 3600;
else if (match == "hrs") mSecs = value * 3600;
else if (match == "h") mSecs = value * 3600;
else if (match == "minutes") mSecs = value * 60;
else if (match == "mins") mSecs = value * 60;
else if (match == "min") mSecs = value * 60;
else if (match == "m") mSecs = value * 60;
else if (match == "seconds") mSecs = value;
else if (match == "secs") mSecs = value;
else if (match == "sec") mSecs = value;
else if (match == "s") mSecs = value;
else if (match == "-") mSecs = 0;
}
if (mSecs == 0)
throw std::string ("The duration '") + input + "' was not recognized."; // TODO i18n
throw std::string ("The duration '") + input + "' was not recognized.";
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -34,7 +34,8 @@ class Duration
{
public:
Duration (); // Default constructor
Duration (time_t); // Default constructor
Duration (const Duration&); // Copy constructor
Duration (time_t); // Constructor
Duration (const std::string&); // Parse
bool operator< (const Duration&);
bool operator> (const Duration&);
@@ -47,6 +48,7 @@ public:
std::string format () const;
std::string formatCompact () const;
bool negative () const;
bool valid (const std::string&) const;
void parse (const std::string&);

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - 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
@@ -125,6 +125,16 @@ size_t File::size () const
return 0;
}
////////////////////////////////////////////////////////////////////////////////
time_t File::mtime () const
{
struct stat s;
if (!stat (data.c_str (), &s))
return s.st_mtime;
return 0;
}
////////////////////////////////////////////////////////////////////////////////
bool File::create (const std::string& name)
{

View File

@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - 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
@@ -62,6 +62,7 @@ public:
virtual mode_t mode ();
virtual size_t size () const;
virtual time_t mtime () const;
static bool create (const std::string&);
static std::string read (const std::string&);

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -132,7 +132,7 @@ void Filter::applySequence (std::vector<Task>& all, Sequence& sequence)
std::vector <int> right;
listDiff (filteredSequence, (std::vector <int>&)sequence, left, right);
if (left.size ())
throw std::string ("Sequence filtering error - please report this error to support@taskwarrior.org");
throw std::string ("Sequence filtering error - please report this error to support@taskwarrior.org.");
if (right.size ())
{
@@ -144,7 +144,7 @@ void Filter::applySequence (std::vector<Task>& all, Sequence& sequence)
foreach (r, right)
out << " " << *r;
out << " not found";
out << " not found.";
throw out.str ();
}
}

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -369,15 +369,11 @@ Grid::Cell::operator std::string () const
switch (mType)
{
case CELL_BOOL: return mBool ? "true" : "false"; // TODO i18n
case CELL_CHAR: sprintf (s, "%c", mChar);
return std::string (s);
case CELL_INT: sprintf (s, "%d", mInt);
return std::string (s);
case CELL_FLOAT: sprintf (s, "%f", mFloat);
return std::string (s);
case CELL_DOUBLE: sprintf (s, "%f", mDouble);
return std::string (s);
case CELL_STRING: return mString;
case CELL_CHAR: sprintf (s, "%c", mChar); return std::string (s);
case CELL_INT: sprintf (s, "%d", mInt); return std::string (s);
case CELL_FLOAT: sprintf (s, "%f", mFloat); return std::string (s);
case CELL_DOUBLE: sprintf (s, "%f", mDouble); return std::string (s);
case CELL_STRING: return mString;
}
return std::string ("");

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -26,6 +26,7 @@
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <algorithm>
#include "Context.h"
#include "Hooks.h"
#include "Timer.h"
@@ -72,6 +73,185 @@ Hook& Hook::operator= (const Hook& other)
////////////////////////////////////////////////////////////////////////////////
Hooks::Hooks ()
{
validProgramEvents.push_back ("post-start");
validProgramEvents.push_back ("post-commit");
validProgramEvents.push_back ("pre-fatal-error");
validProgramEvents.push_back ("pre-exit");
validProgramEvents.push_back ("pre-command-line");
validProgramEvents.push_back ("post-command-line");
validProgramEvents.push_back ("pre-command-line-override");
validProgramEvents.push_back ("post-command-line-override");
validProgramEvents.push_back ("pre-config-create");
validProgramEvents.push_back ("post-config-create");
validProgramEvents.push_back ("pre-config-read");
validProgramEvents.push_back ("post-config-read");
validProgramEvents.push_back ("pre-config-value-read");
validProgramEvents.push_back ("post-config-value-read");
validProgramEvents.push_back ("pre-config-value-write");
validProgramEvents.push_back ("post-config-value-write");
validProgramEvents.push_back ("pre-file-lock");
validProgramEvents.push_back ("post-file-lock");
validProgramEvents.push_back ("pre-file-unlock");
validProgramEvents.push_back ("post-file-unlock");
validProgramEvents.push_back ("pre-file-read");
validProgramEvents.push_back ("post-file-read");
validProgramEvents.push_back ("pre-file-write");
validProgramEvents.push_back ("post-file-write");
validProgramEvents.push_back ("pre-output");
validProgramEvents.push_back ("post-output");
validProgramEvents.push_back ("pre-debug");
validProgramEvents.push_back ("post-debug");
validProgramEvents.push_back ("pre-header");
validProgramEvents.push_back ("post-header");
validProgramEvents.push_back ("pre-footnote");
validProgramEvents.push_back ("post-footnote");
validProgramEvents.push_back ("pre-dispatch");
validProgramEvents.push_back ("post-dispatch");
validProgramEvents.push_back ("pre-gc");
validProgramEvents.push_back ("post-gc");
validProgramEvents.push_back ("pre-archive");
validProgramEvents.push_back ("post-archive");
validProgramEvents.push_back ("pre-purge");
validProgramEvents.push_back ("post-purge");
validProgramEvents.push_back ("pre-recurrence");
validProgramEvents.push_back ("post-recurrence");
validProgramEvents.push_back ("pre-interactive");
validProgramEvents.push_back ("post-interactive");
validProgramEvents.push_back ("pre-undo");
validProgramEvents.push_back ("post-undo");
validProgramEvents.push_back ("pre-confirm");
validProgramEvents.push_back ("post-confirm");
validProgramEvents.push_back ("pre-shell-prompt");
validProgramEvents.push_back ("post-shell-prompt");
validProgramEvents.push_back ("pre-add-command");
validProgramEvents.push_back ("post-add-command");
validProgramEvents.push_back ("pre-annotate-command");
validProgramEvents.push_back ("post-annotate-command");
validProgramEvents.push_back ("pre-denotate-command");
validProgramEvents.push_back ("post-denotate-command");
validProgramEvents.push_back ("pre-append-command");
validProgramEvents.push_back ("post-append-command");
validProgramEvents.push_back ("pre-calendar-command");
validProgramEvents.push_back ("post-calendar-command");
validProgramEvents.push_back ("pre-color-command");
validProgramEvents.push_back ("post-color-command");
validProgramEvents.push_back ("pre-config-command");
validProgramEvents.push_back ("post-config-command");
validProgramEvents.push_back ("pre-custom-report-command");
validProgramEvents.push_back ("post-custom-report-command");
validProgramEvents.push_back ("pre-default-command");
validProgramEvents.push_back ("post-default-command");
validProgramEvents.push_back ("pre-delete-command");
validProgramEvents.push_back ("post-delete-command");
validProgramEvents.push_back ("pre-done-command");
validProgramEvents.push_back ("post-done-command");
validProgramEvents.push_back ("pre-duplicate-command");
validProgramEvents.push_back ("post-duplicate-command");
validProgramEvents.push_back ("pre-edit-command");
validProgramEvents.push_back ("post-edit-command");
validProgramEvents.push_back ("pre-export-command");
validProgramEvents.push_back ("post-export-command");
validProgramEvents.push_back ("pre-ghistory-command");
validProgramEvents.push_back ("post-ghistory-command");
validProgramEvents.push_back ("pre-history-command");
validProgramEvents.push_back ("post-history-command");
validProgramEvents.push_back ("pre-import-command");
validProgramEvents.push_back ("post-import-command");
validProgramEvents.push_back ("pre-info-command");
validProgramEvents.push_back ("post-info-command");
validProgramEvents.push_back ("pre-merge-command");
validProgramEvents.push_back ("post-merge-command");
validProgramEvents.push_back ("pre-modify-command");
validProgramEvents.push_back ("post-modify-command");
validProgramEvents.push_back ("pre-prepend-command");
validProgramEvents.push_back ("post-prepend-command");
validProgramEvents.push_back ("pre-projects-command");
validProgramEvents.push_back ("post-projects-command");
validProgramEvents.push_back ("pre-pull-command");
validProgramEvents.push_back ("post-pull-command");
validProgramEvents.push_back ("pre-push-command");
validProgramEvents.push_back ("post-push-command");
validProgramEvents.push_back ("pre-shell-command");
validProgramEvents.push_back ("post-shell-command");
validProgramEvents.push_back ("pre-start-command");
validProgramEvents.push_back ("post-start-command");
validProgramEvents.push_back ("pre-stats-command");
validProgramEvents.push_back ("post-stats-command");
validProgramEvents.push_back ("pre-stop-command");
validProgramEvents.push_back ("post-stop-command");
validProgramEvents.push_back ("pre-summary-command");
validProgramEvents.push_back ("post-summary-command");
validProgramEvents.push_back ("pre-tags-command");
validProgramEvents.push_back ("post-tags-command");
validProgramEvents.push_back ("pre-timesheet-command");
validProgramEvents.push_back ("post-timesheet-command");
validProgramEvents.push_back ("pre-undo-command");
validProgramEvents.push_back ("post-undo-command");
validProgramEvents.push_back ("pre-usage-command");
validProgramEvents.push_back ("post-usage-command");
validProgramEvents.push_back ("pre-version-command");
validProgramEvents.push_back ("post-version-command");
validListEvents.push_back ("pre-filter");
validListEvents.push_back ("post-filter");
validTaskEvents.push_back ("pre-display");
validTaskEvents.push_back ("pre-modification");
validTaskEvents.push_back ("post-modification");
validTaskEvents.push_back ("pre-delete");
validTaskEvents.push_back ("post-delete");
validTaskEvents.push_back ("pre-add");
validTaskEvents.push_back ("post-add");
validTaskEvents.push_back ("pre-undo");
validTaskEvents.push_back ("post-undo");
validTaskEvents.push_back ("pre-wait");
validTaskEvents.push_back ("post-wait");
validTaskEvents.push_back ("pre-unwait");
validTaskEvents.push_back ("post-unwait");
validTaskEvents.push_back ("pre-completed");
validTaskEvents.push_back ("post-completed");
validTaskEvents.push_back ("pre-priority-change");
validTaskEvents.push_back ("post-priority-change");
validTaskEvents.push_back ("pre-project-change");
validTaskEvents.push_back ("post-project-change");
validTaskEvents.push_back ("pre-substitution");
validTaskEvents.push_back ("post-substitution");
validTaskEvents.push_back ("pre-annotation");
validTaskEvents.push_back ("post-annotation");
validTaskEvents.push_back ("pre-tag");
validTaskEvents.push_back ("post-tag");
validTaskEvents.push_back ("pre-detag");
validTaskEvents.push_back ("post-detag");
validTaskEvents.push_back ("pre-colorization");
validTaskEvents.push_back ("post-colorization");
validFieldEvents.push_back ("format-number");
validFieldEvents.push_back ("format-date");
validFieldEvents.push_back ("format-duration");
validFieldEvents.push_back ("format-text");
validFieldEvents.push_back ("format-id");
validFieldEvents.push_back ("format-uuid");
validFieldEvents.push_back ("format-project");
validFieldEvents.push_back ("format-priority");
validFieldEvents.push_back ("format-priority_long");
validFieldEvents.push_back ("format-entry");
validFieldEvents.push_back ("format-start");
validFieldEvents.push_back ("format-end");
validFieldEvents.push_back ("format-due");
validFieldEvents.push_back ("format-countdown");
validFieldEvents.push_back ("format-countdown_compact");
validFieldEvents.push_back ("format-age");
validFieldEvents.push_back ("format-age_compact");
validFieldEvents.push_back ("format-active");
validFieldEvents.push_back ("format-tags");
validFieldEvents.push_back ("format-recur");
validFieldEvents.push_back ("format-recurrence_indicator");
validFieldEvents.push_back ("format-tag_indicator");
validFieldEvents.push_back ("format-description_only");
validFieldEvents.push_back ("format-description");
validFieldEvents.push_back ("format-wait");
validFieldEvents.push_back ("format-prompt");
validFieldEvents.push_back ("format-depends");
}
////////////////////////////////////////////////////////////////////////////////
@@ -129,13 +309,13 @@ void Hooks::initialize ()
(void) n.skip (',');
}
else
throw std::string ("Malformed hook definition '") + *it + "'";
throw std::string ("Malformed hook definition '") + *it + "'.";
}
}
}
}
else
context.debug ("Hooks::initialize - hook system shut off");
context.debug ("Hooks::initialize - hook system off");
}
////////////////////////////////////////////////////////////////////////////////
@@ -157,7 +337,7 @@ bool Hooks::trigger (const std::string& event)
return false;
}
else
throw std::string ("Unrecognized hook event '") + event + "'";
throw std::string ("Unrecognized hook event '") + event + "'.";
}
}
#endif
@@ -184,7 +364,7 @@ bool Hooks::trigger (const std::string& event, std::vector <Task>& tasks)
return false;
}
else
throw std::string ("Unrecognized hook event '") + event + "'";
throw std::string ("Unrecognized hook event '") + event + "'.";
}
}
#endif
@@ -211,7 +391,7 @@ bool Hooks::trigger (const std::string& event, Task& task)
return false;
}
else
throw std::string ("Unrecognized hook event '") + event + "'";
throw std::string ("Unrecognized hook event '") + event + "'.";
}
}
#endif
@@ -241,7 +421,7 @@ bool Hooks::trigger (
return false;
}
else
throw std::string ("Unrecognized hook event '") + event + "'";
throw std::string ("Unrecognized hook event '") + event + "'.";
}
}
#endif
@@ -252,62 +432,7 @@ bool Hooks::trigger (
////////////////////////////////////////////////////////////////////////////////
bool Hooks::validProgramEvent (const std::string& event)
{
if (event == "post-start" ||
event == "pre-fatal-error" ||
event == "pre-exit" ||
event == "pre-command-line" || event == "post-command-line" ||
event == "pre-command-line-override" || event == "post-command-line-override" ||
event == "pre-config-create" || event == "post-config-create" ||
event == "pre-config-read" || event == "post-config-read" ||
event == "pre-config-value-read" || event == "post-config-value-read" ||
event == "pre-config-value-write" || event == "post-config-value-write" ||
event == "pre-file-lock" || event == "post-file-lock" ||
event == "pre-file-unlock" || event == "post-file-unlock" ||
event == "pre-file-read" || event == "post-file-read" ||
event == "pre-file-write" || event == "post-file-write" ||
event == "pre-output" || event == "post-output" ||
event == "pre-debug" || event == "post-debug" ||
event == "pre-header" || event == "post-header" ||
event == "pre-footnote" || event == "post-footnote" ||
event == "pre-dispatch" || event == "post-dispatch" ||
event == "pre-gc" || event == "post-gc" ||
event == "pre-archive" || event == "post-archive" ||
event == "pre-purge" || event == "post-purge" ||
event == "pre-recurrence" || event == "post-recurrence" ||
event == "pre-interactive" || event == "post-interactive" ||
event == "pre-undo" || event == "post-undo" ||
event == "pre-confirm" || event == "post-confirm" ||
event == "pre-shell-prompt" || event == "post-shell-prompt" ||
event == "pre-add-command" || event == "post-add-command" ||
event == "pre-annotate-command" || event == "post-annotate-command" ||
event == "pre-denotate-command" || event == "post-denotate-command" ||
event == "pre-append-command" || event == "post-append-command" ||
event == "pre-calendar-command" || event == "post-calendar-command" ||
event == "pre-color-command" || event == "post-color-command" ||
event == "pre-config-command" || event == "post-config-command" ||
event == "pre-custom-report-command" || event == "post-custom-report-command" ||
event == "pre-default-command" || event == "post-default-command" ||
event == "pre-delete-command" || event == "post-delete-command" ||
event == "pre-done-command" || event == "post-done-command" ||
event == "pre-duplicate-command" || event == "post-duplicate-command" ||
event == "pre-edit-command" || event == "post-edit-command" ||
event == "pre-export-command" || event == "post-export-command" ||
event == "pre-ghistory-command" || event == "post-ghistory-command" ||
event == "pre-history-command" || event == "post-history-command" ||
event == "pre-import-command" || event == "post-import-command" ||
event == "pre-info-command" || event == "post-info-command" ||
event == "pre-prepend-command" || event == "post-prepend-command" ||
event == "pre-projects-command" || event == "post-projects-command" ||
event == "pre-shell-command" || event == "post-shell-command" ||
event == "pre-start-command" || event == "post-start-command" ||
event == "pre-stats-command" || event == "post-stats-command" ||
event == "pre-stop-command" || event == "post-stop-command" ||
event == "pre-summary-command" || event == "post-summary-command" ||
event == "pre-tags-command" || event == "post-tags-command" ||
event == "pre-timesheet-command" || event == "post-timesheet-command" ||
event == "pre-undo-command" || event == "post-undo-command" ||
event == "pre-usage-command" || event == "post-usage-command" ||
event == "pre-version-command" || event == "post-version-command")
if (std::find (validProgramEvents.begin (), validProgramEvents.end (), event) != validProgramEvents.end ())
return true;
return false;
@@ -315,7 +440,7 @@ bool Hooks::validProgramEvent (const std::string& event)
bool Hooks::validListEvent (const std::string& event)
{
if (event == "pre-filter" || event == "post-filter")
if (std::find (validListEvents.begin (), validListEvents.end (), event) != validListEvents.end ())
return true;
return false;
@@ -323,21 +448,7 @@ bool Hooks::validListEvent (const std::string& event)
bool Hooks::validTaskEvent (const std::string& event)
{
if (event == "pre-display" ||
event == "pre-modification" || event == "post-modification" ||
event == "pre-delete" || event == "post-delete" ||
event == "pre-add" || event == "post-add" ||
event == "pre-undo" || event == "post-undo" ||
event == "pre-wait" || event == "post-wait" ||
event == "pre-unwait" || event == "post-unwait" ||
event == "pre-completed" || event == "post-completed" ||
event == "pre-priority-change" || event == "post-priority-change" ||
event == "pre-project-change" || event == "post-project-change" ||
event == "pre-substitution" || event == "post-substitution" ||
event == "pre-annotation" || event == "post-annotation" ||
event == "pre-tag" || event == "post-tag" ||
event == "pre-detag" || event == "post-detag" ||
event == "pre-colorization" || event == "post-colorization")
if (std::find (validTaskEvents.begin (), validTaskEvents.end (), event) != validTaskEvents.end ())
return true;
return false;
@@ -345,36 +456,7 @@ bool Hooks::validTaskEvent (const std::string& event)
bool Hooks::validFieldEvent (const std::string& event)
{
if (
event == "format-number" ||
event == "format-date" ||
event == "format-duration" ||
event == "format-text" ||
event == "format-id" ||
event == "format-uuid" ||
event == "format-project" ||
event == "format-priority" ||
event == "format-priority_long" ||
event == "format-entry" ||
event == "format-entry_time" ||
event == "format-start" ||
event == "format-start_time" ||
event == "format-end" ||
event == "format-end_time" ||
event == "format-due" ||
event == "format-countdown" ||
event == "format-countdown_compact" ||
event == "format-age" ||
event == "format-age_compact" ||
event == "format-active" ||
event == "format-tags" ||
event == "format-recur" ||
event == "format-recurrence_indicator" ||
event == "format-tag_indicator" ||
event == "format-description_only" ||
event == "format-description" ||
event == "format-wait" ||
event == "format-prompt")
if (std::find (validFieldEvents.begin (), validFieldEvents.end (), event) != validFieldEvents.end ())
return true;
return false;

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.
@@ -74,6 +74,11 @@ private:
API api;
#endif
std::vector <Hook> all; // All current hooks.
std::vector <std::string> validProgramEvents;
std::vector <std::string> validListEvents;
std::vector <std::string> validTaskEvents;
std::vector <std::string> validFieldEvents;
};
#endif

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

125
src/Lisp.cpp Normal file
View File

@@ -0,0 +1,125 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// 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 "Lisp.h"
////////////////////////////////////////////////////////////////////////////////
Lisp::Lisp ()
{
}
////////////////////////////////////////////////////////////////////////////////
Lisp::~Lisp ()
{
}
////////////////////////////////////////////////////////////////////////////////
Tree* Lisp::parse (const std::string& input)
{
Tree* root = new Tree ("root");
if (root)
{
Nibbler n (input);
parseNode (root, n);
}
return root;
}
////////////////////////////////////////////////////////////////////////////////
// Grammar
// node ::= '(' list ')'
// list ::= item [[space item] ...]
// item ::= word | node
void Lisp::parseNode (Tree* parent, Nibbler& n)
{
// Work on a stack-based copy, to allow backtracking.
Nibbler attempt (n);
if (attempt.skip ('('))
{
Tree* b = new Tree ("");
parent->addBranch (b);
parseList (b, attempt);
if (attempt.skip (')'))
{
n = attempt;
return;
}
}
throw std::string ("Error: malformed node");
}
////////////////////////////////////////////////////////////////////////////////
void Lisp::parseList (Tree* parent, Nibbler& n)
{
// Work on a stack-based copy, to allow backtracking.
Nibbler attempt (n);
parseItem (parent, attempt);
while (attempt.skip (' '))
parseItem (parent, attempt);
n = attempt;
}
////////////////////////////////////////////////////////////////////////////////
void Lisp::parseItem (Tree* parent, Nibbler& n)
{
// Work on a stack-based copy, to allow backtracking.
Nibbler attempt (n);
if (attempt.next () == '(')
parseNode (parent, attempt);
else
parseWord (parent, attempt);
n = attempt;
return;
}
////////////////////////////////////////////////////////////////////////////////
// A word is any group of non-whitespace followed by a space or ')'.
void Lisp::parseWord (Tree* parent, Nibbler& n)
{
// Work on a stack-based copy, to allow backtracking.
Nibbler attempt (n);
std::string word;
if (attempt.getUntilOneOf (" )", word))
{
parent->tag (word);
n = attempt;
return;
}
throw std::string ("Error: failed to parse word");
}
////////////////////////////////////////////////////////////////////////////////

54
src/Lisp.h Normal file
View File

@@ -0,0 +1,54 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham, Federico Hernandez.
// 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_LISP
#define INCLUDED_LISP
#include <string>
#include "Tree.h"
#include "Nibbler.h"
class Lisp
{
public:
Lisp ();
Lisp (const Lisp&);
Lisp& operator= (const Lisp&);
~Lisp ();
Tree* parse (const std::string&);
private:
void parseNode (Tree*, Nibbler&);
void parseList (Tree*, Nibbler&);
void parseItem (Tree*, Nibbler&);
void parseWord (Tree*, Nibbler&);
};
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,5 +1,5 @@
////////////////////////////////////////////////////////////////////////////////
// task - a command line task list manager.
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2010, Paul Beckingham.
// All rights reserved.

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