13 Custom Recipes
ida schmidt edited this page 2023-09-12 06:30:04 +00:00

Creating Custom Recipes

The name doesn't really imply it, but the pizza calculator can made to calculate nearly any baking recipe measured by weight with a few one time calculations. Though, since "flour" doesn't necessarily have to be "flour", there's compatablities for other cooking recipes too. The program can read a user configuration file (placed in ${XDG_CONFIG_HOME}/pizzacalc/conf) that extends the default pizza.txt.

Getting it working

The formatting for each recipe must follow a few rules:

  • the recipe must start with recipe name and "ratios", delimited by colons, enclosed in brackets;
  • recipe names must not include whitespace;
  • ingredients are quantified in bakers ratios;
  • both ingredients and their ratios must be seperated by one or more tabs;
  • the first entry must be the amount of flour in grams per square inch of pan (finding this value for free standing rounds may require some expirementation); and
  • there must be an empty line following the recipe.

This leaves us with a recipe template looking something like:

[<recipe name>:ratios]
fsi                <recipe's default flour per square inch>
<ingredient>       <ratio to flour>
<ingredient>       <ratio to flour>
<...>

(Where the option -r is used to select <recipe name>.) Typically you would have flour as the second entry with it's ratio being simply 1.

What about the instructions?

While you're likely elbows deep in the recipe you're adapting anyway and can get the instructions other ways, they can be added to the recipes that can be printed with option -i (given youve specified your custom recipe through -r beforehand). The formatting this for optional section has the just these requirements:

  • the recipe must start with recipe name, "instructions", and (optionally) the variation, delimited by colons, enclosed in brackets;
  • recipe names must not include whitespace; and
  • there must be an empty line following the recipe.

And that gives us the template:

[<recipe name>:instructions]
<your>
<instructions>
<here>
<...>

or with the variation

[<recipe name>:instructions:<variation>]
<your>
<instructions>
<here>
<...>

(Where variation is specified with option -v.)