A CLI application programmed with Go to track working times.
With different commands, the CLI allows recording working times. One record (task) consists of
To end the work for a day a finish timestamp can be set, see the finish
command.
The list
command shows the tasks of a day, optionally the sums per tag.
With the --week
option it shows all start and end times of a week.
--date
-d
Set the date any following command will work with. If this flag is not specified, Haora will assume today. Different date formats are allowed:
Format | Description | Example |
---|---|---|
DD.MM.YYYY DD.MM.YY |
a specific date | 9.3.2024 24.12.2023 |
DD.MM. DD.MM |
a date within the current year | 9.3. 24.12 |
DD. DD |
a day within the current month and year | 9. 24 |
WW | the previous weekday (selects the first date prior to today with the given weekday) |
mo, tu, we, th, fr, sa, su |
YD | yesterday | y, yd, ye, yes, yesterday |
Commands that take a timestamp as argument accept different formats:
Format | Description | Example |
---|---|---|
HH:MM | timestamp with semicolon | 10:30 9:42 |
HHMM | without semicolon | 1030 942 |
The list
command lists previously recorded tasks.
$ haora list
--tags [day|month]
List the working hours per tag.
The totals collect the tags of either a day
or a month
based on the given global date.
--week
List the start and end timestamps of a week. The week always starts at the previous monday compared to the given date.
The add
command adds another task to the selected day.
The simplest way is to use the command without any flag:
$ haora add 10:00 haora some programming
This will add a task
Using a timestamp that is already set on another task will update that task.
--start 10:00
or -s 10:00
To explicitly set a starting timestamp for the task.
--tags "haora,go"
Specific flag to set multiple tags.
The pause
command adds a pause to the selected day.
$ haora pause 12:00 Lunch
No tags are used for a pause, but a text may be set.
--start 12:00
or -s 12:00
To explicitly set a starting timestamp for the pause.
Removes a task of a day. The task is identified by its starting timestamp, like
$ haora remove 10:00
It may also remove a pause, which is nothing less than a task marked as pause.
Closes the day and sets a finish timestamp.
$ haora finish 17:00
--end 17:00
or -e 17:00
To explicitly set a finish time.
--remove
To remove an already set finish time.
Print the current version of Haora.
Haora uses a configuration file read from ~/.haora/config.yaml
.
This JSON file has the following format:
times:
durationPerWeek: "32h"
daysPerWeek: 5
When the file is not present, the default values are used.
Sets the desired number of working hours per week.
Minutes may be added as well, like "38h 30m"
.
Default: "40h"
Sets the number of workdays in a week. This determines the desired number of working hours per day.
Default: 5
To get the latest greatest version of haora, it may be built from scratch:
Checkout this repository, ensure you are on the main
branch (the current production branch), have Go installed, and
run
$ go install
It will install haora
within your Go bin
folder. That's it.