Skip to content

5hir0kur0/logseq-time-recorder

Repository files navigation

Logseq Time Recorder

This is a simple plugin for tracking working hours. Logseq has a built-in feature to track the time spent DOING a TODO block. However, it is not possible to edit this information (e.g., if you forgot to change the state from TODO to DOING when you started working on a task) from within Logseq.

Demo

Demo GIF

Features

  • Track your working hours during a workday.
  • Track working hours across multiple days using the long date format.
  • Button to clock in and clock out.
  • The recorded times are also manually editable.
  • Specify a goal duration (currently not exposed in the UI, but you can manually add it as the first argument, e.g. {{renderer :time-recorder, goal: 8h, 09:00}})

Screenshots

Short Date Format:
Short Date Format

Long Date Format:
Long Date Format

Settings:
Settings

Future Goals

  • Ideally I would like this to integrate with the built-in :LOGBOOK: syntax that is used for TODO blocks, but I don't know how to this with a plugin. It would be even better if Logseq just provided some UI for editing the :LOGBOOK:, then this plugin would be obsolete.
  • Maybe make it work across days (currently it only records HH:MM timestamps).

I am not a web developer. If you know how to make the code nicer or the UI prettier, please submit a PR :-)

Building and Running the Plugin

  • npm install && npm run build in terminal to install dependencies.
  • Load unpacked plugin in Logseq Desktop client.

Thanks