WorkTimeUtil is a small command-line tool to read working hours from your calendar, sum them up, and push them to absence.io. It provides a convenient way to manage your working hours without manual calculation.
You can install WorkTimeUtil
using Homebrew by running:
brew tap emanuelmairoll/homebrew-tap
brew install worktimeutil
WorkTimeUtil has three main commands: calculate
, push
, and config
.
Calculate working hours for a specific time period.
worktimeutil calculate [W|W<n>[/<yy>]|M|M<n>[/<yy>]]
Arguments:
W
: Current weekW<n>
: Week numbern
W<n>/<yy>
: Week numbern
of the yearyy
M
: Current monthM<n>
: Month numbern
M<n>/<yy>
: Month numbern
of the yearyy
There is also a shorthand provided:
wtc [W|W<n>[/<yy>]|M|M<n>[/<yy>]]
Push working hours to absence.io for a specific time period.
worktimeutil push [W|W<n>[/<yy>]|M|M<n>[/<yy>]]
Arguments are the same as for the calculate
command.
There is also a shorthand provided:
wtp [W|W<n>[/<yy>]|M|M<n>[/<yy>]]
Set configuration values.
worktimeutil config [key] [value]
key
: The configuration key to set (e.g.,absenceIOCreds
).value
: The value to set for the specified key.
You can set the following configuration values:
absenceIOCreds
: Set your absence.io API credentials in the format<ID>:<KEY>
. This is required for thepush
command.workHoursPerWeek
: Set your expected work hours per week. The default value is 38.5.removeLunchBreak
: Set totrue
to remove lunch break duration from working hour calculation, orfalse
to include it. The default value isfalse
.