11# klog – File Format Specification
22
3+ ** Version 1.0**
4+
35klog is a file format for tracking time.
46
57It is free and open-source software distributed under the MIT-License.
68
7- > ** Current state** : version 1 RFC (request for comments)
8- >
9- > This is a draft for the first version of the klog file format.
10- > While the basic structure will likely remain as it is,
11- > there still might be minor additions or corrections necessary.
12- > Time will tell when it’s good to go to be finalised as version 1.
13- >
14- > In case you have comments or thoughts, please file an issue
15- > in the [ klog repository] ( https://github.com/jotaen/klog )
16- > so that they can be discussed.
17-
189## Preface
1910
2011The keywords “MUST”, “MUST NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED” and “MAY”
2112in this document are to be interpreted as described in [ RFC 2119] ( https://tools.ietf.org/html/rfc2119 ) .
2213
2314Whenever a word has special meaning in klog, it is formatted in * italics* .
2415
25- Other technical terms are surrounded by “quotes”. These are defined at the end of this specification .
16+ Other technical terms are surrounded by “quotes”. These are defined in the appendix .
2617
2718## I. Records
2819
@@ -48,14 +39,14 @@ It MUST be formatted according to one of the following patterns:
4839- ` YYYY-MM-DD ` (RECOMMENDED),
4940- ` YYYY/MM/DD `
5041
51- (Where ` Y ` is a digit to denote the year, ` M ` the month, ` D ` the day.)
42+ (Where ` Y ` is a “ digit” to denote the year, ` M ` the month, ` D ` the day.)
5243
5344### Should-Total
5445A * should-total* denotes the targeted total time of a * record* .
5546
5647A * should-total* MUST be a * duration* value
5748followed by a ` ! `
58- and wrapped in parentheses,
49+ and wrapped in “ parentheses” ,
5950e.g. ` (8h!) ` or ` (-5h30m!) ` .
6051
6152### Summary
@@ -100,7 +91,7 @@ e.g. `9:00`, `23:18`, `6:30am`, `9:23pm`
10091
10192A * time* value MUST consist of both an hour part and a minute part.
10293Single-digit hour parts MAY be padded with a ` 0 ` .
103- The minute part MUST always contain two digits.
94+ The minute part MUST always contain two “ digits” .
10495
10596As default, * times* are to be interpreted as 24-hour clock values.
10697An ` am ` or ` pm ` suffix MAY be used to denote that the value is
@@ -129,7 +120,8 @@ Examples of *ranges* with *shifted times*:
129120` <23:00 - 5:00 ` , ` 19:00 - 0:30> ` , ` <22:25 - <23:59 ` , ` <15:00 - 12:00> ` , ` 0:30> - 4:00> ` .
130121
131122### Open range
132- An * open range* can be used to track the start * time* of an activity,
123+ An * open range* is an * entry*
124+ that can be used to track the start * time* of an activity,
133125i.e. the end * time* is not determined yet.
134126
135127* Open ranges* are formatted in the same way as * ranges* ,
@@ -169,12 +161,12 @@ If the minute part is missing, a value of `0m` is assumed.
169161The * duration* as a whole is a signed value:
170162That means it is either positive (i.e. adding to the * total time* )
171163or negative (i.e. deducting from the * total time* ).
172- As default a * duration* is positive,
164+ By default, a * duration* is positive,
173165which MAY be indicated by a leading ` + ` character,
174166e.g. ` +4h12m ` .
175167If the * duration* is supposed to be negative, it MUST be preceded by a ` - ` character.
176168
177- ## II. Organizing records in files
169+ ## II. Organising records in files
178170
179171A file MAY hold any amount of * records* .
180172Apart from that it MUST NOT contain anything
@@ -221,15 +213,15 @@ they MAY be factored in upon explicit request, though.
221213Multiple * records* with the same * date* MUST be treated as distinct
222214and MUST NOT be combined into a single * record* .
223215
224- ## III . Appendix
216+ ## IV . Appendix
225217
226218### Glossary of technical terms
227219
228220- “space”: The character ` ` (U+0020)
229221- “tab”: The tab character (U+0009), escape sequence ` \t `
230222- “whitespace”: A “space”, a “tab”, or another character that appears blank
231223- “parenthesis”: The opening and closing parentheses ` ( ` and ` ) ` (U+0028 and U+0029)
232- - “blank line”: A line that only contains whitespace characters
224+ - “blank line”: A line that only contains “ whitespace” characters
233225- “letter”: A character as defined by the Unicode letter category, regex ` \p{L} `
234226- “digit”: Any of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
235227- “integer”: An unsigned number without fractional component
0 commit comments