Choosing from presets (and more)
Hello and thank you for TimeTagger! :)
I find myself always wanting to use the CLI but nearly always having to open the web version.
Here are a few stories that should be rather easy to implement but would IMHO dramatically improve the usefulness of the app and leave the web app for more complicated cases like visualisation, reporting etc.
User stories
Choose from presets
As a user who has ~20 presets I want a command to choose from a preset In order to quickly initiate a typical activity from CLI
More usable resume
As a user who typically has a few ~week-long tasks along with presets
I want the resume command to deduplicate the entries (or support an argument to increase the number of displayed tasks)
So that the tasks don't get displaced too quickly
Search-and-select
As a user who heavily relies on presets (2+ tags in each) I want fuzzy search over presets In order to quickly initiate a typical activity from CLI
Suggested approach
Instead of adding relatively complex workflow-specific commands I'd suggest a much simpler approach: just add something like list recent [--number N] and list presets.
The user can wrap this in pretty simple scripts to their taste, e.g.:
# choose a recent activity from the list and start it
alias ttr='timetagger start $(timetagger list recent | dmenu)'
# fuzzy-search a preset and start it
alias ttp='timetagger start $(timetagger list presets | fzf)'
Oh... I was going to quickly prototype that using the HTTP API and presets weren't there, so I checked the source and it looks like they are stored in the browser? That's quite unfortunate. Of course I'll just have a text file with presets and feed the selected one to timetagger start just the same but it's a shame I can't keep everything in the same place.
No the presets are stored as a setting, under the key tag_presets, so it should be possible to acquire them with the cli.
Thanks for the suggestions! I think it makes sense!