Go to file
2023-09-21 23:06:21 +02:00
.gitignore purge history since March 2016 2019-01-01 19:18:13 +01:00
go.mod fix paths 2023-09-21 22:10:21 +02:00
hdiet.go fix paths 2023-09-21 22:10:21 +02:00
License purge history since March 2016 2019-01-01 19:18:13 +01:00
Makefile fix readme 2023-09-21 23:02:11 +02:00
plot_example.png purge history since March 2016 2019-01-01 19:18:13 +01:00
Readme.md fix readme again 2023-09-21 23:06:21 +02:00
weight_example.png purge history since March 2016 2019-01-01 19:18:13 +01:00

hdiet

hdiet is an adaptation of the Hacker's Diet computer tools for weight tracking.

The Hacker's Diet

"The Hacker's Diet" is an ingenious book by John Walker which applies a systems and signals view to bodyweight. If you haven't already, go read it.

Walker provides excellent online tools for tracking and Excel-/Palm-based tools for offline tracking. I'm not comfortable with either, though, and as it turns out, the calculations needed for trend calculation are simple.

build

You need go v1.20 or higher. Check the repository out wherever and run go build.

usage

Get a release or build hdiet yourself, then put it somewhere in your path

hdiet has the following commands:

  • init: initialize the directory (create an empty file '.hdiet' as marker for the program)
  • log: write today's weight to the log file
  • show: plot weight to image and display
  • calcdiet: calculate a planned diet

Weights are logged as plain text, each line consisting of YYYY-MM-DD tab WEIGHT. The same holds for a calculated diet.

The trend is displayed in red, the actual weight in blue. Red is what you should be looking at.

quick start

cd /path/to/your/log/folder
hdiet init
hdiet log 82.7

You will get a warning that you need at least 2 values the first time you log.

Example

Example of a filled weight log:

Example of a trend graph without calculated diet: