Open eliandoran opened 2 years ago
Woah, seems nice, thank you!
I will take a more in-depth look in the following days.
I don't use kimai nowadays, so if you have other ideas you want to implement feel free to create PRs.
Thank you, @infeeeee . Let me know if it's OK for you.
I will probably want to do some more similar changes to the stop
command as well, will keep you posted.
If I may, did you switch to some other time tracking solution? Or do you no longer need to track your time?
I started to work at a company, I'm not self employed any more, I used kimai alone. I'm trying to convince the company to switch to kimai, but they are not ready yet.
I also don't code in js anymore, switched to python nowadays for projects like this.
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.