Working time watcher
This python code allows to monitor working time providing real time statistics such as:
Start time
: The time the worker has started
Working time
: The time the worker has to perform (excluding pause time)
Pause time
: The time allowed for the lunch break
Current time
: The time when the user is extracting statistics
Current elapse
: How much time the worker has already performed
Due time
: The time when the user accomplishes her work
Remaining time
: How much time the worker has to perform yet
Ticket time
: The necessary time to gain the ticket
Ticket at
: The time when ticket will be gained
Ticket remain
: How much time the worker needs to gain ticket
Execution
./wtime.py <start_time_hour> <start_time_minute> [start_time_seconds]
Working parameters such as: working time, pause time, ticket time, etc must be configured modifying the code or wtime class variable members.
Working time watcher, to be used in case working time has been splitted in two intervals (morning+afternoon)
./wtime2.py t1 [[[t2] t3] t4]
Where tx is a timestamp in the form of HH:MM:SS
This version works exactly like wtime2 integrating the new calculation using the wtime object. This version is used by the wtimegui wich provides a tkinter based GUI.
Execution
./wtimegui.py <start_timestamp> [<begin_pause_timestamp> <resume_pause_timestamp> <end_timestamp>]
-
On *MacOS it could be necessary to execute the following command:
defaults write org.python.python ApplePersistenceIgnoreState NO
-
wtimegui requires tkinter to work, please refer to your specific OS way to install it, below some examples:
- Fedora35:
dnf install -y python3-tkinter
- MacOS:
brew install python-tk
- CentOS7:
yum isntall tkinter
- Fedora35:
This directory contains the server version of the wtime project. It provides a multi user web frontend to manage working time.
It is possible to use the automated clocking retrieval, just configuring the python virtual environment and setting up the user credentials.
python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt
printf "<yourusername>" > .aaiuser
printf "<yourpassword>" > .aaipass
printf "<yourclocking_url> > .clockurl
First ensure the virtual environment is active, if not activate it
. ./venv/bin/activate
Then start the GUI using the clockings retrieval
CLKS=$(python autoclocking.py) && python wtimegui4.py $(echo $CLKS)