ObsidianSimpleTimeTracker icon indicating copy to clipboard operation
ObsidianSimpleTimeTracker copied to clipboard

Total time in YAML

Open RehmatSChawla opened this issue 1 year ago • 2 comments

I would like to be able to have the total time, or even the time of the latest completed segment, appear elsewhere in the note, especially in the YAML. Is it possible to do this somehow?

One simple implementation may be to assign a hotkey that prints this, but that still involves a manual step of going to the YAML and pressing the hotkey.

Ideally there is a command of sorts - something like {{DATE}} - that is automatically replaced with the total/latest time, triggered by the pausing of the timer. But I don't have the technical know-how to suggest an implementation for that.

This may also need to consider what happens when multiple timers are added in a single note. Maybe using segment names is necessary to handle that case.

RehmatSChawla avatar Jul 20 '24 04:07 RehmatSChawla

@RehmatSChawla Did you find a way to do it?

SarahMuse avatar Mar 22 '25 20:03 SarahMuse

You should be able to do something similar to what you're requesting using the new(-ish) plugin api! The same way you access it through Dataview should also allow accessing it through other JavaScript routes like the Templatr plugin :)

Ellpeck avatar Mar 22 '25 20:03 Ellpeck