Initial commit
This commit is contained in:
10
reports/cost.md.jinja
Normal file
10
reports/cost.md.jinja
Normal file
@@ -0,0 +1,10 @@
|
||||
# Cost Report
|
||||
{% set ns = namespace() %}
|
||||
{%- set ns.total = 0 %}
|
||||
{%- for ingredient in ingredients %}
|
||||
{%- set price = db(ingredient.name ~ '.shopping.price_per_unit') * (ingredient.quantity.value | float) %}
|
||||
* {{ ingredient.name }}: {{ price | number_to_currency }}
|
||||
{%- set ns.total = ns.total + price %}
|
||||
{%- endfor %}
|
||||
|
||||
Total: ${{ ns.total | format_price }}
|
||||
9
reports/ingredients.md.jinja
Normal file
9
reports/ingredients.md.jinja
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ metadata }}
|
||||
|
||||
Scale: {{ scale }}x
|
||||
|
||||
## Ingredients
|
||||
{%- for ingredient in ingredients %}
|
||||
- {{ ingredient.name }} {{ ingredient.quantity }}
|
||||
{%- endfor %}
|
||||
|
||||
13
reports/recipe-card.md.jinja
Normal file
13
reports/recipe-card.md.jinja
Normal file
@@ -0,0 +1,13 @@
|
||||
**Servings:** {{ metadata.servings }}
|
||||
|
||||
## Ingredients
|
||||
{%- for ingredient in ingredients %}
|
||||
- {{ ingredient.quantity }} {{ ingredient.unit }} {{ ingredient.name }}
|
||||
{%- endfor %}
|
||||
|
||||
## Instructions
|
||||
{% for section in sections %}
|
||||
{% for content in section %}
|
||||
{{ content }}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
Reference in New Issue
Block a user