dinkur

command module
v0.0.0-...-d280c18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

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).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
internal
console
Package console contains code to pretty-print different types to the console.
Package console contains code to pretty-print different types to the console.
fuzzytime
Package fuzzytime contains helper functions to parse times in a more fuzzy and natural manner, compared to the built-in time.Parse which only attempts a single format.
Package fuzzytime contains helper functions to parse times in a more fuzzy and natural manner, compared to the built-in time.Parse which only attempts a single format.
license
Package license contains license snippets that can be used to print the full GNU GPL license to the console, for example.
Package license contains license snippets that can be used to print the full GNU GPL license to the console, for example.
pflagutil
Package pflagutil contains helper types and functions for the spf13/pflag and spf13/cobra packages regarding flags.
Package pflagutil contains helper types and functions for the spf13/pflag and spf13/cobra packages regarding flags.
pkg
afkdetect
Package afkdetect contains code to detect if the user has gone AFK or returned from AFK.
Package afkdetect contains code to detect if the user has gone AFK or returned from AFK.
dbmodel
Package dbmodel contains the binding types used by GORM to map to the database tables and rows.
Package dbmodel contains the binding types used by GORM to map to the database tables and rows.
dinkur
Package dinkur contains abstractions and models used by multiple Dinkur client implementations.
Package dinkur contains abstractions and models used by multiple Dinkur client implementations.
dinkurclient
Package dinkurclient contains a Dinkur gRPC client implementation.
Package dinkurclient contains a Dinkur gRPC client implementation.
dinkurd
Package dinkurd contains a Dinkur gRPC API server daemon implementation.
Package dinkurd contains a Dinkur gRPC API server daemon implementation.
dinkurdb
Package dinkurdb contains a dinkur.Client implementation that targets an Sqlite3 database file.
Package dinkurdb contains a dinkur.Client implementation that targets an Sqlite3 database file.
timeutil
Package timeutil contains some types and functions to help work with times and time spans.
Package timeutil contains some types and functions to help work with times and time spans.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL