Closed nymann closed 3 years ago
We're planning to implement this feature as an --output
(short -o
) flag that accepts json
as a value:
timetrace status -o json
This would exactly match the way we'll be printing reports as JSON/CSV, see https://github.com/dominikbraun/timetrace/issues/88#issuecomment-850388905.
The --format
flag will be introduced by #109, and it allows to specify a custom output format.
Hi,
so timetrace 0.10.0 now supports the --format
flag for printing the status in your custom format and the --output
flag for specifying JSON as output format.
You can find the available formatting variables and further examples in the status
command reference:
Variable | Description |
---|---|
{project} |
The key of the current project. |
{trackedTimeCurrent} |
The time tracked for the current record. |
{trackedTimeToday} |
The time tracked today. |
{breakTimeToday} |
The break time since the first record. |
Hope this helps!
Hey, thanks for this awesome tool! Makes the time tracking part of my life easier :+1:
Right now I have the current task that I am working on in my status bar.
And this works, but it would be nice to add a format parameter to
timetrace status
to fx format the output as JSON, which is easier to work with in scripts :-)