dmp1ce / calorie-counter

Example of using Dhall with a simple cli to count calories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

calorie-counter

Example of using Dhall with a simple command line interface for counting calories.

Usage

$ stack build

$ stack exec -- calorie-counter-exe --help
hello - a test for optparse-applicative

Usage: calorie-counter-exe FILE [-d|--debug] [-l|--lifeograph]
  Print a greeting for TARGET

Available options:
  FILE                     Meal log file
  -d,--debug               Print debug output
  -l,--lifeograph          Print in lifeograph log format
  -h,--help                Show this help text
$ stack exec -- calorie-counter-exe -l ./dhall/import/meal1.dhall
Lifeograph journal output:

Meal 1
:mushroom:=10
:brussels_sprout:=20
:green_onion:=1
:celery:=1
:mushroom:=40

:meal_total_gram:=72
:meal_total_calorie:=23

About

Example of using Dhall with a simple cli to count calories

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Dhall 51.3%Language:Haskell 48.7%