Skip to content

simple ruby script for recording command-line daily health metrics

License

Notifications You must be signed in to change notification settings

jdowd/health-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HealthLog

A quick and dirty ruby script to make it easy to quickly log daily health metrics. You are what you track, or something like that.

Usage

To record a new entry type "health" in your terminal.

It's even easier with Alfred: Just type "> health" in the Alfred search bar, and it will open Terminal with that command.

An entry like this:

w: 200.3 s: 7hrs bl: 4 x: 20min on the rower dq: good, except for a candy bar
dv: overate at lunch c: travelling and got hungry in airport :( 

will be interpreted as:

2016-05-15:
  weight: 200.3
  sleep: 7hrs
  belt loop: 4
  exercise: 20min on the rower
  diet-quality: good, except for a candy bar
  diet-volume: overate at lunch
  comment: travelling and got hungry in airport :(

Your entries will be saved in history.yml in the repo (gitignored).

After the summary of your last n days, health will output a bar graph showing the distance from your target weight for each of the last n days.

Optional arguments

There are a couple of optional arguments you can pass to health:

  • Any integer will change the default 7 day report to your preference. health 3 will return the last 3 days, for example.
  • health t won't ask for an entry, and will just report today's data.
  • health r won't ask for an entry, and will just report data for the default or specified duration.

Installation

  • clone the repo locally
  • cd into repo
  • set up your keyword tokens:
    • cp test_config.yml config.yml
    • make any edits to config.yml you'd like
  • add your target weight
    • modify config.yml to add your target weight
  • add the executable script:
    • chmod +x health_log
    • ln -s $PWD/health_log /usr/local/bin/health

Road map

Lots of stuff to add, but this is not a super high priority atm.

Contributing

PRs welcomed! There's a minimal test suite, please add tests for any new features.

About

simple ruby script for recording command-line daily health metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages