Command line tool for time tracking in a human-readable file format.

Overview

klog logp

klog

klog is a plain-text file format and a command line tool for time tracking.

📕 DocumentationLearn how to use klog

📥 Download – Get the latest version

📢 Changelog – See what’s new

💡 Specification – Understand the file format in-depth

Contribute

If you have questions, feature ideas, or just want to bounce off some feedback feel invited to start a discussion. In case you run into a bug please file an issue. (When in doubt just go for an issue.)

This repository contains the sources of the command line tool as well as the specification of the klog file format. Note, that the version numbers of both are independent of each other.

About

klog is free and open-source software distributed under the MIT license.

Comments
  • Shell completion

    Shell completion

    I would like a command that writes a completion script for any supported $SHELL to stdout.

    For example, to enable completion for klog commands in Bash, one would source the output of klog completion bash:

    echo '. <(klog completion bash)' >>~/.bashrc
    

    If there is interest, I can implement. I think that Cobra automatically generates shell completion.

    ENHANCEMENT 
    opened by chairmank 17
  • Feature request: configuration; default values; creating records via CLI; negative ranges

    Feature request: configuration; default values; creating records via CLI; negative ranges

    I've taken the time to test the release candiate and read the guide and specifications. I really like it, good job! My main use case would be to track my working time, especially overtime. To make this as convenient as possible, I'd be really happy to have the following features:

    • a config file mechanism: maybe a user global file like ~/.klogconf. In this file I'd like to put a default directory where I keep all my records and my default "should value" and maybe addtional settings. There could even be a mechanism that looks in the local directory for a local config first, should that be necessary
    • the ability to create records/entries via the cli:
      • something like klog in to create an entry with the default "should value", date, current time and open ended entry, maybe a default tag from the config (also an option to add or omit certain values). Ideally this would automatically choose the right file, like one file for each month in the configured directory.
      • also klog out to create the corresponding value that "closes" the previous klog in
    • nice to have: allow negative ranges such as -(08:00-09:30) to be the same as -1h30m
    ENHANCEMENT 
    opened by wAuner 15
  • Windows: don’t require admin/dev-mode for `bookmark set`

    Windows: don’t require admin/dev-mode for `bookmark set`

    I've added klog to my PATH and tried few commands. I can operate the logs, print them etc but the bookmark feature did not work. I'd love to provide further details but the error received is just that plain.

    C:\_clienti>klog bookmark set timelog.klog
    Error: Failed to create bookmark
    
    
    C:\_clienti>klog version
    Command line tool: v2.2  [0bb0d83]
    File format: version 1 (RFC)
    
    Checking for newer version...
    You already have the latest version!
    
    ENHANCEMENT 
    opened by maxiride 14
  • Support multiple lines for entry summaries

    Support multiple lines for entry summaries

    In record summaries (the text directly underneath the date) you can write multiple lines, but in entry summaries (the text behind the time values) you are restricted to a single line.

    klog should support multiple lines for the entry summaries as well, by making use of the indentation. That allows for more flexibility.

    As an example:

    2020-02-02
        4h Today I finally answered all my
           unread emails, yay
        1h Reading
    

    This requires a change of the spec, though, so I want to wait until v1.0 of the file format is finalised.

    This issue came out of https://github.com/jotaen/klog/discussions/50

    ENHANCEMENT 
    opened by jotaen 11
  • Additional shortcut flags for filtering by current week, month, etc.

    Additional shortcut flags for filtering by current week, month, etc.

    Hey, I think you it could be handy to have filter aliases similar to today and yesterday for weeks and months. Something like thisweek, lastweek, thismonth and lastmonth.

    ENHANCEMENT 
    opened by JaPyR 10
  • Part of time period

    Part of time period

    This is more of a question than a suggestion.

    At my workplace I need to keep track of two things:

    • the time period I am at the workplace (when I get there, and when I leave)
    • the time I spend with specific projects

    Usually, I do a multitude of things for my department. But sometimes I get assigned to a project where we bill for the time we spent on that project.

    What I want to do is to write down an entry when I get to work and when I leave. Then I'd like to make an entry for the time spend with the project, which would be a "part" of that time. At the end of the month I'd like to summarize the total of hours spent with that project.

    The only way I think I could do this as of right now would be:

    2021-03-26
      08:00 - 17:00
      -1h lunch
      4h20m #foo
      -4h20m
    

    This will give that I worked 8 hours that day, and when I summarize #foo, it would give 4h20m. Is there an best practice to do what I want?

    (If this was to be some additional feature to the language, I have no idea how that would work.)

    opened by vladdeSV 10
  • Add information about overtime

    Add information about overtime

    I noticed something that I'm really missing: The sum of my overtime -not including- the current time. For example for klog now -d

                Today    Overall
    Total          2m    165h27m
    Should        8h!      168h!
    Diff       -7h58m     -2h33m
    E.T.A.      1:31>      20:06
    

    I wish there was maybe a first line which would tell me what's the total of my overtime without taking the current time into account (or assuming I fulfill my should time today). Not sure how to best name and display it, but I think that's very important.

    ENHANCEMENT 
    opened by wAuner 10
  • JSON “API” to allow custom integrations

    JSON “API” to allow custom integrations

    For macOS there is a great productivity tool called alfred. Once the core functionality of klog has matured, I think it would be cool to add an alfred integration. If I find the time, I‘d be happy to help with that. All that should be needed would probably be an option that returns the output as json.

    This way mac users could call klog from anywhere instantly without opening the terminal.

    ENHANCEMENT 
    opened by wAuner 9
  • Specification clarifications

    Specification clarifications

    I have been reading through the specification, and I believe there are a few things which needs further clarifications.

    I. Records

    Summary

    It MUST be separated from the entry one “space”

    Incorrect wording, I believe.

    Range

    There MUST be a - between the two values, which MAY be surrounded by one “space” on each side.

    Ambigious. Can there be ...

    • ... multiple spaces?
    • ... spaces on just one side?

    klog currently actually accepts ranges in the format of 00:00 -01:11

    The ? MAY be written in repeatedly, e.g. ???.

    Incorrect wording. Maybe use "in a recurring succession"?

    Duration

    I would very much like to see a clarification that the minute part cannot be greater than 59, if it is in combination with an hour part. I assume this is the intended behaviour, since klog throws an error if the minutes are greater than 60. However, surprisingly it actually accepts 1h60m and interprets that as 2h. I believe this is a bug with the program, but I might be wrong.

    II. Organizing records in files

    Subsequent records MUST be separated by one “blank line”; there MAY be additional blank lines.

    Contradictory. I interpret the first sentence as "must be separated by one and only one blank line". I wish for this to be clarified.

    opened by vladdeSV 9
  • Aggregate times by tags

    Aggregate times by tags

    The eval feature currently takes only one tag at a time. It will be helpful to list aggregates for all categories at the same time. eg:

    klog eval --tag=ALL
    
    # Output
    work  5h
    personal 6h
    client 3h
    
    ENHANCEMENT 
    opened by gantir 9
  • Unable to pipe data on Windows

    Unable to pipe data on Windows

    I am attempting to pipe output to klog.exe on Windows, version v2.2 [0bb0d83].

    In this example I receive the following error:

    $ cat .\time.klg | .\klog.exe total
    Error: No input given
    Please do one of the following:
        a) pass one or multiple file names as argument
        b) pipe file contents via stdin
        c) specify a bookmark to read from by default
    

    This was attempted using PowerShell 7 (Preview) and Git for Windows (bash) respectively.

    BUG 
    opened by vladdeSV 8
  • Make auto-extending behaviour of `klog pause` optional

    Make auto-extending behaviour of `klog pause` optional

    Consider the following record: (where Nov 8th were today’s date)

    2022-11-08
        8:00-?
        -30m break
    

    Currently, if you do klog pause --summary 'break', then it would keep adding to (or, mathematically speaking: subtracting from) the existing -30m entry. The reason is that the klog pause implicitly assumes that if there is already a pause entry with the same summary text, that you then want to extend that entry, rather than to append a new entry with the same summary text to the record.

    This behaviour might be a bit surprising, so it probably shouldn’t be the default behaviour. So it might be better if klog pause by default would always create a new entry, and only optionally extend an existing entry if you specify a certain flag, like --extend.

    ENHANCEMENT 
    opened by jotaen 0
