Difference between revisions of "recipe-brainstorming"

From Microformats Wiki
Jump to navigation Jump to search
m (Reverted edits by SitboMonvi (Talk) to last version by TobyInk)
(moved format-in-progress-#2 to the brainstorming-archive)
Line 8: Line 8:
For the sake of clarity the format-in-progress from september 2007 was moved to  [[recipe-brainstorming-archive]]. [[User:ThomasLoertsch|ThomasLoertsch]] 14:12, 11. Nov 2008 (CET)
For the sake of clarity the format-in-progress from september 2007 was moved to  [[recipe-brainstorming-archive]]. [[User:ThomasLoertsch|ThomasLoertsch]] 14:12, 11. Nov 2008 (CET)
<div id="Format-In-Progress-10-2008">
<div id="Format-In-Progress-10-2008">
Line 15: Line 13:
Also the format-in-progress from october 2008 has been moved to [[recipe-brainstorming-archive]]. --[[User:ThomasLoertsch|ThomasLoertsch]] 12:49, 9 July 2009 (UTC)
Recipe is based on [[recipe-examples|examples]] and fields in [[recipe-formats|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 [[User:ThomasLoertsch|ThomasLoertsch]] 15:29, 15. Oct 2008 (CET)
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:
* made <code>author</code> and <code>published</code> plural
* added <code>ingredients</code> element
* made <code>ingredient</code> an optional subelement of <code>ingredients</code>
* modified quantity (and removed the element <code>quantity</code>) to improve compatability with [[measure]]
* deleted ingredient-<code>optionality</code>
* <code>method</code> changed to optional
* <code>preparation-time</code> changed to optionally multiple instances
* added <code>note</code> to <code>preparation-time</code> and made both <code>note</code>s hCard elements
* <code>preparation-time</code>
* added <code>nutrition</code>
* removed<code>rel-license</code> element, because it can't be scoped to one of several receipes on one page (see [[recipe-issues]])
===Root Class Name===
To be decided. Likely ‘hRecipe’.
===Property List===
Class names <code>author</code>, <code>photo</code> and <code>note</code> are taken from [[hCard]], <code>published</code> used from [[hAtom]] and <code>item</code> from [[measure]].
* Title. <code>recipe-title</code>. required. text.
* Summary. <code>recipe-summary</code>. optional. text.
* Author. <code>author</code>. optional. 1 or more. [[hcard]].
* Date published. <code>published</code>. optional. 1 or more. [[datetime-design-pattern]].
* Photo(s). <code>photo</code>. optional. 1 or more. img or url. [[hcard].
* Ingredients. <code>ingredients</code>. required. text with optional valid HTML markup or 1 or more <code>ingredient</code> elements.
** Ingredient. <code>ingredient</code>. optional. 1 or more.
*** Quantity. <code>num</code>, <code>unit</code> and <code>item</code>. optional. [[measure]].
*** Note. <code>note</code>. optional. text. [[hcard].
* Method. <code>method</code>. optional. text with optional valid HTML markup.
* Yield. <code>yield</code>. optional. text.
* Preparation time. <code>preparation-time</code>. 1 or more, optional. (see [[ISO-31-1]] duration brainstorming)
** Note. <code>note</code>. optional. text. [[hcard].
* Tags. <code>tag</code>. optional. 1 or more. [[rel-tag]].
* Nutrition. <code>nutrition</code>. optional. 1 or more.
** Quantity. <code>num</code>, <code>unit</code> and <code>item</code>. optional. [[measure]].
===Field Details===
'''Title''': The title of the recipe.
* The element is identified by class name <code>recipe-title</code>.
* A Recipe {{must}} have a <code>recipe-title</code>
'''Summary''': The summary provides a short introduction or an accompanying statement about the recipe.
* The element is identified by class name <code>recipe-summary</code>.
* A Recipe {{may}} have a <code>recipe-summary</code>.
'''Author''': Author the person who authored the recipe.
* The element is identified by class name <code>author</code>.
* A Recipe {{may}} include an <code>author</code>.
* The contents of the element {{must}} include a valid [[hCard]].
'''Date published''': The date the recipe was published.
* The element is identified by the class name <code>published</code>.
* A Recipe {{may}} include a <code>published</code> date.
* {{should}} (?) use the [[datetime-design-pattern]] to encode the published datetime.
'''Photo''': Accompanying image.
* The element is identified by the class name <code>photo</code>.
* A Recipe {{may}} include one or more photo elements.
* The element {{should}} use an <code><img></code> element.
* The element {{may}} use any other element that contains a URL, such as <code><a></code> or <code><object></code>, but it is not recommended.
* The contents of the element {{must}} follow the conventions outlined in [[hCard]].
'''Ingredients''': Describes the ingredients used in the recipe.
* The element is identified by the class name <code>ingredients</code>.
* A Recipe {{must}} include one <code>ingredients</code> element.
* The field {{may}} include valid HTML markup (e.g. paragraphs).
* The element {{may}} include 1 or more <code>ingredient</code> elements.
'''Ingredient''': Describes one ingredient used in the recipe.
* The element is identified by the class name <code>ingredient</code>.
* It {{must}} only occur within an <code>ingredients</code> element.
* A Recipe {{may}} have one or more <code>ingredient</code>s.
* The element {{may}} include the fields <code>num</code>, <code>unit</code> and <code>item</code> following [[measure]].
* The element {{may}} include a <code>note</code>.
'''Note''': A note concerning an Ingredient or a Preparation Time element (for element Preparation Time see below).
* The element is identified by the class name <code>note</code>.
* Ingredients and Preparation Time elements {{may}} include a <code>note</code>.
* The contents of the element {{must}} follow the conventions outlined in [[hCard]].
'''Method''': The method of the recipe.
* The element is identified by the class name <code>method</code>.
* A Recipe {{may}} include a <code>method</code>.
* The field {{may}} include valid HTML markup (e.g. paragraphs).
'''Yield''': Specifies the quantity produced by the recipe.
* The element is identified by the class name <code>yield</code>.
* A Recipe {{may}} include a <code>yield</code>.
'''Preparation Time''': The time it takes to prepare the meal described by the recipe.
* The element is identified by the class name <code>preparation-time</code>.
* A Recipe {{may}} include one or more <code>preparation-time</code>s.
* Each Preparation Time element {{may}} include a <code>note</code>, to specify their respective purpose.
* The element is identified by class name <code>nutrition</code>.
* A Recipe {{may}} include one or more <code>nutrition</code> elements.
* The element {{may}} include the fields <code>num</code>, <code>unit</code> and <code>item</code> following [[measure]].
<pre><nowiki><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 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>.
<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>
<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 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>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>.

Revision as of 12:49, 9 July 2009

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

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

Also the format-in-progress from october 2008 has been moved to recipe-brainstorming-archive. --ThomasLoertsch 12:49, 9 July 2009 (UTC)


RecipeML-based Brainstorm

NOTE: Brainstorms should be based on implied schema of examples, not on explicit schema of other formats. The only exceptions where this appears to have been ok (perhaps I got lucky) was with hCard (based on vCard) and hCalendar (based on iCalendar), but even in those cases, experience has shown that there are several properties in each that in practice have not shown much if any use, therefore indicating that the microformats were/are bigger than they need(ed) to be. Tantek 23:19, 27 December 2008 (UTC)

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

  • Recipe_Title
  • Summary Description (one liner)
  • Measurement System (U.S., Imperial etc)
  • Ingredients (each one a separate "item" rather than block text with count/amount/range/unit broken out too)
    • Some (e.g. meats, vegetables) could optionally be marked up with (elements of) the proposed species microformat. Andy Mabbett 06:41, 16 Nov 2006 (PST)
      • None of the recipe-examples show references to species names, therefore there is no empirical justification for inclusion of such detail in the microformat. Tantek 23:19, 27 December 2008 (UTC)
        • The vast majority of recipes reference a species of plant or animal (e.g. "chicken", "carrot"). Binomial/trinomial names are pretty much never seen of course, but the current species proposal allows for vernacular (common) names to be marked up, so it is not an especially odd suggestion to define a pattern for marking up species within ingredients. TobyInk 20:11, 29 December 2008 (UTC)
    • Ingredient importance (e.g. Main, Required, Optional) should be listed as an attribute of each entry. α
    • Units need separate microformat: see Measure microformat research
    • Ingredient Preparation: such as diced, chopped, sliced, grated, minced, etc. Steve Lewis 18:55, 11 Feb 2007 (PST)
  • Preparation Time (overall time)
  • Yield Quantity and Unit (4 pancakes or 5 servings)
  • Background Information - Optional section to encapsulate information that is useful but not necessarily required for a successful recipe. α
    • Author (Person) (hCard 1.0?)
    • Submitter (Person) (hCard 1.0?)
    • Source (Book Title etc)
    • Date (Of Creation or Publication)
    • Rights (Copyright or other)
    • Meal Category (Starter, entree, dessert )
    • Cuisine Category (Italian etc)
  • Instructions (text, but can contain:)
    • Steps (optional)
      • Should be an ordered list Andy Mabbett 14:46, 16 Nov 2006 (PST)
      • Another vote for an ordered list, perhaps in the XOXO 1.0: Extensible Open XHTML Outlines format. α
      • Many recipes associate ingredients with specific steps of a multi-step method; if methods are broken out into steps, then the format should support this association whether the complete ingredient list is up front or the ingredient list is itself broken out per step. Ben Curtis
  • Photo (optional) Cameron Perry
    • Could be one per dish, or one for each (or for some of the) step(s). Andy Mabbett

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

  • Steps - As cited above but to include estimated time per step. Include the type of step (prep, preheat, cook, bake, mix, saute, etc) as well as the ingredients involved. This would be very useful when trying to time a meal so all the food appears together.
    • I think this is being to specific. Are there any real world examples where this would be useful? --Yde 08:41, 30 May 2008 (PDT)
  • Difficulty/Notes - Perhaps incorporation of hReview to describe difficulty (using rating) and general comments (review), as an optional field. Frances Berriman
    • -1. Too diverse in the wild, better handled bytags (at least in the first version). same for suitablility.
  • Suitability (e.g. vegetarian, vegan, wheat-free, etc.). Possibly rel="tag". Andy Mabbett 14:57, 16 Nov 2006 (PST)
  • Ingredient Grouping - In baking you need to differentiate wet from dry ingredients. See also an example recipe from extratasty.com for useful grouping in cocktail mixing. Steve Lewis 19:10, 11 Feb 2007
    • Maybe this ingredient grouping can be used to express some alternative ingredients, like "mayonnaise or cream cheese". Estêvão Samuel Procópio 15:33, 16 Dez 2007 (PDT)
    • This could be solved by using a xoxo list and ignoring list items that don't include a class="name". Example:

<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)

    • We can't have a dependency on XOXO or any list mark-up for ingredients. That's too restrictive on publishing patterns, preventing patterns like:

<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)

    • You're right. I think grouping would introduce too many new elements (class="group", class="group-title") considering how relatively uncommon this is. --Yde 13:51, 23 Apr 2008 (PDT)
  • Method > Steps - or Method-Step[] as a child of Method. Imply ordered steps from an HTML list or explicitly mark-up ordered steps respectively.
    • -1. Outside 80/20. POSH is good enough for this purpose. --ThomasLoertsch 15:04, 01 Oct 2008 (CET)
  • Number of dishes or similar - often it's mentioned how many dishes (or breads in baking, etc) the ingredients are for. WilleRaab 16:57, 20 Jul 2007 (PDT)
  • Suitable for occasions - what occasions are the dish suitable for? WilleRaab 16:57, 20 Jul 2007 (PDT)
  • Category - many sites categorize their recipes. WilleRaab 16:57, 20 Jul 2007 (PDT)
    • Tags could be used for both suitability and category.
  • Under what terms is the recipe licensed? Microformat: rel="license". Often a page is in the creative commons but the page author has taken some text from a copyrighted page and in theory re-published the work in violation to the terms of use, adding a rel="license" to each recipe on the page? Lee Jordan 20:55, 04 Feb 2008 (GMT)
  • Single foodstuffs - If "method" is made optional, this could be used for marking up individual foodstuffs in prose. for example, "I like to eat cheese for supper." would become:
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)
    • But that's not really a recipe, is it? And what would the purpose of knowing that cheese is an ingredient be? --Yde 12:46, 18 Apr 2008 (PDT)
    • -1. Makes no sense to me either --ThomasLoertsch 15:29, 01 Oct 2008 (CET)
  • Menus - With the addition of a "price" field, and perhaps one or two others, and again making "method" optional, this microformat can also be used for menus. See menu examples. Andy Mabbett 02:39, 19 Feb 2008 (PST)
    • I would consider this out of scope (which is to produce an as-simple-as-possible microformat "for the mark-up of instructions for creating meals, drinks or food-based items" - introduction) --Yde 13:39, 23 Apr 2008 (PDT)


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:

  • cup
  • leave
  • pinch
  • tablespoonful
  • teaspoonful
  • lacing
  • tie (??? my english is really leaving me here, hope you get the idea)

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:

  • weight (gram)
  • volume (litre)
  • length (metre)

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


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


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

is a shorthand for:

<span class="ingredient"><span class="item">salt</span></span>
  • +1. That and the Proposed Ingredient List Optimisation seem to be very pragmatic proposals. --Yde 14:40, 14 Jul 2008 (PDT)
  • -1. I'm not convinced that it's wise to introduce variations in the syntax for the singlemost important element (beside the title). Also the case seems very rare to me. Can you give some examples? --ThomasLoertsch 15:07, 01 Oct 2008 (CET)

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>

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>
  • I agree. This would save a lot of space, especially combined with the proposed hmeasure minimisation technique. --Yde 12:57, 18 Apr 2008 (PDT)
  • Do we have ingredients (plural) as an element? Doesn't that open a whole can of list-issues? --ThomasLoertsch 15:37, 01 Oct 2008 (CET)


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



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 effort per the process:

See now: