Calorie tracker
Branch: master
Clone or download
Latest commit fb947a2 Feb 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
doc
lib tighten up signatures Oct 31, 2018
t implement sum total macros Jun 1, 2018
.gitignore
.hgignore
.travis.yml
META6.json add X::Sustenance to META6.json Jun 3, 2018
README.md s/Perl6/Perl 6 Feb 8, 2019
UNLICENSE Initial import May 31, 2018

README.md

Sustenance

Calorie tracker

Synopsis

In sustenance.toml:

# pantry
[[food]]
name = 'oats'
serving-size = '1 cup'
calories = 360
protein = 14
carbs = 58
fat = 6

# meals
[[meal]]
date = 2018-05-31
time = 10:15:00

  [[meal.portion]]
  food = 'oats'
  servings = 1.5

cli:

export PERL6LIB=lib
bin/sustenance --date=2018-05-31 gen-macros sustenance.toml

perl6:

use Sustenance;
Sustenance.new(:file<sustenance.toml>).gen-macros;

Description

Analyzes caloric intake from Sustenance TOML log.

Sustenance TOML log should be formatted per the synopsis. Sustenance TOML log must consist of at least one food entry and at least one meal entry.

Each food entry must have:

key type
name string
serving-size string
calories number
protein number
carbs number
fat number

Each meal entry must have:

key type
date date
time time
portion array of hashes

Each meal portion must have:

key type
food string
servings number

Installation

Dependencies

Licensing

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.