2

GitHub - krvoje/clockking: A console app for daily time tracking written in Rust...

 2 years ago
source link: https://github.com/krvoje/clockking
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Clock King

A console app for jotting down hours tracking for the day. Written to learn Rust with Cursive.

Meant as manual task list, where the results can be transferred to a time tracking app at the end of day.

Disclaimer: This is a weekend project that I did for fun, and ended up finding useful at work. It's by no means an app with guarantees on anything, but more akin to a script with a TUI I hacked for personal use. I've had no issues with losing data, but that doesn't mean it's impossible in some corner cases. So, please bear that in mind when using the app, and approach it lightheartedly as I did, as a tool to have fun with, that's also useful. Issues, comments, and suggestions are welcome.

Quickstart

To start the program, just run:

cargo run --release

If you do not have the Rust toolchain installed, check the installation instructions.

Functionality

Clock entries list

This is the main screen, and contains the list of clock entries that can be checked once they are entered to a time tracking app.

Keyboard shortcuts are listed on the screen buttons, spacebar toggles whether an item is clocked or not.

Clock entries list

Adding a clock entry

Pressing the <(A)dd> adds a new clock entry after the current selection in the table. Clock King tries to be smart and guess the end time of the task.

Add new entry

Editing a clock entry

Pressing Enter opens the edit form for the current selection.

Edit entry

Deleting a clock entry

Entries can be deleted from the list, and restored from the undo buffer.

Edit entry

Granularity

There is a time-granularity toggle for how detailed you want to be with your tracking.

  • Relaxed (1h)
  • Reasonable (30m)
  • Detailed (15m)
  • Paranoid (5m)
  • OCD (1m)
  • Scientific (1s)

Changing the granularity automatically adjusts existing entries.

Granularity

Record a new entry

By pressing <Start (r)ecording> you can submit details for a new entry you want to start recording. The start time of the entry will be set to the current timestamp (rounded to the selected granularity). When you submit the data, Clock Kings starts the recording.

Start recording

You can continue working while Clock King records your entry in the background.

Recording

By pressing <Stop (r)ecording> Clock King stops the recording at the current timestamp, and you can submit the updated entry details.

End Recording

File database

The executable creates a ./.clockking/db.json where the current list is stored. There's an autosave thread, and the data gets saved when you quit the program normally.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK