bread-calculator
A ruby gem to calculate baker's percentages
Installation
gem install bread_calculator
or, if you want the latest and the greatest, or if you want the man page installed:
git clone https://github.com/nbirnel/bread-calculator
cd bread-calculator
rake install
(use sudo
as necessary)
Runtime Requirements
ruby >= 1.9.2
Build Requirements
rake
Developer Requirements
groff
Inspiration and History
Baker's percentages make baking easier, but I don't like to do the math.
License
© 2014 Noah Birnel MIT license
Man page
bread-calc
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
FORMATS
SEE ALSO
BUGS
LICENSE
NAME
bread-calc − calculate baker’s percentages
SYNOPSIS
bread-calc [OPTIONS] [FILE]
DESCRIPTION
bread-calc parses a nearly free-form bread recipe in file FILE, or from standard in. By default, the canonical representation of the recipe is printed to standard out. Optionally, the weight, or bakers percentage formula can be generated, or the recipe can by scaled up or down.
OPTIONS
--help Print a brief usage message.
--summary Print all baker’s percentages of the recipe. Over-rides --scale-by
--html Print recipe as html. Over-rides --weight or --scale-to.
--weight Print the weight of the recipe. Over-rides --html or --scale-to.
--scale-to WEIGHT Regenerate the recipe or summary to WEIGHT total weight. Over-rides --html or --weight.
--scale-by FACTOR. Regenerate the recipe, scaling up or down by FACTOR Over-rides --summary.
EXAMPLES
bread-calc --summary sample.recipe summarize a recipe
bread-calc --scale-by .5 --html sample.recipe > sample.html halve a recipe and render as html
FORMATS
The recipe format consists of a metadata prelude followed by steps.
In prelude lines, anything before a colon is considered to be the name of a metadata field; anything after the colon is a value to populate. Lines without colons are continuations of the ’notes’ field. I suggest having at least a ’name’ field.
A line starting with a hyphen ends the prelude and starts the first step.
Each step is delimited by one or more blank lines.
Any line in a step starting with a space or a blank is an ingredient, consisting of quantity, units, and the ingredient itself.
bread-calc makes a crude attempt to guess at the type of ingredient, but you can always force it by including one of the words ’flour’, ’liquid’, or ’additive’ in the line.
Here is a brief example (note that if you are reading this on github, you won’t see the indenting):
name: imaginary
bread
notes: This is a silly fake bread recipe
makes: 1 bad loaf
This line will become part of the notes
---------------------
Mix:
500 g flour
300 g water
Bake at 375°
SEE ALSO
ruby(1)
http://en.wikipedia.org/wiki/Baker%27s_percentage
http://rubygems.org/gems/bread_calculator
BUGS
It is cheerfully assumed that all units are grams.
It is undefined how ’liquid flour additive’ is parsed, but don’t expect anything sensible.
LICENSE
Copyright 2014 Noah Birnel
MIT License