Compare commits

..

No commits in common. "a5322ab1d8f4cc26ea5fc37d50f013326752c31d" and "7f52bb4c72274415cb471d34a25de05eb110bc64" have entirely different histories.

3 changed files with 19 additions and 32 deletions

View File

@ -4,16 +4,14 @@ This script depends on `bc`.
### Help
```
Usage: ./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|") ]
./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]
./pizza.sh -h
./pizza.sh -r [ -v <variation> ]
Usage: ./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <flour weight>g|<pan diameter>(in|inch|") ]
./pizza.sh [ -h ]
./pizza.sh [ -r ]
Options:
-h Print this help
-r Print the recipe
-f <N> Set flour per square inch (default: 2.122)
-v <variation> Set variation (default: standmixer)
-R <recipe> Set recipe (default: quick)
-f <N> Set flour per square inch
-R <recipe> Set recipe
Notes:
The dough can be kept overnight in the refidgerator if needed
Water may also be used in place of beer

View File

@ -1,22 +1,20 @@
#!/usr/bin/env bash
PWD="$(dirname "$(readlink -f "$0")")" # find the pizza working directory
RECIPE="${RECIPE:-quick}"
VARIATION="${VARIATION:-standmixer}"
RECIPE=${RECIPE:-quick}
VARIATION=${VARIATION:-standmixer}
shopt -s extglob
function pizzahelp { # this only prints help text
echo "Pizza Calculator: The pizza script you never asked for"
echo
echo "Usage: $0 [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|\") ]"
echo " $0 [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]"
echo " $0 -h"
echo " $0 -r [ -v <variation> ]"
echo "Usage: $0 [ -f <N> ] [ -R <recipe> ] [ <flour weight>g|<pan diameter>(in|inch|\") ]"
echo " $0 [ -h ]"
echo " $0 [ -r ]"
echo "Options:"
echo " -h Print this help"
echo " -r Print the recipe"
echo " -f <N> Set flour per square inch (default: 2.122)"
echo " -v <variation> Set variation (default: standmixer)"
echo " -R <recipe> Set recipe (default: quick)"
echo " -f <N> Set flour per square inch"
echo " -R <recipe> Set recipe"
echo "Notes:"
echo " The dough can be kept overnight in the refidgerator if needed"
echo " Water may also be used in place of beer"
@ -30,7 +28,7 @@ function pizzarecipe {
sed -n "/\[$RECIPE:instructions:$VARIATION\]/,/^$/p" "$PWD/pizza.txt" | sed '/\[*.\]/d'
}
while getopts ":hrv:R:f:" option; do # loop through options, casing them
while getopts ":hrR:f:" option; do # loop through options, casing them
case $option in
h)
pizzahelp
@ -39,11 +37,11 @@ while getopts ":hrv:R:f:" option; do # loop through options, casing them
pizzarecipe
exit;;
f) # the end result of changing this is to alter crust thickness
FSI="$OPTARG";;
FSI=$OPTARG;;
v) # change variation (usually between hand and standmixer)
VARIATION="$OPTARG";;
VARIATION=$OPTARG;;
R) # change dough recipe
RECIPE="$OPTARG";;
RECIPE=$OPTARG;;
\?)
echo "Error: Invalid option"
exit;;
@ -52,9 +50,9 @@ done
shift $((OPTIND-1)) # shift options out from infront of the command to leave only arugment in $@
function panarea {
FSI="${FSI:-2.12206590789}" # default grams of Flour per Square Inch of pan, fairly neopolitan
FSI=${FSI:-2.12206590789} # default grams of Flour per Square Inch of pan, fairly neopolitan
AREA=$(echo "3.1415926535*($DIAM/2)^2" | bc -l) # bc cant exponentiate non-integer bases without -l
SIZE=$(echo $AREA*"$FSI" | bc)
SIZE=$(echo $AREA*$FSI | bc)
arraytio
}

View File

@ -41,13 +41,4 @@ sugar 0.049
yeast 0.0018
oil 0.0625
[long:instructions:standmixer]
1: combine oil, water, sugar, and salt in mixing bowl
2: add flour and yeast
3: mix for 10 minutes
4: transfer to oversize bowl for rising
5: rise for 3 days in refrigerator
6: turn onto, then shape to pan
7: rise for 10 minutes
8: add sauce, toppings
9: bake at 550f until done
# 2.12206590789g of flour/square inch