Releases(v5.3)
Owner
Jan Heuermann
Freelance Software Developer & Consultant
Jan Heuermann
CLI tool (hcron) and Go library (cron) to convert CRON expression into human readable description.

cron cron is a Go library that parses a cron expression and outputs a human readable description of the cron schedule. For example, given the expressi

Quy Le 74 Nov 12, 2022
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

null 0 Nov 22, 2021
A command line utility that automagically replaces UNIX timestamps with human interpretable timestamps.

Unfy unfy is a command line utility that automagically identifies and translated UNIX timestamps (since epoch) to human readable timestamps. Example B

Jens Rantil 41 Oct 22, 2022
Hakuna Go: an unofficial CLI for the time-tracking tool Hakuna

Hakuna Go Hakuna Go is an unofficial CLI for the time-tracking tool Hakuna. Inst

Henning Dahlheim 3 Apr 25, 2022
A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

Vlad Plaiasu 7 Apr 20, 2022
Simple, seamless, lightweight time tracking for Git

Git Time Metric Seamless time tracking for all your Git projects $ gtm report -last-month $ gtm report -last-month -format summary $ gtm report -last-

Git Time Metric 916 Nov 21, 2022
Simple time tracking CLI

⏰ timetrace timetrace is a simple CLI for tracking your working time. Installation Homebrew brew tap dominikbraun/timetrace brew install timetrace Do

