Currently, the script sets a time block for clocking hours and then runs until that timeblock expires. I have had cases where I need to stop working earlier than expected and would still need to clock out manually.
It would be nice to have a way to kill the script and have it clock out for you. An easy route would be to handle the Interrupt Signal (ctrl+c) and clock out before exiting.
Another option would be to run the current process in a separate thread and then listen for a command from the user to tell the script to clock out early. This would be a cleaner implementation, but may be a bit more complicated to implement.
I imagine the workflow being something like:
~/D/OneUSGAutomaticClock ❯❯❯ python3 clock_manager.py -u username -hrs 2
Clocking 2.0 hours...
Enter command: Status
--- 30 minutes of work done, 1.5 hours of work remaining
Enter command: Clock Out
--- 30 minutes of work done, attempting to clock out
...
...
--- Clock out successful, 30 minutes clocked
~/D/OneUSGAutomaticClock ❯❯❯
Currently, the script sets a time block for clocking hours and then runs until that timeblock expires. I have had cases where I need to stop working earlier than expected and would still need to clock out manually.
It would be nice to have a way to kill the script and have it clock out for you. An easy route would be to handle the Interrupt Signal (
ctrl+c) and clock out before exiting.Another option would be to run the current process in a separate thread and then listen for a command from the user to tell the script to clock out early. This would be a cleaner implementation, but may be a bit more complicated to implement.
I imagine the workflow being something like: