From: Max Value Date: Tue, 13 May 2025 00:23:24 +0000 (+0100) Subject: Added descriptions to main recipe list X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=1cd29c397d55183481323f37859d934d4558e6e7;p=bread Added descriptions to main recipe list --- diff --git a/sous.py b/sous.py index 6994bce..9b91fe3 100755 --- a/sous.py +++ b/sous.py @@ -32,9 +32,17 @@ class RecipeBook: for word in recipe.recipe["information"]["keywords"]: if word in keywords: - keywords[word].append((recipe.recipe["information"]["title"], recipe.recipe["html"])) + keywords[word].append(( + recipe.recipe["html"], + recipe.recipe["information"]["title"], + recipe.recipe["information"]["description"] + )) else: - keywords |= { word: [(recipe.recipe["information"]["title"], recipe.recipe["html"])]} + keywords |= { word: [( + recipe.recipe["html"], + recipe.recipe["information"]["title"], + recipe.recipe["information"]["description"] + )]} template = self.html_environment.get_template("index.html") with open("index.html", "w") as f: diff --git a/templates/index.html b/templates/index.html index 1515464..4535d10 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,7 +18,7 @@

All recipes

Keywords

@@ -26,7 +26,7 @@

{{ word }}

{% endfor %}