From ec155683f0b74bae20de5f2b9eaac6ba98e388ce Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 13 Mar 2016 14:44:47 -0400 Subject: [PATCH] Docs: Added configuration details --- doc/examples.txt | 29 +++++++++++++++++++++++++++-- doc/rules.txt | 25 +++++++++++++++++-------- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/doc/examples.txt b/doc/examples.txt index 9ff8fac6..ca59abf6 100644 --- a/doc/examples.txt +++ b/doc/examples.txt @@ -109,8 +109,35 @@ that extends all day today. Similarly 'tomorrow', 'next week' are bounded. +[6.1] Configuration: Storing/accessing settings +----------------------------------------------- +With a 'config' command, all configuration data will be accessible. The command: + $ timew config name value +Will result in an update to the configuration rule: + + define configuration: + name value + +Using the '.' character allows the rule to reflect hierarchical configuration +data: + + $ timew config one two three four + $ timew config one two five six + +Will construct the rule like this: + + define configuration: + one: + two: + three four + five six + +The process of converting this rule structure to 'one.two.three four' is called +normalizing. + +--- By using tags, this becomes: @@ -173,8 +200,6 @@ associated metadata: $ timew define tag "tag1" budget 400 hours total $ timew define tag "tag1" overlap ---- - - Need to break all these out into separate sections, where each is discussed in sufficient detail to then generate user docs and code. diff --git a/doc/rules.txt b/doc/rules.txt index 6f776d9d..c8e3a42c 100644 --- a/doc/rules.txt +++ b/doc/rules.txt @@ -47,6 +47,14 @@ defines all exclusions: define exclusions: ... +There is a rule that contains all the general configuration data: + + define configuration: + name1 value1 + group1: + group2: + name2 value2 + There are general rules triggered by changes to the data: define rule one: @@ -85,20 +93,21 @@ Yields a combined: Possible exclusions include: $ timew define holidays eng-USA - $ timew define workweek mon-fri - $ timew define workday start 8:30am - $ timew define workday end 1730 - $ timew define workday tue end 3pm + $ timew define week mon-fri + $ timew define day start 8:30am + $ timew define day end 1730 + $ timew define day tue end 3pm Yielding: define exclusions: holidays eng-USA work 2015-11-26 - workweek mon,tue,wed,thu,fri - workday start 8:30am - workday end 1730 - workday tue end 3pm + week mon,tue,wed,thu,fri + day: + start 8:30am + end 1730 + tue end 3pm If you want to track your lunch breaks, then you would make a tag for it, and track it like any other project. If you do not want to track that time, add an