mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
68 lines
1.4 KiB
Text
68 lines
1.4 KiB
Text
CLI Syntax
|
|
----------
|
|
The CLI shall have a well-defined and unambiguous grammar.
|
|
|
|
timew start [<tagset>]
|
|
timew stop [<tagset>]
|
|
timew track [<interval>] [<tagset>]
|
|
timew [<filter>] report <report>
|
|
|
|
timew define holidays <locale>
|
|
timew define holidays work <date>
|
|
timew define week <day>[- <day>] [, <day>] ...
|
|
timew define day start <time>
|
|
timew define day end <time>
|
|
timew define day <day> start <time>
|
|
timew define day <day> end <time>
|
|
|
|
timew define tag <tag>
|
|
timew define tag <tag> description <string>
|
|
timew define tag <tag> start <date>
|
|
timew define tag <tag> end <date>
|
|
|
|
|
|
CLI Grammar
|
|
-----------
|
|
|
|
interval: <timestamp> "-" <timestamp>
|
|
<timestamp> "to" <timestamp>
|
|
"from" <timestamp> "to" <timestamp>
|
|
"until" <timestamp>
|
|
"from" <timestamp>
|
|
|
|
timestamp: <day> <time>
|
|
|
|
month: "january"
|
|
"february"
|
|
...
|
|
|
|
day: "monday"
|
|
"tuesday"
|
|
...
|
|
|
|
time: \d{4}
|
|
\d{1,2} ":" \d{2} <ampm>
|
|
\d{1,2} ":" \d{2}
|
|
\d{1,2} <ampm>
|
|
\d{1,2}
|
|
|
|
ampm: "AM"
|
|
"am"
|
|
"a.m."
|
|
"PM"
|
|
"pm"
|
|
"p.m."
|
|
|
|
tagset: <tag>+
|
|
|
|
tag: string
|
|
|
|
string: "\"" .+ "\""
|
|
.+
|
|
|
|
|
|
Rules Grammar
|
|
-------------
|
|
|
|
|
|
---
|