Repository navigation
print --with-totals should accept --now
#422
Replies: 2 comments 1 reply
|
Thanks for bringing this up, this seems to be a valid point and I haven’t thought about it yet. I think this would be worth addressing. One “concern” would be that supporting Which makes me wonder whether and The obvious counter argument is that you couldn’t easily tell anymore which entries are open-ended – except for the subtle colouring difference in the output. I feel this wouldn’t matter as much for or |
|
I don't have an opinion how it should look like as long as it answers my question: how much did I work today in total and on each item, even when they're still open. The "fake" Thanks a lot for looking at this! |
Uh oh!
There was an error while loading. Please reload this page.
klog print --with-totalsis the only view that shows per-entry durationsalongside the record total, so it's what I reach for to answer "what did I
spend today, and on what". But it rejects
--now:While I'm still clocked in, the open entry shows
0mand the day totalexcludes it — which is exactly the moment I want that number.
--nowis already supported bytotal,today,report,tagsandjson, soprintis the odd one out.One design question worth deciding deliberately
NowArgsis a shared mixin, so wiring it in is small. The wrinkle is thatApplyNow→CloseOpenRangesmutates the records, so where it's calledchanges the output:
SerialiseRecords— the line prints as11:00 - 13:17, asynthesised end time that isn't in the file.
Line.Textis already a fixed string whileLine.Recordisstill a live reference, so the line keeps showing
11:00 - ?and only theduration column counts the elapsed time.
The second seems right for
print, whose job is to reflect the file. Triedit locally against v7.1 (three lines in
print.go, existing test suite stillpasses) and it gives:
Happy to open a PR if you'd take it.
All reactions