Skip to content

Commit 35ee6cb

Browse files
authored
Release v1.0 of the specification (#89)
* Remove RFC marker * Correct section count * Phrasing / spelling * Add missing quotes for technical terms * Phrasing * Clarify that “open ranges” are entries
1 parent fd7a6b3 commit 35ee6cb

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

Specification.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
11
# klog – File Format Specification
22

3+
**Version 1.0**
4+
35
klog is a file format for tracking time.
46

57
It 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

2011
The keywords “MUST”, “MUST NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED” and “MAY”
2112
in this document are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119).
2213

2314
Whenever 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
5445
A *should-total* denotes the targeted total time of a *record*.
5546

5647
A *should-total* MUST be a *duration* value
5748
followed by a `!`
58-
and wrapped in parentheses,
49+
and wrapped in parentheses,
5950
e.g. `(8h!)` or `(-5h30m!)`.
6051

6152
### Summary
@@ -100,7 +91,7 @@ e.g. `9:00`, `23:18`, `6:30am`, `9:23pm`
10091

10192
A *time* value MUST consist of both an hour part and a minute part.
10293
Single-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

10596
As default, *times* are to be interpreted as 24-hour clock values.
10697
An `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,
133125
i.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.
169161
The *duration* as a whole is a signed value:
170162
That means it is either positive (i.e. adding to the *total time*)
171163
or negative (i.e. deducting from the *total time*).
172-
As default a *duration* is positive,
164+
By default, a *duration* is positive,
173165
which MAY be indicated by a leading `+` character,
174166
e.g. `+4h12m`.
175167
If 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

179171
A file MAY hold any amount of *records*.
180172
Apart from that it MUST NOT contain anything
@@ -221,15 +213,15 @@ they MAY be factored in upon explicit request, though.
221213
Multiple *records* with the same *date* MUST be treated as distinct
222214
and 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

src/app/cli/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (opt *Version) Run(ctx app.Context) error {
2323
}
2424
ctx.Print("Command line tool: " + ctx.MetaInfo().Version)
2525
ctx.Print(" [" + ctx.MetaInfo().BuildHash + "]\n")
26-
ctx.Print("File format: version 1 (RFC)\n")
26+
ctx.Print("File format: version 1.0\n")
2727

2828
if opt.NoCheck {
2929
return nil

0 commit comments

Comments
 (0)