Dominik Braun 532 Nov 3, 2022
lsp is like ls command but more human-friendly

lsp: list files in a mildly human-frendlier manner lsp lists files, like ls command, but it does not attempt to meet that archaic POSIX specification,

Dmitry Borzov 510 Nov 13, 2022
An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Clement Sam 2.1k Nov 22, 2022
A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Venky 0 Dec 22, 2021
Command line tool for processing client transaction data in CSV format

command line tool for processing client transaction data in CSV format. thank you for looking! build instructions: $ git clone https://github.com/lnit

Luke Nittmann 0 Oct 29, 2021
This command line converts .webarchive file to resources embed .html file

webarchive-to-singlefile This command line converts Safari's .webarchive file to complete .html. Notice Only tested on MacOS. Google Chrome required.

会有猫的 5 Sep 2, 2022
Clirunner - Package clirunner runs a legacy shell-style CLI as if a human were running it.

clirunner Package clirunner runs a legacy shell-style command-line interpreter (CLI) as if a human were running it. A shell-style CLI offers a prompt

Jeff Regan 0 Jan 4, 2022
💾 A visual du(1) alternative for human beings

dux A disk usage analyzer. Like du(1), but displays the results as an interactive treemap. testdata 111B (8 files) (4) ┌testdata/ 111B────────────

Jens Green Olander 1 Sep 6, 2022
A command line tool for file downloads

A command line tool for file downloads

null 258 Jul 25, 2021
tfuzz is a command-line tool to fuzz some layer 7 OSI protocols with a template file

tfuzz tfuzz is a command-line tool to fuzz some layer 7 OSI protocols with a template file download the linux binary executable (or you can compile fr

Noob0x 3 Sep 29, 2021
Command-line file downloader tool

Command-line file downloader tool

Saddam H 42 Nov 9, 2022
Command-line tool for listening log file of game named as

Path of Exile Trade Notifier Command-line tool for listening log file of game named as "Path of Exile" and looking for buy message and send it to Tele

null 1 Apr 15, 2022
git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Gruntwork 685 Nov 21, 2022