-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to clock out early #12
Comments
I like the idea. I think your first idea is solid. Would there ever be a case where someone would want to kill the script without clocking out? The only case I can think of is if you are just messing around with the script. Otherwise, I think we could easily implement that. |
Also, right now I feel like the messaging system is a bit cluttered, so I like your simpler way of showing info. |
Just thinking through this, if we do have a way to clock out early from the CLI then we could optionally use a headless browser instead of a full window. |
Have you ever used a tool like that? Does Selenium offer something like that? |
It's a flag built into selenium. I actually use it now with this tool. If I am running the script from my server I need to avoid having a window try to pop open. Using headless mode works for that. https://developers.google.com/web/updates/2017/04/headless-chrome |
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:
The text was updated successfully, but these errors were encountered: