Monitor our on-going decay.

Sacha Ligthert b9d2bb027f gitea=>gogs 6 hodín pred
.gitignore d29d658d72 Added a buildscript. 2 rokov pred
README.md 4faefb742b Update README for the next release. 2 rokov pred
build.sh d29d658d72 Added a buildscript. 2 rokov pred
go.mod 4e60a3d5e5 Initial Commit -- I am a noob 3 rokov pred
tp.go b9d2bb027f gitea=>gogs 6 hodín pred
tp_test.go 70fe89228d Make test of all the fixed value functions 3 rokov pred

README.md

TimePercentage

by Sacha Ligthert 2022, Amsterdam

Goal

Print the current day and year in percentages along with a bar for visual reference.

For example. This was taken at 20:05 on 15th of December 2022:

▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░░░░░░░ 83.7354816%
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░ 95.5718780%

This is goes great with Conky and it allows you to display this on your desktop. As the past grows larger and times keeps ebbing away, this tool allows you to track this.

Usage

$ ./timepercentage.linux-amd64 --help
Usage of ./timepercentage.linux-amd64:
  -custom
    	Display a custom range
  -custom-start string
    	Start of the custom range
  -custom-stop string
    	Start of the custom range
  -day
    	Display progress of the day. (default true)
  -year
    	Display progress of this year. (default true)

By default the tool prints the progress of the day and the year. A custom and optional date range can be specified by using the custom, custom-start, and custom-stop program flags. For example:

$ ./timepercentage.linux-amd64 --day=false --year=false --custom=true --custom-start="1990-01-01T12:00:00+01:00" --custom-stop="2030-01-01T12:00:00+01:00"
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░░░░░░ 84.8765436%

The start and stop times have to be specified in the RFC3339 format.

Building

Checking out this repo and running go build should do this for you. Or run build.sh to build for other platforms.