Compare commits
No commits in common. "a5322ab1d8f4cc26ea5fc37d50f013326752c31d" and "7f52bb4c72274415cb471d34a25de05eb110bc64" have entirely different histories.
a5322ab1d8
...
7f52bb4c72
12
README.md
12
README.md
|
@ -4,16 +4,14 @@ This script depends on `bc`.
|
||||||
|
|
||||||
### Help
|
### Help
|
||||||
```
|
```
|
||||||
Usage: ./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|") ]
|
Usage: ./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <flour weight>g|<pan diameter>(in|inch|") ]
|
||||||
./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]
|
./pizza.sh [ -h ]
|
||||||
./pizza.sh -h
|
./pizza.sh [ -r ]
|
||||||
./pizza.sh -r [ -v <variation> ]
|
|
||||||
Options:
|
Options:
|
||||||
-h Print this help
|
-h Print this help
|
||||||
-r Print the recipe
|
-r Print the recipe
|
||||||
-f <N> Set flour per square inch (default: 2.122)
|
-f <N> Set flour per square inch
|
||||||
-v <variation> Set variation (default: standmixer)
|
-R <recipe> Set recipe
|
||||||
-R <recipe> Set recipe (default: quick)
|
|
||||||
Notes:
|
Notes:
|
||||||
The dough can be kept overnight in the refidgerator if needed
|
The dough can be kept overnight in the refidgerator if needed
|
||||||
Water may also be used in place of beer
|
Water may also be used in place of beer
|
||||||
|
|
28
pizza.sh
28
pizza.sh
|
@ -1,22 +1,20 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
PWD="$(dirname "$(readlink -f "$0")")" # find the pizza working directory
|
PWD="$(dirname "$(readlink -f "$0")")" # find the pizza working directory
|
||||||
RECIPE="${RECIPE:-quick}"
|
RECIPE=${RECIPE:-quick}
|
||||||
VARIATION="${VARIATION:-standmixer}"
|
VARIATION=${VARIATION:-standmixer}
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
function pizzahelp { # this only prints help text
|
function pizzahelp { # this only prints help text
|
||||||
echo "Pizza Calculator: The pizza script you never asked for"
|
echo "Pizza Calculator: The pizza script you never asked for"
|
||||||
echo
|
echo
|
||||||
echo "Usage: $0 [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|\") ]"
|
echo "Usage: $0 [ -f <N> ] [ -R <recipe> ] [ <flour weight>g|<pan diameter>(in|inch|\") ]"
|
||||||
echo " $0 [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]"
|
echo " $0 [ -h ]"
|
||||||
echo " $0 -h"
|
echo " $0 [ -r ]"
|
||||||
echo " $0 -r [ -v <variation> ]"
|
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -h Print this help"
|
echo " -h Print this help"
|
||||||
echo " -r Print the recipe"
|
echo " -r Print the recipe"
|
||||||
echo " -f <N> Set flour per square inch (default: 2.122)"
|
echo " -f <N> Set flour per square inch"
|
||||||
echo " -v <variation> Set variation (default: standmixer)"
|
echo " -R <recipe> Set recipe"
|
||||||
echo " -R <recipe> Set recipe (default: quick)"
|
|
||||||
echo "Notes:"
|
echo "Notes:"
|
||||||
echo " The dough can be kept overnight in the refidgerator if needed"
|
echo " The dough can be kept overnight in the refidgerator if needed"
|
||||||
echo " Water may also be used in place of beer"
|
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'
|
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
|
case $option in
|
||||||
h)
|
h)
|
||||||
pizzahelp
|
pizzahelp
|
||||||
|
@ -39,11 +37,11 @@ while getopts ":hrv:R:f:" option; do # loop through options, casing them
|
||||||
pizzarecipe
|
pizzarecipe
|
||||||
exit;;
|
exit;;
|
||||||
f) # the end result of changing this is to alter crust thickness
|
f) # the end result of changing this is to alter crust thickness
|
||||||
FSI="$OPTARG";;
|
FSI=$OPTARG;;
|
||||||
v) # change variation (usually between hand and standmixer)
|
v) # change variation (usually between hand and standmixer)
|
||||||
VARIATION="$OPTARG";;
|
VARIATION=$OPTARG;;
|
||||||
R) # change dough recipe
|
R) # change dough recipe
|
||||||
RECIPE="$OPTARG";;
|
RECIPE=$OPTARG;;
|
||||||
\?)
|
\?)
|
||||||
echo "Error: Invalid option"
|
echo "Error: Invalid option"
|
||||||
exit;;
|
exit;;
|
||||||
|
@ -52,9 +50,9 @@ done
|
||||||
shift $((OPTIND-1)) # shift options out from infront of the command to leave only arugment in $@
|
shift $((OPTIND-1)) # shift options out from infront of the command to leave only arugment in $@
|
||||||
|
|
||||||
function panarea {
|
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
|
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
|
arraytio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
pizza.txt
11
pizza.txt
|
@ -41,13 +41,4 @@ sugar 0.049
|
||||||
yeast 0.0018
|
yeast 0.0018
|
||||||
oil 0.0625
|
oil 0.0625
|
||||||
|
|
||||||
[long:instructions:standmixer]
|
# 2.12206590789g of flour/square inch
|
||||||
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
|
|
||||||
|
|
Loading…
Reference in New Issue