A shabby CLI tool built on Watson CLI for calculating the time balance in a flex time working environment.
- Prints time balance.
- Considers vacation days, holidays and sick days.
- Supports half days off.
- Allows to configure working hours per weekday.
- Time adjustment for the current window.
- No documentation.
- No tests.
- Not extensible.
- No helpful error messages.
Elixir and Watson CLI need to be installed on your system.
Build the binary:
git clone https://github.com/woylie/ebb
cd ebb
mix install
Copy the default configuration to a local folder:
mkdir -p ~/.config/ebb
cp ./config.yml ~/.config/ebb
Adjust the configuration to your needs.
You can override the default config folder by setting the EBB_CONFIG_PATH
environment variable.
Note: Direct installation from GitHub using mix escript.install
is not
supported due to the need to copy the tzdata
data folder from deps
.
mix setup
mix build
Record your work time with Watson. Use Ebb to check your time balance.
Ebb will calculate the time balance for the time window from start_date
set
in the configuration until the end of today. The current Watson time frame is
included in the calculation. Configured vacation days, sick days and holidays
are considered.
ebb balance
- Print current time balanceebb daysoff
- Prints the taken and remaining days off for the current year.ebb config
- Print current configuration.
> ebb balance
Start date: 2023-10-02
End date: 2023-10-07
Expected: 40h 00m 00s
Actual: 44h 08m 17s
==========================
Balance: 4h 08m 17s
> ebb daysoff
Year: 2023
Sick days
Allowed: 10
Taken: 3
=============
Left: 7
Vacation days
Allowed: 30
Taken: 22
==============
Left: 8
Because it's what I know.
On the off-chance you find this tool in any way useful and feel the inexplicable urge to improve it, PRs are begrudgingly welcomed.