NAME
foodratio - calculate ingredient ratios
SYNOPSIS
$ cat recipe
1 egg wet
2 water wet
4 flour dry
$ foodratio recipe
$ foodratio --ratio id:flour
$ foodratio --mass 55 --weigh group:wet
DESCRIPTION
Given a list of measurements of ingredients, foodratio will calculate the ratio between those various inputs, optionally using some ingredient (or group of ingredients) as the ratio key. The weights can be recalculated based on the measurement of a particular ingredient.
The input should be in columns, with the mass (or whatever measurement) as the first column. This must be a strictly positive number. If the second column contains %
it will be ignored, on the presumption that that is a ratio. Thus the name (id) of the ingredient will come from either the second or third column. The remainder of the columns, if any, will be treated as group names that collect ingredients into groups, e.g. a custom flour
group for recipes with different types of flour, or so forth.
Options
- mass positive-number
-
Sets the mass for the weigh method; ingredient measurements will be recalculated based on this amount.
- ratio key:value
-
Sets the ingredient or ingredient group to use as the key value for the ratio calculation, e.g. flour in a bread recipe and not the default total mass. key must be
id
orgroup
. - weigh key:value
-
Sets the ingredient or ingredient group to use as the basis for the mass argument, which by default is otherwise the total mass.
SEE ALSO
COPYRIGHT AND LICENSE
Copyright 2022 Jeremy Mates
This program is distributed under the (Revised) BSD License: https://opensource.org/licenses/BSD-3-Clause