Commit graph

2515 commits

Author SHA1 Message Date
Paul Beckingham
0ecf93553c Nibbler
- Implemented Nibbler::getN, which allows for faster extraction of
  compound tokens if the length is known.
2011-07-24 14:25:53 -04:00
Paul Beckingham
10c1203c87 Expression reboot
- Implemented A3::is_subst.
2011-07-24 13:41:04 -04:00
Paul Beckingham
c39f8bd6af Expressions reboot
- Implemented A3::is_dom obsoleting Nibbler::getDOM.
- Implemented A3::is_duration.
- Implemented A3::is_pattern to replace Nibbler::getQuoted call.
- Improved A3::is_attr, A3::is_attmod.
- Obsoleted A3::is_multipart.
2011-07-24 13:33:20 -04:00
Paul Beckingham
f502ee0c52 Duration
- Implemented Duration::get_units to return the list of supported
  duration units (wk, week, weekly ...).
2011-07-24 13:15:27 -04:00
Paul Beckingham
f174caccbc DOM
- Implemented DOM::get_references to return a list of all the
  fixed-string DOM references supported.
2011-07-24 13:11:49 -04:00
Paul Beckingham
bfe5edd35d Nibbler
- Improved ::getDOM while it waits to be obsoleted.
2011-07-24 12:58:00 -04:00
Paul Beckingham
a4eb390a04 Duration
- The "annual" and "yearly" options were listed twice.
2011-07-24 12:57:10 -04:00
Paul Beckingham
b55f47ec9a Expression reboot
- Implemented A3::is_modifier which canonicalized modifiers.
- Implemtned A3::is_attmod.
2011-07-24 10:57:30 -04:00
Paul Beckingham
94dfc68cca Expression reboot
- A3::tokenize recognizes strings, patterns, attr, ops, dates.
- A3::tokenize canonicalizes attributes.
2011-07-24 01:06:26 -04:00
Paul Beckingham
3fd83ca400 Nibbler
- Implemented Nibbler::getName to parse an alpha-numeric name.
- Added appropriate unit tests.
2011-07-24 01:00:24 -04:00
Paul Beckingham
91225d808f Expression reboot
- A3 now tracks whether a command is read-only, and builds filters accordingly.
- Implemented extract_filter, extract_modfications and extract_words stubs.
- Removed all E9 implementation details - this is going to be written from
  scratch.
2011-07-23 23:39:11 -04:00
Paul Beckingham
c344c07579 Diagnostics
- Removing render timing info to ViewText::render.  It's not useful.
2011-07-23 23:13:19 -04:00
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