Timewarrior is great for tracking time spent doing things (work, sleep, sports, projects, etc.). It does many things right:

- non-interactive cli (works everywhere, scriptable)
- plain text data storage (no weird database)
- tagging and annotations of tracked periods
- redaction/editing possible via cli without editing files
- nice weekly/monthly/etc. views and summaries in the cli
- has a plugin system for extensions

https://github.com/GothenburgBitFactory/timewarrior

GitHub - GothenburgBitFactory/timewarrior: Timewarrior - Commandline Time Tracking and Reporting

Timewarrior - Commandline Time Tracking and Reporting - GothenburgBitFactory/timewarrior

GitHub

However, timewarrior has several shortcomings that might lead me to (again) write my own cli time-tracker:

- data format not git-friendly and conflict-prone
- annotations are forced to be a single line
- no tracking of overlapping/simultaneous periods
- much manual typing involved (have to type out the full 2022-10-12T13:44 *every time* for non-today times, AFAIK no shortcut for "yesterday" etc., also ":id :anno" every time you want the summary to show IDs and notes in the summary [always])

Furthermore:

- plugin system is not like git's, making it difficult to add a simple "timew MYCOMMAND ..." with custom argument parsing
- Small bugs here and there preventing you from entering periods

Still, timewarrior is the best option for me now and I managed to work around much of the above with aliases and extensions:

- editing annotations with $EDITOR
- encrypting annotations with gpg
- auto-syncing between devices with git

timewarrior also runs pretty much anywhere, so I can easily use it on my #SailfishOS phone, which is important for me.

When I'd rewrite timewarrior I would:

- use Python (that's what I know)
- make the data storage git-friendly (one file per period?)
- have a git sync command built-in
- use both a git-style "plugin" system and look for extensions in setuptool's entry_points
- allow for arbitrary annotations and editable in $EDITOR if wanted
- allow for arbitrary oberlaps and simultaneous tracks (e.g. to have "notes of the day")

Let's see if I find the time someday 🙂

Thinking about it, @joeyh's #gitAnnex could be quite a good backend for a ⏱️ time tracker solving pretty much all of my issues with #timeWarrior (see 🧵☝️):

- 🔄 powerful, conflict resistant, decentralized (auto-)syncing with #git
- 🔐 encryption possible
- 📟 easily scriptable, existing API (e.g. --batch --json)

An implementation could e.g.:

- use #gitAnnex metadata for start/end time and/or tags
- use file content as notes
- use @willmcgugan's #Python #rich or #textual for pretty display

1½ years later, ⏱️ #annextimelog¹ exists and I use it daily to track things I do/work. Even simultaneous things, one of the key features I was missing in most other #FOSS #plainText time trackers such as #timewarrior or  #hledger.

Yesterday, @matrss announced an #annextimelog or rather  #gitAnnex plugin² to auto-export working hours from atl to the time management portal of @fzj. Wild! 😀

¹https://gitlab.com/nobodyinperson/annextimelog
²https://jugit.fz-juelich.de/m.risse/git-annex-remote-fzj-time-management

Yann Büchau / ⏱️ annextimelog · GitLab

git-annex based cli time tracker

GitLab