recipe-brainstorming

Jump to: navigation, search

Contents

Recipe Brainstorming

Towards a Recipe microformat. Please read the process before editing this page.


format-in-progress - #1 - september 2007

For the sake of clarity the format-in-progress from september 2007 was moved to recipe-brainstorming-archive. ThomasLoertsch 14:12, 11. Nov 2008 (CET)


format-in-progress - #2 - october 2008

Introduction

Recipe is based on examples and fields in existing formats. The recipe microformat is designed for the mark-up of instructions for creating meals, drinks or food-based items.

Please note that Format-In-Progress sections are intended to be edited to reflect the discussion that occurs on the microformats-new list, rather than being a free-form playground for schema. This Format-In-Progress was produced by ThomasLoertsch 15:29, 15. Oct 2008 (CET)

Changelog

This second Format-In-Progress reflects the discussions following the first one from september 2007 (see recipe-brainstorming-archive). It is not an entirely new format-in-progress proposal but rather an evolution from the september07-version and about 90% the same. A short overview of changes:

Root Class Name

To be decided. Likely ‘hRecipe’.

Property List

Class names author and photo are taken from hCard, published used from hAtom and item from measure.

Field Details

Title: The title of the recipe.

Summary: The summary provides a short introduction or an accompanying statement about the recipe.

Author: Author the person who authored the recipe.

Date published: The date the recipe was published.

Photo: Accompanying image.

Ingredients: Describes the ingredients used in the recipe.

Ingredient: Describes one ingredient used in the recipe.

Note: A note concerning an Ingredient or a Preparation Time element (for element Preparation Time see below).

Method: The method of the recipe.

Yield: Specifies the quantity produced by the recipe.

Preparation Time: The time it takes to prepare the meal described by the recipe.

Nutrition:

License: Specifies the license under which a recipe is published.

Example

<div class="hrecipe">
	<p class="recipe-title">Pommes Frites</p>
	<p class="recipe-summary">
		Pommes frites originate in outer space. They are served hot.<br />
		This recipe is only an example. Don't try this at home!
	</p>
	<p class="vcard fn">Thomas Loertsch</p>
	<p>Published <abbr class="published" title="2008-10-14T10:05:37-01:00">14. Oct 2008</abbr></p>
	<img src="/img/pommes.png" class="photo" width="100" height="100" alt="Pommes Frites"/>
	<p class="ingredient hmeasure">
		<span class="num">500</span> 
		<span class="unit">gramme</span>
		<span class="item">potatoes</span>,
		<span class="note">hard cooking</span>.
	</p>
	<ul class="method">
		<li>First wash the potatoes.</li>
		<li>Then slice and dice them and put them in boiling fat.</li>
		<li>After a few minutes take them out again.</li>
	</ul>
	<p>Enough for <span class="yield">12</span> children.</p>
	<p class="preparation-time hmeasure">Preparation time is approximately 
		<span class="num">90</span> 
		<abbr class="unit" title="minutes">min</abbr>.
	</p>
	<p class="preparation-time hmeasure">Add 
		<span class="num">5</span> 
		<abbr class="unit" title="minutes" >min</abbr> 
		for <span class="note">preparing the Ketchup</span>.
	</p>
	<p>This recipe is <a href="http://www.eut.de/tags/difficulty/easy" rel="tag">easy</a> and <a href="http://www.eut.de/tags/tastyness/delicious" rel="tag">delicious</a>.</p>
	<p class="nutrition hmeasure">
		Pommes Frites have more than 
		<span class="num">1000</span> 
		<span class="unit">Joule</span>
                <span class="type">Energy</span>.
	</p>
	<p>This recipe is licensed under <a href="http://creativecommons.org/licenses/by/2.0/" rel="license">CC by 2.0</a>.</p>
</div>

brainstorming

RecipeML-based Brainstorm

Excerpted from Conor Bandon's Blog entry and derived from The RecipeML Spec:

Cookcamp brainstorming

At CookCamp in February 2007, Tantek moderated a fairly free form discussion of how to publish/share recipes. Here is a photo of the whiteboard: 422072573_9956d93f61.jpg

To Do: OCR this and enter rough notes here...

Additional Suggestions

<ul class="ingredients"> <li>Booze <ul> <li>1 part <span class="name">Rum</span></li> </ul> </li> <li>Mixer <li>1 part <span class="name">Cola</span></li> <li>1 part <span class="name">Lime juice</span></li> </li> </ul> --Yde 13:09, 18 Apr 2008 (PDT)

<p class="method">Take <span class="ingredient"><span class="quantity">a handful</span>

of spinach</span> and fry it</p> --BenWard 13:20, 18 Apr 2008 (PDT)
I like to eat <span class="hRecipe"><span class="ingredient">cheese</span></span> for supper.

or simply (if the proposed "sub-microformat-pattern" is adopted):

I like to eat <span class="hRecipe-ingredient">cheese</span> for supper.
Andy Mabbett 08:16, 5 Jan 2008 (PST)

Calories

per serving. May be part of the measure microformat in future.

For the record: these are 3 possible encodings for nutrition. see abve for the final version

ThomasLoertsch 15:54, 11.Nov 2008 (CET)

In a private discussion TobyInkster enlightened me: The idea behind hmeasure is that it has four key components:

<div class="hrecipe">
   ...
   <p class="nutrition hmeasure">
     <span class="type">Energy</span>:
     <span class="num">1000</span>
     <span class="unit">J</span>
   </p>
   <p class="nutrition hmeasure">
     <span class="type">Dietary Fibre</span>:
     <span class="num">4</span>
     <span class="unit">g</span>
   </p>
</div>

ThomasLoertsch 16:01, 11.Nov 2008 (CET)

Note

The 'note' property is only useful in some rare cases and might not fit the 80-20 rule.

Optional

Instead of note I'd rather remove the optional property. Information about the optionality of an ingredient can easily be added in the note field, e.g. together with suggestions for a possible replacement. --ThomasLoertsch 12:59, 13.Oct 2008 (CET)

Method

For informally or concisely written recipes, the method is often left out. Could we either make this optional, or have an optimisation such that if the method is absent, the entire text of the recipe is taken to be the method. TobyInk 02:53, 15 Jul 2008 (PDT)

Preparation Time

Make preparation-time plural and add an optional preparation-time-note element inline to preparation time

There are often times additional to the main preparation time i.e. the time the dough needs to rise. When scanning a recipe for practicality - i.e. your guest are coming in 4 hours - this is a very important information. Allowing preparation-time to be used more than once per recipe and adding an optional note element would allow great flexibility in stating such details while staying simple. It could also be used to give times for different parts of a recipe like cake and topping or to differentiate times for preparation, waiting and cooking. --ThomasLoertsch 15:05, 01 Oct 2008 (CET)

Quantity

There are a lot of units typically used in recipes that do not make much sense in most other cases and therefor most likely will never make it into a 80/20-aware measure-microformat. This is a deliberatly short list:

note can be used to indicate more subtle differentiation (like a "big spoonful", "some leaves" etc). I think this list is both usefully short and complete. The following measures:

can be taken from the measure microformat. I guess measure is already stable enough that it's save to use these terms "experimentally". The measure-element should be optional. That way nobody is forced to select a value from it - it's just a help to facilitate interoperability. --ThomasLoertsch 15:45, 01 Oct 2008 (CET)

Proposed Optimisations

Item

Can we have this optimisation?... if no "item" is found, the entire ingredient is taken to be the item. TobyInk

Example:

<span class="ingredient">salt</span>

is a shorthand for:

<span class="ingredient"><span class="item">salt</span></span>

Ingredient List

TobyInk 03:42, 23 Mar 2008 (PDT):

If class="ingredients" (note: plural) is found on an element, class="ingredient" (note: singular) is automatically implied on all its children.

<ul class="ingredients">
<li><span class="quantity">3</span> <span class="item">eggs</span></li>
<li><span class="quantity">6 oz</span> <span class="item">self-raising flour</span></li>
<li><span class="quantity">6 oz</span> <span class="item">caster sugar</span></li>
<li><span class="quantity">6 oz</span> <span class="item">butter</span></li>
<li><span class="quantity">1 tsp</span> <span class="item">vanilla essence</span></li>
</ul>

is a shorthand for:

<ul class="ingredients">
<li class="ingredient"><span class="quantity">3</span> <span class="item">eggs</span></li>
<li class="ingredient"><span class="quantity">6 oz</span> <span class="item">self-raising flour</span></li>
<li class="ingredient"><span class="quantity">6 oz</span> <span class="item">caster sugar</span></li>
<li class="ingredient"><span class="quantity">6 oz</span> <span class="item">butter</span></li>
<li class="ingredient"><span class="quantity">1 tsp</span> <span class="item">vanilla essence</span></li>
</ul>

Problems with programatically marking up ingredients

While I understand the need for a item element within an ingredient, in practice this may be difficult to implement. The quantity element suffers from the same problem, but it's optional, unlike item.

The problem occurs when marking up existing recipes for display. A list of ingredients pulled from a database is trivial to mark up with ingredient but it's nearly impossible to add the required item with a high degree of accuracy. Doing so would require being able to parse each ingredient and identify and separate the quantities and items, which is only really possible if you know in advance every form the quantities will take so you can accurately pattern-match them.

For a real-world example, I'm currently building a site for a good-sized (9,000+) recipe collection. These recipes come from a number of sources and contain many different units of measure. While I can match for things like "oz", "cup", etc, and assume that what follows is the item, this is error prone and doesn't take into account things like "pinch", "dash", and the nearly endless list of other possible terms I may encounter.

I'd like to suggest that item be made optional, as the other child elements of ingredient already are. People coding recipes by hand or who are otherwise able to separate these things may use them, but those of us who are unable to do this can omit them while still outputting valid recipe microformat.

Kenn Wilson 11:29, 19 Oct 2008 (PDT)

issues

Issues have been moved to a seperate recipe-issues page.

implementations

Cognition

As of September 2008, Cognition has experimental support for this format. (Details of support.) Recipes may be exported in RecipeBook XML format or RDF.

examples in the wild

Wild Mushroom, Pancetta & Truffle Risotto by Toby Inkster

related pages

recipe-brainstorming’ was last modified: 2008-11-13T11:55:00P

Views