Changeset 4 in recipecards for trunk/recipe2xml


Ignore:
Timestamp:
09/11/13 19:49:05 (11 years ago)
Author:
peter
Message:
  • put the recipe XML into a namespace (http://xmlns.grim.ath.cx/recipe)
  • match "degrees" and turn it into a degree symbol
  • added a recipe.html.xsl stylesheet that transforms recipe XML into HTML marked up with the hRecipe microformat
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/recipe2xml

    r2 r4  
    22use strict; 
    33 
     4#TODO: look at this existing XML format: http://www.happy-monkey.net/recipebook/doc/author-tutorial.html 
     5 
    46$/ = ''; 
    57 
    6 print "<recipe>\n"; 
     8print qq{<recipe xmlns="http://xmlns.grim.ath.cx/recipe">\n}; 
    79while (<>) { 
    810    chomp; 
     
    3739        s/(\d)x/$1⨯/g; 
    3840        # temperature 
    39         s/(\d)\s*deg.(\s*F)?/$1℉/g; 
     41        s/(\d)\s*deg(\.|rees)(\s*F)?/$1℉/g; 
    4042        # fractions 
    4143        s{1/3}{⅓}g; 
Note: See TracChangeset for help on using the changeset viewer.