recipe-brainstorming: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (→‎Format-In-Progress: implementation notes)
 
(79 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<h1>Recipe Brainstorming</h1>
Towards a [[recipe|Recipe]] microformat.  Please read the [[process]] before editing this page.
Towards a [[recipe|Recipe]] microformat.  Please read the [[process]] before editing this page.


==Format-In-Progress==
This format-in-progress follows the restarting of Recipe development by [[User:Phae|Frances Berriman]] on 25th September 2007. Note that this Format-In-Progress section is 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 documentation was produced by [[User:BenWard|Ben Ward]] and [[User:Phae|Frances Berriman]].
; Editor
: [[User:Phae|Frances Berriman]] (BBC)
===Introduction===
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. 
===Root Class Name===
To be decided. Likely ‘hrecipe’.
===Property List===
Class names <code>author</code> and <code>published</code> are taken from [[hAtom]], <code>photo</code> used from [[hCard]] 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. [[hcard]].
* Date published. <code>published</code>. optional. [[datetime-design-pattern]].
* Photo(s). <code>photo</code>. optional. img or url.
* Ingredient(s). <code>ingredient</code>. 1 or more required.
** Quantity. <code>quantity</code>. optional. text, optionally [[measure]].
** Item. <code>item</code>. required. text.
** Note. <code>note</code>. optional. text.
** Optionality. <code>optional</code>. optional. text. Its absence should imply that the ingredient is required.
* Method. <code>method</code>. required. text with optional valid HTML markup.
* Yield. <code>yield</code>. optional. text.
* Preparation time. <code>preparation-time</code>. optional. (see [[ISO-31-1]] duration brainstorming)
* Tags. optional. [[rel-tag]].
* License. optional. [[rel-license]].
===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.
'''Ingredient''': Describes an ingredient used in the recipe.
* The element is identified by the class name <code>ingredient</code>.
* A Recipe {{must}} have one or more <code>ingredient</code>s.
* The element {{must}} include the field item.
* The element {{may}} include <code>quantity</code>, <code>note</code> and/or <code>optionality</code>.
{{OpenIssue}} Can we have this optimisation?... if no "item" is found, the entire ingredient is taken to be the item. [[User:TobyInk|TobyInk]]
* +1. That and [[recipe-brainstorming#Proposed Ingredient List Optimisation|this]] one seems to be very pragmatic proposals. --[[User:Yde|Yde]] 14:40, 14 Jul 2008 (PDT)
'''Quantity''': The quantity of an ingredient needed for the recipe.
* The element is identified by the class name <code>quantity</code>.
* An ingredient {{may}} specify the <code>quantity</code>.
'''Item''': Specifies the name of the ingredient.
* The element is identified by the class name <code>item</code>.
* An ingredient {{must}} specify the <code>item</code>.
'''Note''': A note concerning one of the ingredients.
* The element is identified by the class name <code>note</code>.
* An ingredient {{may}} include a <code>note</code>.
'''Optionality''': States that an ingredient is optional to the recipe.
* The element is identified by the class name <code>optionality</code>.
* The <code>optionality</code> of an <code>ingredient</code> {{may}} be specified.
* The absence of the element implies that the ingredient is required.
'''Method''': The method of the recipe.
* The element is identified by the class name <code>method</code>.
* A Recipe {{must}} include a <code>method</code>.
* The field {{may}} include valid HTML markup (e.g. paragraphs).
{{OpenIssue}} 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. [[User:TobyInk|TobyInk]] 02:53, 15 Jul 2008 (PDT)
* e.g. salad, sandwich and smoothie recipes don't often require a method to be useful.
'''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>.
===Suggested fields for inclusion===
* Method > Steps or Method-Step[] as a child of Method. Imply ordered steps from an HTML list or explicitly mark-up ordered steps respectively.
* Calories – per serving. May be part of the [[measure]] microformat in future.
===Known Issues===
This section reflects the discussion that occurs on the microformats-new list ([http://microformats.org/discuss/mail/microformats-new/2007-September/000864.html here], [http://microformats.org/discuss/mail/microformats-new/2008-April/001599.html here] and [http://microformats.org/discuss/mail/microformats-new/2008-June/001629.html here]).
{{OpenIssue}} Mark-up of quantity would be enhanced by use of a [[measure]] microformat. However, such a format does not yet exist outside of brainstorming. It must be decided whether quantity is useful/parsable ''enough'' without explicit mark-up of values and units.
* The ‘quantity’ of an ingredient should be considered as a string which parsers may attempt to understand as required. A future ‘measurement’ format will be an obvious compound part in recipes, but it is not required for recipe to be specified usefully. [http://microformats.org/discuss/mail/microformats-new/2007-September/000867.html], [http://microformats.org/discuss/mail/microformats-new/2008-April/001600.html]
{{ClosedIssue}} <code>entry-title</code> and <code>entry-summary</code> are not always semantically right and may not be good class names.
* <code>title</code> and <code>summary</code> already used for a different purpose (in [[hCard]] and [[hCalendar]]/[[hReview]]/[[hListing]]). [[accepted-limitations-of-microformats#Microformat_Namespacing_Issue More | Read more]].
* <code>recipe-title</code> and <code>recipe-summary</code> suggested.
* Changed to <code>recipe-title</code> and <code>recipe-summary</code> for now.
{{ClosedIssue}} The 'photo' property should be usable for elements containing the element <code><img></code>.
* This format reuses the 'photo' property of [[hCard]] so we can't change the way it is parsed in the recipe format without also changing the way it is pased in hCard ([[hcard#Human_vs._Machine_readable|Human_vs._Machine_readable]]). This is an hCard problem and should not be discussed here.
{{ClosedIssue}} We need a way to markup alternative ingredients.
* This is not entirely straight-forward. We should put this off for a future revision.
{{OpenIssue}} The 'note' property is only useful in some [http://microformats.org/discuss/mail/microformats-new/2008-June/001635.html rare cases] and might not fit the 80-20 rule.
* We might want to [[principles|start as simple as possible]] and leave this out for a future revision.
* People often put some of the very basic preparation steps into the ingredients list. For example, ingredients lists sometimes read like "one onion, finely chopped".


== Implementations ==


As of September 2008, [http://buzzword.org.uk/cognition/ Cognition] has experimental support for this format. Class names supported are:
<div id="Format-In-Progress">
==format-in-progress - #1 - september 2007==
</div>


* <code>hrecipe</code>
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)
** <code>recipe-title</code> (required, singular)
** <code>recipe-summary</code> (optional, singular)
** <code>author</code> (optional, plural)
*** embedded [[hCard]]
** <code>published</code> (optional, plural)
** <code>photo</code> (optional, plural)
** <code>method</code> (if plural, then concatenated)
** <code>ingredient</code> (required, plural)
*** <code>quantity</code>
**** embedded [[measure|hmeasure]]
*** <code>item</code>
*** <code>note</code>
*** <code>optional</code>
** <code>yield</code> (optional, singular)
** <code>preparation-time</code> (optional, singular)


Also you can use <code>class="ingredients"</code> on an element as a shorthand for putting <code>class="ingredient"</code> on all its direct child elements.
<div id="Format-In-Progress-10-2008">
==format-in-progress - #2 - october 2008==
</div>


Recipes may be exported in [[recipe-formats#RecipeBook_XML|RecipeBook XML]] format.
Also the format-in-progress from october  2008 has been moved to  [[recipe-brainstorming-archive]]. --[[User:ThomasLoertsch|ThomasLoertsch]] 12:49, 9 July 2009 (UTC)


==RecipeML-based Brainstorm==
==brainstorming==
===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.''' [[User:Tantek|Tantek]] 23:19, 27 December 2008 (UTC)


Excerpted from [http://conoroneill.com/2006/03/21/what-if-i-suggest-a-structured-recipe-format-and-you-critique-it/ Conor Bandon's Blog entry] and derived from The RecipeML Spec:
Excerpted from [http://conoroneill.com/2006/03/21/what-if-i-suggest-a-structured-recipe-format-and-you-critique-it/ Conor Bandon's Blog entry] and derived from The RecipeML Spec:
Line 159: Line 25:
*Ingredients (each one a separate "item" rather than block text with count/amount/range/unit broken out too)
*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. [[User:AndyMabbett|Andy Mabbett]] 06:41, 16 Nov 2006 (PST)
**Some (e.g. meats, vegetables) could optionally be marked up with (elements of) the proposed [[species]] microformat. [[User:AndyMabbett|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. [[User:Tantek|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. [[User:TobyInk|TobyInk]] 20:11, 29 December 2008 (UTC)
** Ingredient importance (e.g. Main, Required, Optional) should be listed as an attribute of each entry. [[User:AlexanderShusta|α]]
** Ingredient importance (e.g. Main, Required, Optional) should be listed as an attribute of each entry. [[User:AlexanderShusta|α]]
**Units need separate microformat: see [[measure]]  
**Units need separate microformat: see [[measure]]  
Line 183: Line 51:
**Could be one per dish, or one for each (or for some of the) step(s). [[User:AndyMabbett|Andy Mabbett]]
**Could be one per dish, or one for each (or for some of the) step(s). [[User:AndyMabbett|Andy Mabbett]]


== Additional Suggestions ==
===Cookcamp brainstorming===
At [http://barcamp.org/CookCamp CookCamp] in February 2007, Tantek moderated a fairly free form discussion of how to publish/share recipes.  Here is a [http://flickr.com/photos/tantek/422072573/ photo of the whiteboard]:
[http://flickr.com/photos/tantek/422072573/ http://farm1.static.flickr.com/162/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.
*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? --[[User:Yde|Yde]] 08:41, 30 May 2008 (PDT)
**I think this is being to specific. Are there any real world examples where this would be useful? --[[User:Yde|Yde]] 08:41, 30 May 2008 (PDT)
*Difficulty/Notes - Perhaps incorporation of [[hreview|hReview]] to describe difficulty (using rating) and general comments (review), as an optional field. [[User:Phae|Frances Berriman]]
*Difficulty/Notes - Perhaps incorporation of [[hreview|hReview]] to describe difficulty (using rating) and general comments (review), as an optional field. [[User:Phae|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]]. [[User:AndyMabbett|Andy Mabbett]] 14:57, 16 Nov 2006 (PST)
*Suitability (e.g. vegetarian, vegan, wheat-free, etc.). Possibly [[rel-tag]]. [[User:AndyMabbett|Andy Mabbett]] 14:57, 16 Nov 2006 (PST)
*Ingredient Grouping - In baking you need to differentiate wet from dry ingredients.  See also an [[recipe-examples|example recipe]] from [http://www.extratasty.com/recipe/46/cuba_libre extratasty.com] for useful grouping in cocktail mixing. [[SteveL|Steve Lewis]] 19:10, 11 Feb 2007
*Ingredient Grouping - In baking you need to differentiate wet from dry ingredients.  See also an [[recipe-examples|example recipe]] from [http://www.extratasty.com/recipe/46/cuba_libre extratasty.com] for useful grouping in cocktail mixing. [[SteveL|Steve Lewis]] 19:10, 11 Feb 2007
Line 201: Line 76:
     <li>1 part <span class="name">Lime juice</span></li>
     <li>1 part <span class="name">Lime juice</span></li>
   </li>
   </li>
</ul>
</ul></nowiki></pre> --[[User:Yde|Yde]] 13:09, 18 Apr 2008 (PDT)
</nowiki></pre> --[[User:Yde|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: <pre><nowiki>
** 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: <pre><nowiki>
<p class="method">Take <span class="ingredient"><span class="quantity">a handful</span>  
<p class="method">Take <span class="ingredient"><span class="quantity">a handful</span>  
of  spinach</span> and fry it</p>
of  spinach</span> and fry it</p></nowiki></pre> --[[User:BenWard|BenWard]] 13:20, 18 Apr 2008 (PDT)
</nowiki></pre> --[[User:BenWard|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. --[[User:Yde|Yde]] 13:51, 23 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. --[[User:Yde|Yde]] 13:51, 23 Apr 2008 (PDT)
 
* Number of dishes or similary - often it's mentioned how many dishes (or breads in baking, etc) the ingredients are for. [[User:WilleRaab|WilleRaab]] 16:57, 20 Jul 2007 (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.
* Suitable for occations - what occations are the dish suitable for? [[User:WilleRaab|WilleRaab]] 16:57, 20 Jul 2007 (PDT)
** -1. Outside 80/20. POSH is good enough for this purpose. --[[User:ThomasLoertsch|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. [[User:WilleRaab|WilleRaab]] 16:57, 20 Jul 2007 (PDT)
* Suitable for occasions - what occasions are the dish suitable for? [[User:WilleRaab|WilleRaab]] 16:57, 20 Jul 2007 (PDT)
* Category - many sites categorize their recipes. [[User:WilleRaab|WilleRaab]] 16:57, 20 Jul 2007 (PDT)
* Category - many sites categorize their recipes. [[User:WilleRaab|WilleRaab]] 16:57, 20 Jul 2007 (PDT)
** Tags could be used for both suitability and category.
** Tags could be used for both suitability and category.


Note: Comments added ''"[[User:WilleRaab|WilleRaab]] 16:57, 20 Jul 2007 (PDT)"'' are added after looking at http://tasteline.com, example: [http://www.tasteline.com/default.ns?strItemID=showRecipe&intChannelID=&lngRID=8045&tlfo=0 here].
*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? [[User:Lee Jordan|Lee Jordan]] 20:55, 04 Feb 2008 (GMT)


*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? [[User:Lee Jordan|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:
<pre><nowiki>
I like to eat <span class="hRecipe"><span class="ingredient">cheese</span></span> for supper.
</nowiki></pre>
or simply (if the proposed "[http://microformats.org/discuss/mail/microformats-discuss/2008-January/011199.html sub-microformat-pattern]" is adopted):
<pre><nowiki>
I like to eat <span class="hRecipe-ingredient">cheese</span> for supper.
</nowiki></pre>
: [[User:AndyMabbett|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? --[[User:Yde|Yde]] 12:46, 18 Apr 2008 (PDT)
** -1. Makes no sense to me either --[[User:ThomasLoertsch|ThomasLoertsch]] 15:29, 01 Oct 2008 (CET)


=== Proposed Ingredient List Optimisation ===
*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 [[recipe-examples#Menus|menu examples]]. [[User:AndyMabbett|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" - [[recipe-brainstorming#Introduction | introduction]]) --[[User:Yde|Yde]] 13:39, 23 Apr 2008 (PDT)


[[User:TobyInk|TobyInk]] 03:42, 23 Mar 2008 (PDT):
===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:
* cup
* leave
* pinch
* tablespoonful
* teaspoonful
* lacing
* tie (??? my english is really leaving me here, hope you get the idea)
<code>note</code> 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. --[[User:ThomasLoertsch|ThomasLoertsch]] 15:45, 01 Oct 2008 (CET)


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


<pre><nowiki><ul class="ingredients">
====Item====
<li><span class="quantity">3</span> <span class="name">eggs</span></li>
Can we have this optimisation?... if no "item" is found, the entire ingredient is taken to be the item. [[User:TobyInk|TobyInk]]
<li><span class="quantity">6 oz</span> <span class="name">self-raising flour</span></li>
<li><span class="quantity">6 oz</span> <span class="name">caster sugar</span></li>
<li><span class="quantity">6 oz</span> <span class="name">butter</span></li>
<li><span class="quantity">1 tsp</span> <span class="name">vanilla essence</span></li>
</ul></nowiki></pre>


Example:
<pre><nowiki><span class="ingredient">salt</span></nowiki></pre>
is a shorthand for:
is a shorthand for:
<pre><nowiki><span class="ingredient"><span class="item">salt</span></span></nowiki></pre>
* +1. That and the Proposed Ingredient List Optimisation seem to be very pragmatic proposals. --[[User:Yde|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? --[[User:ThomasLoertsch|ThomasLoertsch]] 15:07, 01 Oct 2008 (CET)


<pre><nowiki><ul class="ingredients">
====Ingredient List====
<li class="ingredient"><span class="quantity">3</span> <span class="name">eggs</span></li>
<li class="ingredient"><span class="quantity">6 oz</span> <span class="name">self-raising flour</span></li>
<li class="ingredient"><span class="quantity">6 oz</span> <span class="name">caster sugar</span></li>
<li class="ingredient"><span class="quantity">6 oz</span> <span class="name">butter</span></li>
<li class="ingredient"><span class="quantity">1 tsp</span> <span class="name">vanilla essence</span></li>
</ul></nowiki></pre>
 
I agree. This would save a lot of space, especially combined with the proposed hmeasur [http://microformats.org/wiki/measure#hmeasure minimisation technique]. --[[User:Yde|Yde]] 12:57, 18 Apr 2008 (PDT)
 
=== Proposed Ingredient Name/Quantity Optimisation ===


[[User:TobyInk|TobyInk]] 03:42, 23 Mar 2008 (PDT):
[[User:TobyInk|TobyInk]] 03:42, 23 Mar 2008 (PDT):


This idea's a bit more "out there" and probably needs a bit more work.
If class="ingredients" (note: plural) is found on an element, class="ingredient" (note: singular) is automatically implied on all its children.
 
<pre><nowiki><li class="ingredient">3  eggs</li></nowiki></pre>
 
(note the double-space between '3' and 'eggs') is treated as a shorthand for:
 
<pre><nowiki><li class="ingredient"><span class="quantity">3</span> <span class="name">eggs</span></li></nowiki></pre>
 
This is similar to N-optimisation in hCard, but uses a double space instead of a single space because the components (quantity, name) may themselves each contain spaces. With both of these optimisations in place, the sponge cake ingredient list can be written as concisely as:


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


Which (apart from the double spaces) is pretty close to how many people publish ingredients lists already. (Certainly close to how I do!)
is a shorthand for:
 
=== Alternative Proposed Ingredient Name/Quantity Optimisation ===
 
[[User:TobyInk|TobyInk]] 02:02, 24 Mar 2008 (PDT): Perhaps a better solution than the double spacing...
 
As above, but:


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


Or is this stretching the meaning of &lt;var> too much?
* I agree. This would save a lot of space, especially combined with the proposed hmeasure [http://microformats.org/wiki/measure#hmeasure minimisation technique]. --[[User:Yde|Yde]] 12:57, 18 Apr 2008 (PDT)
* Do we have <code>ingredients</code> (plural) as an element? Doesn't that open a whole can of list-issues? --[[User:ThomasLoertsch|ThomasLoertsch]] 15:37, 01 Oct 2008 (CET)


=== Proposed Ingredient Name Optimisation ===
=== Promoting hRecipe for use in Recipe Search Indexing ===
My company has an interest in the establishment and adoption of a recipe-based microformat in support of our goal to index recipe content for search.


--[[User:Yde|Yde]] 02:12, 23 Apr 2008 (PDT):
We would like to promote a few [http://microformats.org/wiki/posh POSH] extensions to hRecipe that we think will be useful to the recipe-publishing community in support of our shared intention to promote hRecipe's adoption as a standard.


If no class="quantity" or class="name" is found, the content of the ingredient element is treated as the name of the ingredient.
I have outlined these extensions (and our rationale) below and would like to ask the community for comment in advance of any publication. After comment, we will host a public page outlining the extensions which will refer to microformats.org as the authoritative source for hRecipe.


<pre><nowiki><li class="ingredient">salt</li></nowiki></pre>
(My intent is also to share whatever data we collect on the adoption of hRecipe in the sites we index, which will include smaller blogger sites where we expect hRecipe will initially be most prevalent.)


is a shorthand for:
--[[User:DaveCorboy|DaveCorboy]] 03:43, 22 March 2010 (UTC)


<pre><nowiki><li class="ingredient"><span class="name">salt</span></li></nowiki></pre>
* We have now published the page I reference above [http://www.ziplist.com/recipe_microformat here]. --[[User:DaveCorboy|DaveCorboy]] 04:57, 4 April 2010 (UTC)


Maybe we should even allow markup like
==== Proposed Extensions ====
===== comment =====
* An inline comment for an ingredient within the recipe.
* Optional. Text. Limited to one '''comment''' per ingredient.
* ''Rationale: We have seen a number of examples in the wild of comments mixed in with ingredients. '''comment''' allows the expression of a standard ingredient list while also allowing for prose-style lists and additional commentary (e.g., substitutions) related to specific ingredients.''
Example
<pre><nowiki>
<ul>
  <li class="ingredient">1 cup of walnuts or pecans
    <span class="comment">
      (Though I usually prefer pecans in most recipes, I like walnuts best in this.)
    </span>
  </li>
</ul>
</nowiki></pre>


<pre><nowiki><li class="ingredient"><span class="quantity">1 tbsp</span>salt</li></nowiki></pre>
===== step =====
* The steps necessary to prepare the recipe.
* Optional. Text. No limit to the total number of '''step'''s per recipe. Use of step properties within an instructions block are optional, but recommended.
* ''Rationale: The [http://www.cookingforengineers.com/recipe/33/Lemon-Bars Cooking for Engineers] website is an excellent real-world example of the many alternative recipe writing styles described in [http://www.anthus.com/Recipes/CompCook.html this paper]. hRecipe has reasonably [http://microformats.org/wiki/recipe-issues#closed_issues closed this as an immediate need], however we wish to try to accommodate this sort of prose-style recipes that do not have an explicit collection of steps.''
Example
<pre><nowiki>
<div class="instructions">
  <p>So before we get to the recipe, let me tell you a story about cranberries...</p>
  <p>
    Now, let's get to cooking! First, you will need to <span class="step">coarsely grind the cranberries. Fill your blender 2/3 full...</span>
    After you have done this, you will need to <span class="step">pour the blender contents into your strainer and let the liquid...</span>
  </p>
  <p>
    All this cooking reminds me of the apple farm where I grew up...
    Now that you know where apples come from, you will need to <span class="step">peel and dice the apples and add them to the drained cranberries.</span>
  </p>
</div>
</nowiki></pre>


which would be parsed as
===== preptime =====
* Time it takes for the preparation step of the recipe.
* Optional. Text or the property may be encoded using the [http://microformats.org/wiki/value-class-pattern value-class-pattern]. Limited to one '''preptime''' per recipe.
* ''Rationale: We add '''preptime''' and '''cooktime''' to help publishers express these values explicitly and request only one '''duration''' property to express total time for the recipe.''
Example
<pre><nowiki>
<h6>Preparation time: <span class="preptime">5 minutes</span></h6>
</nowiki></pre>


* ingredient
===== cooktime =====
** quantity: 1 tbsp
* Time it takes for the cooking step of the recipe.
** name: salt
* Optional. Text or the property may be encoded using the [http://microformats.org/wiki/value-class-pattern value-class-pattern]. Limited to one '''cooktime''' per recipe.
* ''Rationale: We add '''preptime''' and '''cooktime''' to help publishers express these values explicitly and request only one '''duration''' property to express total time for the recipe.''
Example
<pre><nowiki>
<h6>Cooking time: <span class="cooktime">25 minutes</span></h6>
</nowiki></pre>


NOTE: To avoid confusion, I used the class name "name" although I think it should be changed to "item".
===== tag =====
 
* One or more tags (cuisine, keyword, etc.) for the recipe.
== Cookcamp brainstorming ==
* Optional. No limit to number of '''tag'''  properties per recipe.
 
* ''Rationale: Our use of tagging is very different from the use-case of [http://microformats.org/wiki/rel-tag rel-tag] which requires a tagspace. In our use case, we need to allow users of the microformat the ability to associate descriptive words to a recipe, but cannot require they also construct a web infrastructure. This view is correctly rejected by the rel-tag issues reviewers citing large-scale sites such as Flickr and del.icio.us. Perhaps "tags" is simply the wrong term for us?''
At [http://barcamp.org/CookCamp CookCamp] in February 2007, Tantek moderated a fairly free form discussion of how to publish/share recipes.  Here is a [http://flickr.com/photos/tantek/422072573/ photo of the whiteboard]:
Example
 
<pre><nowiki>
[http://flickr.com/photos/tantek/422072573/ http://farm1.static.flickr.com/162/422072573_9956d93f61.jpg]
<span class="tag">Salad</span>
 
<span class="tag">Fruit</span>
'''To Do''': OCR this and enter rough notes here...
</nowiki></pre>
 
 
==Issues==
Please do feel to add your comments below.  If this section grows too large, please create a seperate recipe-issues section.  Thanks!
 
===Scope===
*Is this intended for only food recipes, or also recipes for, say, glue, paint, dyes and other chemicals? [[User:AndyMabbett|Andy Mabbett]] 14:53, 16 Nov 2006 (PST)
** +1  Wondered the same.  I'd like to see this extended as a general recipe for anything that can be created in a defined way/order, rather than just edible food.[[User:Phae|Frances Berriman]]
** Agreed. This format could apply to a set of methods and materials, including cooking, science experiments, craft making, building, etc. - essentially any how-to or tutorial. [[User:IamCam|Cameron Perry]]
** However, now I view my addition of 'calories per serving' as suspect, ;) though I guess it could still apply, since it's just a unit of energy. [[User:JohnLeMasney|John LeMasney]]
***Recipe for Nitroglycerine (not recommended by Weight Watchers) ? [[User:AndyMabbett|Andy Mabbett]] 10:43, 1 Feb 2007 (PST)
** The scope is determined by the [[recipe-examples]] research that is done, other musings are purely theoretical and thus discouraged.  So far this means recipes means only food recipes.  In addition, "recipe" in common vernacular applies primarily to food.  Other uses are certainly outside the common 80/20 (note that 80/20 does note mean there are no non-food cases, merely that they are outside the 80).  If you want to pursue other types of recipes, e.g. "chemical-recipes" - start that as a separate research effort per the [[process]]. [[User:Tantek|Tantek]] 07:39, 15 Mar 2007 (PDT)
*** Work is continuing on the recipe format now with the scope limited to food-based items only. [[User:Phae|Phae]] 08:44, 3 Oct 2007 (PDT)
*Is it possible to have special structure for the details of the operations in the cooking. For Eg. I invite you to have a look at the following Page [http://www.anthus.com/Recipes/CompCook.html]. Should it be possible to have special markup for the operations? Or is that going too far? Maybe we could keep this open ended so that it could be included when sites would actually be interested in including the same... Anyway the article makes for some interesting reading though it is from 1985 ;-) [[User:SudarshanP|SudarshanP]] 06:46, 26 Jun 2007 (PDT)
** I think this could be considered out of scope. It's the sort of thing that would be detailed in the descriptive narrative, but I'm not sure there's evidence from the examples that this type of behaviour is common enough to warrant specific properties to hold it. [[User:Phae|Phae]] 08:44, 3 Oct 2007 (PDT)
===Measure ===
{{OpenIssue}}
*Quantities play a key part in recipes, so do we feel the recipe format will rely on quantities so heavily that the measure microformat needs to be completed first, or do we feel it can exist without it and use of measure can be optional in the first version? [[User:Phae|Phae]] 08:44, 3 Oct 2007 (PDT)
**The former. [[User:AndyMabbett|Andy Mabbett]] 13:10, 4 Feb 2008 (PST)
**The use of a measure microformat should be optional. Otherwise it will prevent people from using less specific measurements like "a handful" or "a bottle" or just "some". [[User:Yde|Yde]] 08:59, 30 May 2008 (PDT)
 
*The abbr design pattern should be used to mark up measures, such as lbs and kg, measures are also not restricted to ingredients as they describe temperature too, as such should the sup element be used in the presentation of the degree symbol, within the abbr? See  [http://www.bbc.co.uk/weather/5day.shtml?id=1081 BBC weather example] [[User:Lee Jordan|Lee Jordan]] 20:00, 4 Feb 2008 (GMT)
 
*Conversion is tricky and is important, you've found a great recipe but it's measured in "cups". temperature is usually handled well by recipe authors, unless "gas mark" is used. The lang attribute (optional) could be used to denote the intentional language convention of the markup, to aid parsers "convert on the fly"? Is there currently a sematic way of marking up content as being metric or imperial? (complications come in mixed measure conventions in the same text section, so lang= on the abbr rather than the ul would help). A browser could then know the text was originally written in metric and convert to imperial if the user agent was en-GB, or a DOM script equally could aid conversion from cups to oz based on that? As an Englishman reading American text I find it hard to know what a "cup" is and then there are the Europeans to consider. Lang attributes might not be useful as for example en-US and en-GB measure distance in miles for example, rel="us-volume" (cups), rel="gb-volume" (tablespoons)? [[User:Lee Jordan|Lee Jordan]] 20:15, 4 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:


===== category =====
* Category of the recipe.
* Optional. Limited to one '''category''' per recipe.
* ''Rationale: While hRecipe recommends tags for this, we find that the category of the recipe is often treated differently in published recipes and we'd like to try to promote it out of the tags.''
Example
<pre><nowiki>
<pre><nowiki>
I like to eat <span class="hRecipe"><span class="ingredient">cheese</span></span> for supper.
<span class="category">Side dish</span>
</nowiki></pre>
</nowiki></pre>


or simply (if the proposed "[http://microformats.org/discuss/mail/microformats-discuss/2008-January/011199.html sub-microformat-pattern]" is adopted):
===== difficulty =====
 
* Difficulty level of preparing the recipe.
* Optional. The value should be encoded as a fraction using the '''value-title''' class defined in the [http://microformats.org/wiki/value-class-pattern value-class-pattern]. Limited to one '''difficulty''' per recipe.
* ''Rationale: While hRecipe recommends tags for this, we find that the difficulty of the recipe is often expressed in published recipes as a specific ratio.''
Example
<pre><nowiki>
<pre><nowiki>
I like to eat <span class="hRecipe-ingredient">cheese</span> for supper.
<span class="difficulty"><span class="value-title" title="1/3" />Easy</span>
</nowiki></pre>
</nowiki></pre>


: [[User:AndyMabbett|Andy Mabbett]] 08:16, 5 Jan 2008 (PST)
===== rating =====
 
* Rating of the recipe.
But that's not really a recipe, is it? And what would the purpose of knowing that cheese is an ingredient be?
* Optional. The value should be encoded as a fraction using the '''value-title''' class defined in the [http://microformats.org/wiki/value-class-pattern value-class-pattern]. Limited to one '''rating''' per recipe.
--[[User:Yde|Yde]] 12:46, 18 Apr 2008 (PDT)
* ''While hRecipe recommends tags for this, we find that the rating of the recipe is often expressed in published recipes as a specific ratio.''
 
Example
==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 [[recipe-examples#Menus|menu examples]].
: [[User:AndyMabbett|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" - [[recipe-brainstorming#Introduction | introduction]]) --[[User:Yde|Yde]] 13:39, 23 Apr 2008 (PDT)
 
==Multiple Items per Ingredient==
 
We need a way to mark-up more than one item per ingredient. This is useful when:
 
* you need to mark-up more than one <code>item</code> in an <code>ingredient</code> e.g. "salt and pepper".
* you need to mark-up multiple options for an <code>ingredient</code> e.g. "cream or whipping cream".
 
The first problem could be solved by simply making the two items into two ingredients like this:
 
<pre><nowiki><span class="ingredient">salt</span> and <span class="ingredient">pepper</span></nowiki></pre>
 
But in a list it would be inconvinient and not very aesthetically pleasing:
 
<pre><nowiki>
<pre><nowiki>
<li class="ingredient">...</li>
<span class="rating"><span class="value-title" title="4/5" /><img src="/images/4-out-of-5-stars.jpg" /></span>
<li><span class="ingredient">salt</span> and <span class="ingredient">pepper</span></li>
<li class="ingredient">...</li>
</nowiki></pre>
</nowiki></pre>


Could we just allow more than one <code>item</code> per <code>ingredient</code>?
==issues==
Issues have been moved to a seperate [[recipe-issues|recipe-issues ]] page.


For the second problem there is currently no good workaround. There is ''no way to mark-up "or"''. Possible solutions:
==implementations==
===Cognition===
As of September 2008, [http://buzzword.org.uk/cognition/ Cognition] has experimental support for this format. ([http://buzzword.org.uk/cognition/uf-plus.html#hrecipe Details of support].) Recipes may be exported in [[recipe-formats#RecipeBook_XML|RecipeBook XML]] format or RDF.


* We could reuse the <code>optional</code> property:
==examples in the wild==
<pre><nowiki><span class="ingredient"><span class="item optional">Cream</span> or <span class="item optional">whipping cream</span></span></nowiki></pre>


* If this conflicts with other uses of the <code>optional</code> property we might invent another class name for this functionality (<code>option</code>?) but personally I like to keep the scema to a minimum.
'''Wild Mushroom, Pancetta & Truffle Risotto''' by Toby Inkster
* [http://tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ Marked up as hRecipe] using the September 2007 draft format
* [http://srv.buzzword.org.uk/recipebook/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ RecipeBook XML] output from Cognition.
* [http://srv.buzzword.org.uk/rdf-xml/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ RDF/XML] and [http://srv.buzzword.org.uk/turtle/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ Turtle] output from Cognition.


== See Also ==
== related pages ==
* [[recipe]]
[[recipe]] effort per the process:
* [[recipe-examples]]
* [[recipe-examples]]
* [[recipe-formats]]
* [[recipe-formats]]
* [[recipe-brainstorming]] (see also [[recipe-brainstorming-archive]])
* [[recipe-issues]]
See now:
* [[hRecipe]]
* [[hrecipe-issues|hRecipe issues]]

Latest revision as of 04:57, 4 April 2010

Towards a Recipe microformat. Please read the 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)

brainstorming

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
    • 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?)
    • Submitter (Person) (hcard?)
    • 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 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)

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:

  • 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

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>
  • +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>
</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>
  • 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)

Promoting hRecipe for use in Recipe Search Indexing

My company has an interest in the establishment and adoption of a recipe-based microformat in support of our goal to index recipe content for search.

We would like to promote a few POSH extensions to hRecipe that we think will be useful to the recipe-publishing community in support of our shared intention to promote hRecipe's adoption as a standard.

I have outlined these extensions (and our rationale) below and would like to ask the community for comment in advance of any publication. After comment, we will host a public page outlining the extensions which will refer to microformats.org as the authoritative source for hRecipe.

(My intent is also to share whatever data we collect on the adoption of hRecipe in the sites we index, which will include smaller blogger sites where we expect hRecipe will initially be most prevalent.)

--DaveCorboy 03:43, 22 March 2010 (UTC)

  • We have now published the page I reference above here. --DaveCorboy 04:57, 4 April 2010 (UTC)

Proposed Extensions

comment
  • An inline comment for an ingredient within the recipe.
  • Optional. Text. Limited to one comment per ingredient.
  • Rationale: We have seen a number of examples in the wild of comments mixed in with ingredients. comment allows the expression of a standard ingredient list while also allowing for prose-style lists and additional commentary (e.g., substitutions) related to specific ingredients.

Example

<ul>
  <li class="ingredient">1 cup of walnuts or pecans
    <span class="comment">
      (Though I usually prefer pecans in most recipes, I like walnuts best in this.)
    </span>
  </li>
</ul>
step
  • The steps necessary to prepare the recipe.
  • Optional. Text. No limit to the total number of steps per recipe. Use of step properties within an instructions block are optional, but recommended.
  • Rationale: The Cooking for Engineers website is an excellent real-world example of the many alternative recipe writing styles described in this paper. hRecipe has reasonably closed this as an immediate need, however we wish to try to accommodate this sort of prose-style recipes that do not have an explicit collection of steps.

Example

<div class="instructions">
  <p>So before we get to the recipe, let me tell you a story about cranberries...</p>
  <p>
    Now, let's get to cooking! First, you will need to <span class="step">coarsely grind the cranberries. Fill your blender 2/3 full...</span>
    After you have done this, you will need to <span class="step">pour the blender contents into your strainer and let the liquid...</span>
  </p>
  <p>
    All this cooking reminds me of the apple farm where I grew up...
    Now that you know where apples come from, you will need to <span class="step">peel and dice the apples and add them to the drained cranberries.</span>
  </p>
</div>
preptime
  • Time it takes for the preparation step of the recipe.
  • Optional. Text or the property may be encoded using the value-class-pattern. Limited to one preptime per recipe.
  • Rationale: We add preptime and cooktime to help publishers express these values explicitly and request only one duration property to express total time for the recipe.

Example

<h6>Preparation time: <span class="preptime">5 minutes</span></h6>
cooktime
  • Time it takes for the cooking step of the recipe.
  • Optional. Text or the property may be encoded using the value-class-pattern. Limited to one cooktime per recipe.
  • Rationale: We add preptime and cooktime to help publishers express these values explicitly and request only one duration property to express total time for the recipe.

Example

<h6>Cooking time: <span class="cooktime">25 minutes</span></h6>
tag
  • One or more tags (cuisine, keyword, etc.) for the recipe.
  • Optional. No limit to number of tag properties per recipe.
  • Rationale: Our use of tagging is very different from the use-case of rel-tag which requires a tagspace. In our use case, we need to allow users of the microformat the ability to associate descriptive words to a recipe, but cannot require they also construct a web infrastructure. This view is correctly rejected by the rel-tag issues reviewers citing large-scale sites such as Flickr and del.icio.us. Perhaps "tags" is simply the wrong term for us?

Example

<span class="tag">Salad</span>
<span class="tag">Fruit</span>
category
  • Category of the recipe.
  • Optional. Limited to one category per recipe.
  • Rationale: While hRecipe recommends tags for this, we find that the category of the recipe is often treated differently in published recipes and we'd like to try to promote it out of the tags.

Example

<span class="category">Side dish</span>
difficulty
  • Difficulty level of preparing the recipe.
  • Optional. The value should be encoded as a fraction using the value-title class defined in the value-class-pattern. Limited to one difficulty per recipe.
  • Rationale: While hRecipe recommends tags for this, we find that the difficulty of the recipe is often expressed in published recipes as a specific ratio.

Example

<span class="difficulty"><span class="value-title" title="1/3" />Easy</span>
rating
  • Rating of the recipe.
  • Optional. The value should be encoded as a fraction using the value-title class defined in the value-class-pattern. Limited to one rating per recipe.
  • While hRecipe recommends tags for this, we find that the rating of the recipe is often expressed in published recipes as a specific ratio.

Example

<span class="rating"><span class="value-title" title="4/5" /><img src="/images/4-out-of-5-stars.jpg" /></span>

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

See now: