#Recipe Formatting
My own version of how recipes should be formatted.
###The Idea
The formatting is yaml-inspired and based on expressions
and makefiles. The idea is a recipe is a collection of
operations that require some input, either the output of
previous operations or bare ingredients. For example
spaghetti
should require pasta
and sauce
before
it's done. The operation would be mix
. So you might say
spaghetti = mix (pasta, sauce)
or
spaghetti = pasta + sauce
This is the idea.
The actual formatting would be for the examples above would be
spaghetti
+mix
.5 min
-pasta
.1 box
-sauce
.15 oz
Or maybe you want spaghetti from scratch
spaghetti
+mix
.time 1min
pasta
+boil
.8 min
.description 'Boil till aldente'
-spaghetti noodles
.1 box
sauce
+saute
.25 min
.setting medium
+smash
.10 min
-tomatoes
.1 lb
+mix
.10 min
-oregano
.4 tbl
-salt
.1 tbl
-pepper
.1 tbl
From this it's easy to see recipes are built out of operations and ingrediants with specified attributes.
Operations are denoted on a new line by one of the key words underneath them should be all the parameters as well as the input ingredients, which can either be the output of other operations or bare ingredients. Key points:
- All operations are prefixed with a
+
. - All operations must have a .time attribute (see attributes below)
- Some operations require extra attributes
####List Here are the operations in the format
+operation
: .attribute
,[.optional_attribute]
,...
Note that the .time
attribute is required, so it is best
to put it first and then it doesn't need the '.time' prefix
(see examples above).
+bake
:.time
(1m/30s/2h),.temp
(450f/300c)+broil
:.time
,.setting
(low/medium/high)+mix
:.time
,[.tool]
(whisk/smash/hands/light),[.container]
(bucket)+saute
:.time
,.setting
+fry
:.time
,.setting
+cut
:.time
,[.pieces]
(3/5/119)+slice
:.time
,[.size]
(2in),[.pieces]
+chop
:.time
,[.size]
+drain
:.time
+grate
:.time
,[.size]
+nuke
:.time
,.setting
Ingredients are denoted on a new line by the plain
description of the item. The .quantity
attribute
follows same rules as the .time
for operations.
There is an exception. The first line of any recipe should be the outcome or description. Also any components should be labeled with a description or title. This follows the recursive nature of a recipe and its components.
Ingrediants can also have the .random
attribute
which should be a number between 0
and 100
.
This represents how this ingredient should be
randomized on recipe generation. A 0
should give
fairly consistent results. A 100
means onion
might
turn into raw steak
.
ingrediant_description
.quantity
.attribute
.attribute
[.random]
Self explanatory. The main thing is probably the unit conventions. Some examples are below. See the parser for any other questions.
.time
2m
: 2 minutes2s
: 2 seconds2h
: 2 hours2d
: 2 days2w
: 2 weeks2h 2m
: 2 hours and 2 minutes3.7h
: 3.7 hours
.temp
250
: 250 degrees Fahrenheit250f
: same as250
250c
: 250 degrees Celsius
.setting
low
: lowmedium
: mediumhigh
: high
.size
and .quantity
1in^3
: 1 inch cube2cm
: 2 centimetres7mm
: 7 millimetres1tbl
: one tablespoon