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

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.

Owner
Jan Heuermann
Freelance Software Developer & Consultant
Jan Heuermann
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.

  • 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
  • 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!
    
  • 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

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

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

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

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

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

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

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

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

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

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

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

Apr 20, 2022
Simple, seamless, lightweight time tracking for Git
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-

Dec 27, 2022
Simple time tracking CLI
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

Jan 8, 2023
An open-source GitLab command line tool bringing GitLab's cool features to your command line
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

Dec 30, 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

Dec 22, 2021
lsp is like ls command but more human-friendly
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,

Dec 12, 2022
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

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.

Dec 30, 2022
A command line tool for file downloads

A command line tool for file downloads

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

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

Command-line file downloader tool

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

Apr 15, 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

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────────────

Sep 6, 2022
git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
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

Dec 31, 2022