Skip to content

applejag/dinkur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dinkur icon

Dinkur

Task and time tracking CLI and framework.

REUSE status Codacy Badge

Install

Requires Go v1.20 (or higher)

$ go install -tags='fts5' -ldflags='-s -w' github.com/dinkur/dinkur@latest

The -tags='fts5' flag adds Sqlite FTS5 support, which is used for better and more performant full-text search.

The -ldflag='-s -w' removes debug symbols, reducing the binary size from about 34M down to 13M.

For you CLI-power users, we recommend aliasing it to u.

alias u=dinkur

CLI Autocompletion

Automatic generation of completions are powered by Cobra, which supports Bash, Zsh, Fish, and PowerShell.

Completions are provided by the completion subcommand. To get a more detailed guide on how to install them, run the following (where bash can be exchanged with zsh, fish, and powershell):

dinkur completion bash --help

Run daemon on boot (systemd)

Copy the dinkur.service file from the repo into your local user systemd unit store:

sudo cp dinkur.service /usr/local/lib/systemd/user/dinkur.service

Then enable it only for your user:

## Does not need sudo
systemctl --user enable dinkur --now

## Read logs, does not need sudo either
journalctl --user --unit dinkur --follow

## Try it out
dinkur --client=grpc status

Usage

$ u in Speedrun Minecraft
                ID  NAME                  START  END      DURATION
Started entry:  #1  `Speedrun Minecraft`  18:39  active…  -

$ u in Boil minute-rice
                ID  NAME                  START  END      DURATION
Stopped entry:  #1  `Speedrun Minecraft`  18:39  18:39    0:00:06
Started entry:  #2  `Boil minute-rice`    18:39  active…  -

$ u out
                ID  NAME                START  END    DURATION
Stopped entry:  #2  `Boil minute-rice`  18:39  18:40  0:01:01

$ u list
  ID  NAME                  DAY     START  END    DURATION
  #1  `Speedrun Minecraft`  Jan-20  18:39  18:39  0:00:06
  #2  `Boil minute-rice`    -       18:39  18:40  0:01:01

  -   TOTAL: 2 entries      -       18:39  18:40  0:01:07

Full documentation can be found at docs/cmd/dinkur.md.

Contributing

Read how to contribute over at CONTRIBUTING.md, including how to set up your development environment, if you so feel inclined.

Inspiration sources

Project License? CLI? GUI? Sync? AFK detect? OS?
Grindstone Proprietary ($) (Windows) Windows, Android, iOS
𝑓𝑓 FOSS (GPLv3) Linux, Mac, Android
timetrap OSS (MIT) Windows, Linux, Mac

No code is taken from the above projects. However, they all have some distinct features each that I'm greatly inspired by and have implemented into Dinkur.

License

This repository is created and maintained by Kalle Fagerberg (@jilleJr).

The code in this project is licensed under GNU General Public License v3.0 or later (LICENSES/GPL-3.0-or-later.txt), and documentation is licensed under Creative Commons Attribution 4.0 International (LICENSES/CC-BY-4.0.txt).