From f21a9418658574e843fe990525bb5821ea56bfb2 Mon Sep 17 00:00:00 2001 From: Mikkel Munch Mortensen <3xm@detfalskested.dk> Date: Thu, 26 Oct 2023 14:15:13 +0200 Subject: [PATCH] Fix bug with multi-line menus They would break the link in Slack. So we make sure to keep menus on a single line. Also add a bunch of new emojis. --- frokostbot.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/frokostbot.py b/frokostbot.py index 15c70ed..b66dc39 100644 --- a/frokostbot.py +++ b/frokostbot.py @@ -149,7 +149,7 @@ else: if menu is None: sys.stderr.write("Unable to find the menu of today :(\n") sys.exit(1) - menu = menu["Menutekst"] + menu = menu["Menutekst"].replace("\n", " ") sys.stdout.write(f"The menu of today ({today}) is: {menu}\n") # Determine appropriate emojis for the menu. @@ -161,9 +161,24 @@ else: "flag-es": ["spansk", "spanien"], "flag-kr": ["korea"], "flag-us": ["amerikansk"], + "flag-th": ["thai"], "hushed": ["surprise", "surprice"], + "jack_o_lantern": ["halloween"], + "spider_web": ["halloween"], + "bat": ["halloween"], + "ghost": ["halloween"], "building_construction": ["byg selv", "byg-selv", "bygselv"], - "fish": ["fisk", "laks", "rødspætte", "sej ", "kulmule", "brosme", "kuller"], + "butter": ["smør", "butter"], + "fish": [ + "fisk", + "laks","rødspætte", + "sej ", + "kulmule", + "brosme", + "kuller", + "multe", + "torsk", + ], "shrimp": ["reje"], "pig2": ["skinke", "gris", "nakkefilet", "nakke filet", "flæsk", "pork"], "cow": ["hakkebøf"], @@ -173,7 +188,7 @@ else: "rabbit2": [" hare"], "rooster": ["coq au vin"], "egg": [" æg ", " ægge"], - "butter": ["smør"], + "fried_egg": ["spejlæg"], "falafel": ["falafel"], "hot_pepper": ["chili", "hot sauce"], "onion": [" løg"], @@ -193,7 +208,7 @@ else: "hamburger": ["burger"], "sandwich": ["sandwich"], "stuffed_flatbread": ["pita"], - "flatbread": ["naanbrød", " naan"], + "flatbread": ["naanbrød", " naan", "fladbrød"], "pie": ["tærte"], "hotdog": ["hotdog", "pølse"], "fries": ["fritter "], @@ -203,10 +218,12 @@ else: "stew": ["gryde", "gullasch"], "rice": [" ris "], "ramen": ["nudler"], + "burrito": ["tortilla"], "cloud": ["sky"], "potato": ["kartoffel", "kartofler"], "tomato": ["tomat"], "apple": ["æble"], + "beer": ["øl ", " øl"], "peanuts": ["peanut"], "baguette_bread": ["flute"], "green_salad": ["mixed salat"],