A command-line tool application programmed with Go to track working times.
The command-line tool allows recording working times. One record of a task consists of the following data:
- starting time
- text
- list of tags
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.
There are two ways to install the application. For both, a Go installation is necessary.
If you have Go – preferably the latest version – installed, you can build and install the executable yourself:
$ go install github.com/drademann/[email protected]
Replace the version with the version you want to install. Use the latest stable version (see above), or a specific one from this list of version tags. Use the latest beta version to test new features early at your own risk.
You may also clone this Git Repository.
The main branch represents the latest release, and uses tags to like v1.2.3
to mark version commits.
Then, within the cloned repository folder, run
$ go install
and Go will compile and install the executable for you.
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.23 |
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 an argument accept different formats:
Format | Description | Example |
---|---|---|
HH:MM | timestamp with colon | 10:30 9:42 |
HHMM | without colon | 1030 942 |
The list
command lists previously recorded tasks.
$ haora list
--tags-per-day
/-t
--tags-per-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 on the previous Monday compared to the given date.
The add
command adds another task to the selected day.
$ haora add 10:00 haora some programming
This adds a task
- at 10:00
- with the text "some programming"
- and the tag "haora"
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"
A 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.
The edit
command allows updating an existing task entry.
The task to edit is chosen by its start time.
Anything not set won't be changed.
Unlike the use of the add
command, all flags to update must be set explicitly.
All plain arguments are added to the text flag (-x
).
$ haora edit -u 09:30 -s 10:00 -t programming -x "some more Go code"
$ haora edit -u 10:00 -x "was Kotlin code"
--update 10:00
Mandatory flag to select the task to update by its current starting time.
--start 09:30
New starting time (optional).
--tags project-b
New tags (optional).
--text "did something else"
New text (optional).
Removes a task of a day. The starting timestamp identifies the task to remove.
$ 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
defaultPause: "45m"
view:
hiddenWeekdays: sa so
When the file is not present, the default values are used.
times.durationPerWeek
Sets the desired amount of working hours for each week.
Minutes may be added as well, like "38h 30m"
.
Default: "40h"
times.daysPerWeek
Defines the number of workdays for a week. This determines the desired amount of working hours per day.
Default: 5
times.defaultPause
Optionally, sets the default pause duration. This duration will be added to the suggested finish time as long as the actual total pause duration of the day is less than the default one. If no default pause duration is set, then only the actual total pause duration will be added.
A little asterisk *
is show at the suggested finish time
whenever the default pause duration is used.
Hidden weekdays
view.hiddenWeekdays
Defines weekdays that shouldn't be displayed. Possible values, separated by space:
- mo
- tu
- we
- th
- fr
- sa
- su
Example:
times:
hiddenWeekdays: sa su
Default: none set, all displayed