This repository has been archived by the owner on Jan 27, 2025. It is now read-only.
Add interactive "start" when the project or activity are not mentioned #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings @infeeeee,
First, I find this CLI tool to be great and I would like to use it in my daily routine. However, to be personally more efficient I thought to start an activity faster directly from the CLI.
If the user knows the project and activity to start, they can use this:
However, there are two different cases which are not currently covered by this command.
Interactive selection of the activity
At work it is usually more convenient to select the activity from a list but to prefill the project, as such:
Attempting to do this at the moment will result in an exception:
After this PR, the user is taken straight to the activity list (equivalent to
kimai2-cmd
-> "Start new measurement" -> select the project).Interactive selection of the project
If the user is extra lazy and simply wants to start an activity, but without knowing the project or the activity:
At the moment, this results in an exception:
After this PR, the user is simply sent to the normal UI workflow for starting an activity (select project, then select activity).
Motivation
As mentioned previously, this can save the user for a few keystrokes. This is especially useful when the user does not have many projects or has a specific schedule. I want to use this at work to save a few keystrokes (since I usually have ~16 activities for an 8-hours workday).
If this modification does not fit your expectations for the classic CLI (especially since we are mixing the classic CLI with the interactive one), feel free to tell me. I have also tried to keep the modifications to the code as minimal as possible.