From a73a072b0982b7a5b668e1cc915bf2b3c34a77c8 Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 10 Aug 2021 21:16:09 +0200 Subject: [PATCH] Adding hygienic label in ORF --- content/contents.lr | 2 +- models/zutaten.ini | 6 ++++++ templates/zutaten.yaml | 28 ++++++++++++++++------------ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/content/contents.lr b/content/contents.lr index bab25e0..f462386 100644 --- a/content/contents.lr +++ b/content/contents.lr @@ -93,7 +93,7 @@ box_content: Der klassische Waffelteig lässt sich mit Zutaten eurer Wahl verfeiern und verwandelt das Waffeln essen in ein neues Abendteuer. -Es gibt Zimt, Kardamom, Chilli, frische Kräuter und vieles mehr. Probiert es doch mal aus. +Es gibt zum Beispiel Zimt, Kardamom, Chilli, frische Kräuter und vieles mehr. Probiert es doch mal aus. ----- box_link: verfeinerter Teig ----- diff --git a/models/zutaten.ini b/models/zutaten.ini index 49df051..af49d15 100644 --- a/models/zutaten.ini +++ b/models/zutaten.ini @@ -75,7 +75,13 @@ width = 1/3 [fields.source_authors] label = Author type = string +width = 1/2 [fields.x_license] label = License type = string +width = 1/2 + +[fields.render_hygiene] +label = Render Hygiene Hinweise +type = boolean diff --git a/templates/zutaten.yaml b/templates/zutaten.yaml index b924372..f3e7e4e 100644 --- a/templates/zutaten.yaml +++ b/templates/zutaten.yaml @@ -1,24 +1,24 @@ --- -{# -definition_ORF: "https://open-recipe-format.readthedocs.io/en/latest/topics/reference/orf.html" -json_schema: "https://raw.githubusercontent.com/techhat/openrecipeformat/master/schema.json" -validator: "https://json-schema.org/" -validator_steps: +{#- +X-definition_ORF: "https://open-recipe-format.readthedocs.io/en/latest/topics/reference/orf.html" +X-json_schema: "https://raw.githubusercontent.com/techhat/openrecipeformat/master/schema.json" +X-validator: "https://json-schema.org/" +X-validator_steps: - "pip3 install jsonschema" - "install yq" - "wget {{ json_schema }}" - "curl rezep.yaml | yq -j > rezept.json" - "jsonschema -i rezept.json schema.json" -usda_lookup: "https://fdc.nal.usda.gov/fdc-app.html" -#} +X-usda_lookup: "https://fdc.nal.usda.gov/fdc-app.html" -#} {%- if this.recipe_name and this.recipe_name != "" -%} - recipe_name: "{{ this.recipe_name | default(this.title) }}" + {{- '\nrecipe_name: ' -}} "{{- this.recipe_name | default(this.title) -}}" {%- else -%} - recipe_name: "{{ this.title }}" + {{- '\nrecipe_name: ' -}} "{{- this.title -}}" {%- endif -%} -{{- '\nrecipe_uuid: ' -}} "{{ this._gid }}" +{{- '\nrecipe_uuid: ' -}} "{{- this._gid -}}" {%- include "zutaten/yields.yaml" -%} @@ -29,10 +29,14 @@ usda_lookup: "https://fdc.nal.usda.gov/fdc-app.html" -#} {%- include "zutaten/oven.yaml" -%} {%- if this.source_authors is defined and this.source_authors != "" -%} - {{ '\n\nsource_authors:'}} "{{ this.source_authors }}" + {{- '\n\nsource_authors: ' -}} "{{ this.source_authors }}" {%- endif -%} {%- if this.x_license is defined and this.x_license != "" -%} - {{ '\nX-License:' }} "{{ this.x_license }}" + {{- '\nX-License: ' -}} "{{ this.x_license }}" +{%- endif -%} +{%- if this.render_hygiene | default(True) -%} + {{- '\nX-hygiene_flyer: ' -}} "https://wiki.c3gelb.de/doku.php?id=public:flyer" + {{- '\nX-hygiene_video: ' -}} "https://youtu.be//w-4_5J0xk7A" {%- endif -%} {{ '\nsource_url:' }} "{{ '../'|url(external=true) }}" -{#- source: "https://open-recipe-format.readthedocs.io/en/latest/topics/tutorials/walkthrough.html" -#} +{#- X-ORF_source: "https://open-recipe-format.readthedocs.io/en/latest/topics/tutorials/walkthrough.html" -#}