Commit graph

2853 commits

Author SHA1 Message Date
Paul Beckingham
abcda0bcfa Expression reboot
- More integration of A3 into Context.
- Now ready for filter/modification/word extraction.
2011-07-23 17:03:44 -04:00
Paul Beckingham
4fc4e0f637 Expressions reboot
- Now handles argument captures from argv, stdin.
- Now handles rc overrides, aliases, default command.
2011-07-23 15:24:39 -04:00
Paul Beckingham
5b5978952a Expressions reboot
- Created A3.{h,cpp} which will be a simpler, lightweight version of
  Arguments.{h,cpp} that does less, but does it better.
- Created E9.{h,cpp} which will be a better implementation of
  Expression.{h,cpp} that does less, but does it better.
- Integrated A3 into Context::initialize, and Arguments and A3 will
  coexist until A3 surpasses Arguments.
2011-07-23 13:38:33 -04:00
Paul Beckingham
1164ea5cf1 Expression support
- Added Context::getColumns to return a vector of column names.
  This is to help a shift toward using the Column objects to assist
  in the parsing/validation of data entry/modifications.
- Added Column::modifiable to delegate an attributes readable/writeable
  state.  This means the columns will be in charge of their own
  mutability, which will simplify and generalize Command::modify_task.
2011-07-23 12:08:13 -04:00
Paul Beckingham
ee9199b4e0 Bug
- Fixed bug where the command line was incorrectly scanned, looking
  for 'cal', '/cal', 'calendar' or '/calendar'.
2011-07-22 00:31:54 -04:00
Paul Beckingham
197524a5fc Expression
- Added configurable 'abbreviation.minimum' (default:2) setting to
  control how auto-completion works.
2011-07-20 10:51:13 -04:00
Paul Beckingham
a6fadaee67 Expressions
- DOM lookups now canonicalize attribute names, and no longer return
  the unmodified name if the lookup yields nothing.
2011-07-19 22:34:29 -04:00
Paul Beckingham
19cb6110bd Expressions
- Removed unnecessary enquoted blank strings.
2011-07-19 00:51:42 -04:00
Paul Beckingham
09d94a0712 Expressions
- Eliminated the . prefix for DOM references to the current task - it is
  unnatural to state ".due < today".
- Prioritized parsing dates ahead of integers, which were masking all
  dates.
2011-07-19 00:25:26 -04:00
Paul Beckingham
e564827be7 Expressions
- Added recognition of individial words to the tokenize method.
2011-07-18 23:35:35 -04:00
Paul Beckingham
ab6e230f10 Expressions
- Implemented Nibbler::getWord.
- Re-implemented Nibbler::getDOM.
- Modified DOM addressed for context-based attributes from "due" to ".due",
  the help disambiguate DOM references in expressions.  There is now a
  consistency:

      <id>.due         Task-specific
          .due         Contextual
    <uuid>.due         General

- Implemented associated unit tests.
2011-07-18 23:08:05 -04:00
Paul Beckingham
dd75c1af1e Expressions
- Attribute values are now run through the expression evaluator.  This
  is good.  The evaluator fails.  This is bad, but progress has been
  made.
2011-07-17 15:33:09 -04:00
Paul Beckingham
ddbf9d374e Expressions
- Reclassified attr (name:value) and attmod (name.mod:value) values
  as "exp", to be tokenized.
2011-07-17 14:25:49 -04:00
Paul Beckingham
137b00a14a Expressions
- Commented out troublesome "distance_from_command" code.
- Commented out DOM diagnostics, for now.
- Commented out TDB2 diagnostics, for now.
- Category "seq" arguments are now assigned type "exp".
- All type "exp" arguments are now tokenized.
2011-07-17 13:52:55 -04:00
Paul Beckingham
f0a9796683 Expressions
- Any "exp" arguments are given the "exp" type (_second) as well as
  "exp" category (_third).
2011-07-17 13:02:23 -04:00
Paul Beckingham
30b5c6c048 Expression
- Implemented automatic downgrade of arguments to 'word' in the
  context of modifications.
2011-07-17 12:45:59 -04:00
Paul Beckingham
e08d840ba1 Expressions
- Broke out expression handling into two distinct flavors: filter
  and expression.  Filters need lots of preparation and mapping,
  which includes implicit 'AND' operators, expansion of syntactic
  sugar like /pattern/ etc and evaluate to a Boolean.  Expressions
  are simpler wiht less preparation, and evaluate to a Variant.
2011-07-17 12:04:38 -04:00
Paul Beckingham
d66729adf3 Code Cleanup
- Assorted minor edits.
- Snapshot before E9 work.
2011-07-16 23:58:03 -04:00
Paul Beckingham
1bec1c0934 Typo
- Fixed typo in message (thanks to Bryce Harrington).
2011-07-16 18:05:41 -04:00
Paul Beckingham
7fbe124fe0 Unit Tests
- Added proper handling for when no command or filter is specified, and
  no rc.default.command exists.
- Improved wording on above error message.
- Fixed typo in previous commit (managed to check in code before the
  build completed, and ultimately failed).
- Now reports errors that occur during initialization at the same level
  of verbosity as during command execution.
2011-07-16 15:33:09 -04:00
Paul Beckingham
8aeef40b80 Unit Tests
- variant.t.cpp was reporting 6 tests but performing none.  That
  certainly doesn't help our pass rate.
2011-07-16 14:22:42 -04:00
Paul Beckingham
2135cb141d Task Validation
- Shifted test for priority values from Att.cpp to Task.cpp.
2011-07-16 14:22:12 -04:00
Paul Beckingham
1b5648c922 Calendar Shortcut
- Added 'cal' and 'calendar' symlinks to illustrate the supported
  argv[0] values.
2011-07-16 13:20:26 -04:00
Paul Beckingham
05a53778ea Helper Command
- Implemented _columns to simply list all supported columns, in a
  machine-readable format.
2011-07-16 13:18:06 -04:00
Paul Beckingham
27a04b29f5 Feature #800
- Added feature #800, adding a new command 'columns' that lists all the columns
  available for custom reports, and includes their formatting options (thanks
  to T. Charles Yun).
2011-07-16 13:08:23 -04:00
Paul Beckingham
3a5370ddf1 Filters
- Implemented Command::filter_shortcut to detect when a filter begins
  with "status:pending" and skip the loading/parsing of completed.data.
- Removed obsolete att.t.cpp tests.
- Removed diagnostics from TDB2::TDB2 that were causing a segfault.
  I suppose there is no std::cout available during global ctors?
2011-07-14 00:46:01 -04:00
Paul Beckingham
424dc50a36 Command - install
- Temporarily removed CmdInstall from the build.  This is deferred
  until 2.1 or so, when extensions are supported.
2011-07-14 00:04:07 -04:00
Paul Beckingham
8827f9c978 TDB2
- Implemented CmdAdd.cpp and CmdLog.cpp using TDB2.
- Implemented simple append writes in TDB2.
- Modified CmdImport to accept and parse JSON.
- Added more const-ness in DOM, Expression and Task, to allow TDB2::get_tasks
  to return a const vector ref, which is a Very Good Thing.
- Corrected usage for the export command.
- Implemented Task::urgency as a call to Task::urgency_c, which is a const
  overload to allow urgency calculations (without caching) for const Task
  objects.
- Removed obolete code from TDB.
- Added lots of diagnostic output for TDB2 - it's annoying, but will be
  gone soon.
- Added mention in CmdHelp of the new <filter> and <modifications>
  syntax elements.  Needs more.
- Added Command::filter overload which uses TDB2.  Not in use yet.
2011-07-13 23:53:57 -04:00
Paul Beckingham
523c4dfcca Code Cleanup
- Eliminated obsolete or unused methods.
2011-07-12 22:19:18 -04:00
Paul Beckingham
4d410972d4 Command Usage
- Enhanced CmdHelp by adding aliases.
- Corrected usage for CmdModify.
- Renamed CmdQuery --> CmdExport.
- Added an alias _query --> export.
2011-07-12 00:51:05 -04:00
Paul Beckingham
3ef8f3f31a AUTHORS
- Added Brendan O'Flaherty for his export-html.py contribution.
2011-07-12 00:32:40 -04:00
Paul Beckingham
5b4c46fe42 TDB2
- Began serious TDB2 development by adding TDB2::dump, which shows
  all the file-related data in debug mode.
2011-07-11 23:19:21 -04:00
Paul Beckingham
f059c27bf0 Feature #607
- Added feature #607, which allows modification of a task during annotation
  (thanks to Peter De Poorter).
2011-07-11 02:10:50 -04:00
Paul Beckingham
877d8efa8e Bug #744
- Fixed bug #744, which omitted new ID feedback for all but the first
  duplicated task (thanks to Uli Martens).
2011-07-11 02:03:17 -04:00
Paul Beckingham
2bf4276bda Unit Tests
- Renamed bug.485.x to bug.485.t to reflect that it is not only
  fixed, but relevant.
2011-07-11 01:55:56 -04:00
Paul Beckingham
4522877b43 Bug #683
- Fixed bug #683, in which the 'config' command sometimes edited comments
  instead of the proper line in .taskrc (thanks to Erlan Sergaziev).
2011-07-11 01:51:14 -04:00
Paul Beckingham
523173e27e Bug #403
- Fixed bug #403, which disambiguates certain commands involving numbers.
2011-07-11 01:11:48 -04:00
Paul Beckingham
6009507209 Enhancement
- When a command is encountered on the command line, followed by an
  ID or UUID, the distance (in arguments) between the command and
  the sequence is measured in terms of arguments that are not rc: or
  rc. overrides.  It cannot exceed 1.  This helps disambiguate
  commands like 'task list Fedora 13', because the '13' is more than
  one argument away from 'list', and is therefore not an ID.
2011-07-11 00:59:11 -04:00
Paul Beckingham
21ad7a3d3f Unit Tests - add.t
- Corrected typo in unit test results.
2011-07-11 00:26:28 -04:00
Paul Beckingham
ef61981041 Commands - modify
- Re-enabled the modify command.
- Re-implemented Arguments::inject_defaults to accomodate the idea
  of the default command, the modify command without the modify
  keyword, and the automatic info command.
2011-07-10 23:41:30 -04:00
Paul Beckingham
7f84fa0c80 Bug
- The arguments // and /// were being mis-identified as patterns.
2011-07-10 18:20:46 -04:00
Paul Beckingham
8e0296468e Unit Tests
- Improved args.5.t, which was attempting to stop tasks that were
  not started.
2011-07-10 18:04:49 -04:00
Paul Beckingham
d5849b0160 Aliases
- Allowed aliases to nest up to 10 levels.
2011-07-10 17:58:07 -04:00
Paul Beckingham
2d30275889 Push/Pull/Merge
- Re-enabled the commands.
2011-07-10 14:59:30 -04:00
Paul Beckingham
254bce5dc2 I18N
- Forgot to modify a string.
2011-07-10 13:21:15 -04:00
Paul Beckingham
d33de00eac I18N
- Localized more commands.
2011-07-10 13:19:41 -04:00
Paul Beckingham
44d835947b I18N
- Localized more commands.
2011-07-10 12:54:15 -04:00
Paul Beckingham
e5139780ea I18N
- Localized more commands.
2011-07-10 11:08:40 -04:00
Paul Beckingham
ba723db9d7 Helpers
- Implemented Task::setEnd.
- Updated all code to use Task::setEntry and Task::setEnd.
2011-07-10 11:07:00 -04:00
Paul Beckingham
ad55fa2d79 Verbosity
- Implemented new verbosity token 'new-id' which controls whether
  newly generated task IDs are reported.
2011-07-10 10:08:23 -04:00