mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Docs: Removed \define\ command
This commit is contained in:
parent
aed0d02c64
commit
55030dd010
7 changed files with 49 additions and 88 deletions
15
doc/data.txt
15
doc/data.txt
|
@ -38,7 +38,7 @@ Exclusions
|
||||||
Exclusions are stored as configuration, and there are several commands that
|
Exclusions are stored as configuration, and there are several commands that
|
||||||
allow easy manipulation of this. Whenever an exclusion changes, the set of all
|
allow easy manipulation of this. Whenever an exclusion changes, the set of all
|
||||||
exclusions are written to the data file. This is because all subsequent
|
exclusions are written to the data file. This is because all subsequent
|
||||||
inclusions are to be resolved against the active set of exlcusions.
|
inclusions are to be resolved against the active set of exclusions.
|
||||||
|
|
||||||
|
|
||||||
Inclusions
|
Inclusions
|
||||||
|
@ -70,23 +70,22 @@ An example file looks like this:
|
||||||
inc 2016-02-28T08:00:00 - 2016-02-28T12:00:00 # Upgrade Planning
|
inc 2016-02-28T08:00:00 - 2016-02-28T12:00:00 # Upgrade Planning
|
||||||
inc 2016-02-28T13:00:00 # Upgrade Presentation "ABCD Inc"
|
inc 2016-02-28T13:00:00 # Upgrade Presentation "ABCD Inc"
|
||||||
|
|
||||||
White space is ignored. Here we see a sect of exlcusions that define a work week
|
White space is ignored. Here we see a sect of exclusions that define a work week
|
||||||
and a two inclusions, the first of which represents a four hour block of time
|
and a two inclusions, the first of which represents a four hour block of time
|
||||||
with two tags 'Upgrade' and 'Planning'. The second inclusion is open ended,
|
with two tags 'Upgrade' and 'Planning'. The second inclusion is open ended,
|
||||||
having only a start time (1pm), but three tags 'Upgrade', 'Presentation' and
|
having only a start time (1pm), but three tags 'Upgrade', 'Presentation' and
|
||||||
'ABCD Inc'. The third tag is a quoted string because of the embedded space.
|
'ABCD Inc'. The third tag is a quoted string because of the embedded space.
|
||||||
|
|
||||||
An open-ended inclusion like this means that the tracking continues, but the
|
An open-ended inclusion like this means that the tracking continues, but the
|
||||||
exlcusions prevent an excess time buildup of the 63 hours that compries the
|
exclusions prevent an excess time buildup of the 63 hours that comprise the
|
||||||
weekend (Friday 5:30pm until Monday 8:30am).
|
weekend (Friday 5:30pm until Monday 8:30am).
|
||||||
|
|
||||||
|
|
||||||
Data File Names
|
Data File Names
|
||||||
---------------
|
---------------
|
||||||
The data file names will have the year and month embedded, which acts as a
|
The data file names will have the year and month numbers, which keeps the data
|
||||||
heuristic for filtering, keeps the data files small and therefore quicker to
|
files small and therefore quicker to manipulate, eliminating the need for any
|
||||||
manipulate, and eliminates the need for any sophisticated archiving. For
|
sophisticated archiving. For example:
|
||||||
example:
|
|
||||||
|
|
||||||
~/.timewarrior/data/2016-02.data
|
~/.timewarrior/data/2016-02.data
|
||||||
~/.timewarrior/data/2016-03.data
|
~/.timewarrior/data/2016-03.data
|
||||||
|
@ -101,3 +100,5 @@ The undo stack will be stored as:
|
||||||
|
|
||||||
--- Raw Notes ---
|
--- Raw Notes ---
|
||||||
|
|
||||||
|
- Recurring inclusions: meetings
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DOM - Document Object Model
|
DOM - Document Object Model
|
||||||
===========================
|
===========================
|
||||||
Timewarrior needs DOM support, so that it can operate a 'get' command, and also
|
Timewarrior needs DOM support, so that it can service a 'get' command and
|
||||||
provide data access to rules.
|
provide data access to rules. Bothare important for extensions.
|
||||||
|
|
||||||
|
|
||||||
Data to be Accessed
|
Data to be Accessed
|
||||||
|
@ -45,3 +45,7 @@ All DOM references have this form:
|
||||||
dom.gap.today
|
dom.gap.today
|
||||||
...
|
...
|
||||||
|
|
||||||
|
- The above needs to support overlapping tags.
|
||||||
|
|
||||||
|
- The above needs to support totals.
|
||||||
|
|
||||||
|
|
|
@ -53,24 +53,13 @@ If 'tag1' has a defined color, it is used here to color the 'tag1' string.
|
||||||
There are several time-based default reports which summaries tracked time over
|
There are several time-based default reports which summaries tracked time over
|
||||||
preset periods:
|
preset periods:
|
||||||
|
|
||||||
$ timew report day
|
$ timew report summary :day
|
||||||
$ timew report week
|
$ timew report summary :week
|
||||||
$ timew report month
|
$ timew report summary :month
|
||||||
$ timew report quarter
|
$ timew report summary :quarter
|
||||||
$ timew report year
|
$ timew report summary :year
|
||||||
$ timew report
|
$ timew report summary <from> - <to>
|
||||||
|
$ timew report summary
|
||||||
|
|
||||||
[3.1] Exclusions: Work Week
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
$ timew define day monday 8am - 12pm, 12:45pm - 5:30pm
|
|
||||||
$ timew define day tuesday 8am - 12pm, 12:45pm - 6:30pm
|
|
||||||
$ timew define day wednesday 8am - 12pm, 1:30pm - 5:30pm
|
|
||||||
$ timew define day thursday 8am - 12pm, 12:45pm - 5:30pm
|
|
||||||
$ timew define day friday 8am - 12pm, 12:45pm - 5:30pm
|
|
||||||
$ timew define day on 2016-01-02
|
|
||||||
$ timew define day off 2016-01-01
|
|
||||||
|
|
||||||
|
|
||||||
[5.1] Fill: Backfill
|
[5.1] Fill: Backfill
|
||||||
|
@ -141,13 +130,12 @@ data:
|
||||||
|
|
||||||
Will construct the rule like this:
|
Will construct the rule like this:
|
||||||
|
|
||||||
define configuration:
|
|
||||||
one:
|
one:
|
||||||
two:
|
two:
|
||||||
three = four
|
three = four
|
||||||
five = six
|
five = six
|
||||||
|
|
||||||
The process of converting this rule structure to 'one.two.three four' is called
|
The process of converting this structure to 'one.two.three four' is called
|
||||||
normalizing.
|
normalizing.
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,13 +212,13 @@ The above examples simply use ad-hoc tags, which is an undefined tag. They are
|
||||||
simply used as tags, and have no metadata. Defining a tag allows it to have
|
simply used as tags, and have no metadata. Defining a tag allows it to have
|
||||||
associated metadata:
|
associated metadata:
|
||||||
|
|
||||||
$ timew define tag "tag1"
|
$ timew config tag "tag1"
|
||||||
$ timew define tag "tag1" description "Description of tag1"
|
$ timew config tag "tag1" description "Description of tag1"
|
||||||
$ timew define tag "tag1" start 2016-01-01
|
$ timew config tag "tag1" start 2016-01-01
|
||||||
$ timew define tag "tag1" end 2016-06-30
|
$ timew config tag "tag1" end 2016-06-30
|
||||||
$ timew define tag "tag1" budget 20 hours per week
|
$ timew config tag "tag1" budget 20 hours per week
|
||||||
$ timew define tag "tag1" budget 400 hours total
|
$ timew config tag "tag1" budget 400 hours total
|
||||||
$ timew define tag "tag1" overlap
|
$ timew config tag "tag1" overlap
|
||||||
|
|
||||||
- Need to break all these out into separate sections, where each is discussed in
|
- Need to break all these out into separate sections, where each is discussed in
|
||||||
sufficient detail to then generate user docs and code.
|
sufficient detail to then generate user docs and code.
|
||||||
|
|
|
@ -2,24 +2,15 @@ CLI Syntax
|
||||||
----------
|
----------
|
||||||
The CLI shall have a well-defined and unambiguous grammar.
|
The CLI shall have a well-defined and unambiguous grammar.
|
||||||
|
|
||||||
|
timew
|
||||||
timew start|stop [<tagset>]
|
timew start|stop [<tagset>]
|
||||||
timew track <interval> [<tagset>]
|
timew track <interval> [<tagset>]
|
||||||
timew clear <tagset>|<interval>
|
timew clear <tagset>|<interval>
|
||||||
timew continue
|
timew continue
|
||||||
timew
|
|
||||||
|
|
||||||
timew [<filter>] report <report>
|
timew report <report> [<filter>]
|
||||||
|
|
||||||
timew define day <day> <start> - <end> [, <start> - <end> ...]
|
|
||||||
timew define day on|off <date>
|
|
||||||
|
|
||||||
timew define tag <tag> description <string>
|
|
||||||
timew define tag <tag> start|end <date>
|
|
||||||
timew define tag <tag> budget <number> <units> per <unit>
|
|
||||||
timew define tag <tag> budget <number> <units> total
|
|
||||||
timew define tag <tag> overlap
|
|
||||||
timew define tag <tag> color <color>
|
|
||||||
|
|
||||||
|
timew config [<name> [<value>]]
|
||||||
timew undo
|
timew undo
|
||||||
|
|
||||||
timew tags [<filter>]
|
timew tags [<filter>]
|
||||||
|
|
|
@ -32,13 +32,14 @@ Or if you forgot a whole activity:
|
||||||
$ timew track 8:00am - 8:30am Exercise
|
$ timew track 8:00am - 8:30am Exercise
|
||||||
$ timew start 8:30am Home Cleaning
|
$ timew start 8:30am Home Cleaning
|
||||||
|
|
||||||
More sophisticated use is possible if you have defined your work week:
|
More sophisticated use is possible if you have defined your work week with:
|
||||||
|
|
||||||
$ timew define day monday 9am - 5pm
|
define exclusions:
|
||||||
$ timew define day tuesday 9am - 6pm
|
monday = 8:00:00-12:00:00 12:45:00-17:30:00
|
||||||
$ timew define day wednesday 9am - 5pm
|
tuesday = 8:00:00-12:00:00 12:45:00-18:30:00
|
||||||
$ timew define day thursday 9am - 5pm
|
wednesday = 8:00:00-12:00:00 13:30:00-17:30:00
|
||||||
$ timew define day friday 9am - 5pm
|
thursday = 8:00:00-12:00:00 12:45:00-17:30:00
|
||||||
|
friday = 8:00:00-12:00:00 12:45:00-17:30:00
|
||||||
|
|
||||||
$ timew track yesterday Home Painting
|
$ timew track yesterday Home Painting
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ Once the work week is recorded, vague terms like 'yesterday' can be resolved
|
||||||
into actual start/stop timestamps. If you define holidays, then it knows not to
|
into actual start/stop timestamps. If you define holidays, then it knows not to
|
||||||
track time on those days:
|
track time on those days:
|
||||||
|
|
||||||
$ timew define holidays en-US
|
import /path/to/holidays/holidays.en-US
|
||||||
|
|
||||||
Furthermore, Timewarrior can fill in gaps. For example:
|
Furthermore, Timewarrior can fill in gaps. For example:
|
||||||
|
|
||||||
|
@ -65,8 +66,8 @@ And the 'ProjectB' tagged interval will range from 2pm - 3pm.
|
||||||
Tags can have their own metadata, for example you can make a tag valid for a
|
Tags can have their own metadata, for example you can make a tag valid for a
|
||||||
given time range:
|
given time range:
|
||||||
|
|
||||||
$ timew define tag ProjectA end 2016-06-30
|
$ timew config tag ProjectA end 2016-06-30
|
||||||
$ timew define tag ProjectA budget 400 hours total
|
$ timew config tag ProjectA budget '400 hours total'
|
||||||
|
|
||||||
This is managed by a rules system that can impose constraints.
|
This is managed by a rules system that can impose constraints.
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ Commands
|
||||||
--------
|
--------
|
||||||
The command set will include:
|
The command set will include:
|
||||||
|
|
||||||
define Modify configuration
|
config Modify configuration
|
||||||
track Record tracked time
|
track Record tracked time
|
||||||
report Run a report
|
report Run a report
|
||||||
undo Undo a change
|
undo Undo a change
|
||||||
|
|
|
@ -74,31 +74,7 @@ There are rules that will serve as hooks:
|
||||||
Rule Type: Exclusions
|
Rule Type: Exclusions
|
||||||
---------------------
|
---------------------
|
||||||
Because exclusions are resolved at run time, and only when needed, they should
|
Because exclusions are resolved at run time, and only when needed, they should
|
||||||
be stored in a form very close to the command line syntax, with no expansion.
|
be stored in a readily-interpreted form:
|
||||||
For example:
|
|
||||||
|
|
||||||
$ timew define monday 8am - 12pm, 12:45pm - 5:30pm
|
|
||||||
$ timew define tuesday 8am - 12pm, 12:45pm - 6:30pm
|
|
||||||
$ timew define wednesday 8am - 12pm, 1:30pm - 5:30pm
|
|
||||||
$ timew define thursday 8am - 12pm, 12:45pm - 5:30pm
|
|
||||||
$ timew define friday 8am - 12pm, 12:45pm - 5:30pm
|
|
||||||
|
|
||||||
Will be stored in a rule, whose purpose is to return a set of exclusion
|
|
||||||
intervals:
|
|
||||||
|
|
||||||
define exclusions:
|
|
||||||
monday = 8:00:00-12:00:00 12:45:00-17:30:00
|
|
||||||
tuesday = 8:00:00-12:00:00 12:45:00-18:30:00
|
|
||||||
wednesday = 8:00:00-12:00:00 13:30:00-17:30:00
|
|
||||||
thursday = 8:00:00-12:00:00 12:45:00-17:30:00
|
|
||||||
friday = 8:00:00-12:00:00 12:45:00-17:30:00
|
|
||||||
|
|
||||||
Additional exclusions include:
|
|
||||||
|
|
||||||
$ timew define day on 2016-01-02
|
|
||||||
$ timew define day off 2016-01-01
|
|
||||||
|
|
||||||
Yielding:
|
|
||||||
|
|
||||||
define exclusions:
|
define exclusions:
|
||||||
monday = 8:00:00-12:00:00 12:45:00-17:30:00
|
monday = 8:00:00-12:00:00 12:45:00-17:30:00
|
||||||
|
@ -107,7 +83,7 @@ Yielding:
|
||||||
thursday = 8:00:00-12:00:00 12:45:00-17:30:00
|
thursday = 8:00:00-12:00:00 12:45:00-17:30:00
|
||||||
friday = 8:00:00-12:00:00 12:45:00-17:30:00
|
friday = 8:00:00-12:00:00 12:45:00-17:30:00
|
||||||
days:
|
days:
|
||||||
2016_01_01 = On
|
2016_01_01 = Working
|
||||||
2016_01_02 = Off
|
2016_01_02 = Off
|
||||||
|
|
||||||
If you want to track your lunch breaks, then you would make a tag for it, and
|
If you want to track your lunch breaks, then you would make a tag for it, and
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue