Exclude "favourite dish" intro if menu is a "wish"

This commit is contained in:
Mikkel Munch Mortensen 2024-01-29 08:41:52 +01:00
parent 882c8afd8e
commit 540a984c02

View file

@ -166,6 +166,7 @@ else:
# Determine appropriate emojis for the menu. # Determine appropriate emojis for the menu.
emojis = [] emojis = []
for emoji, keywords in { for emoji, keywords in {
"genie": ["ønske"],
"birthday": ["tillykke", "fødselsdag"], "birthday": ["tillykke", "fødselsdag"],
"flag-in": ["indisk", "indien"], "flag-in": ["indisk", "indien"],
"flag-gr": ["græsk ", "grækenland"], "flag-gr": ["græsk ", "grækenland"],
@ -174,16 +175,19 @@ else:
"flag-us": ["amerikansk"], "flag-us": ["amerikansk"],
"flag-th": ["thai"], "flag-th": ["thai"],
"hushed": ["surprise", "surprice"], "hushed": ["surprise", "surprice"],
"tema": [" tema", "tema "], "crown": ["kong"],
"jack_o_lantern": ["halloween"], "jack_o_lantern": ["halloween"],
"spider_web": ["halloween"], "spider_web": ["halloween"],
"bat": ["halloween"], "bat": ["halloween"],
"ghost": ["halloween"], "ghost": ["halloween"],
"christmas_tree": ["julefrokost"],
"santa": ["julefrokost"],
"building_construction": ["byg selv", "byg-selv", "bygselv"], "building_construction": ["byg selv", "byg-selv", "bygselv"],
"butter": ["smør", "butter"], "butter": ["smør", "butter"],
"fish": [ "fish": [
"fisk", "fisk",
"laks","rødspætte", "laks",
"rødspætte",
"sej ", "sej ",
"kulmule", "kulmule",
"brosme", "brosme",
@ -205,6 +209,7 @@ else:
"hot_pepper": ["chili", "hot sauce"], "hot_pepper": ["chili", "hot sauce"],
"onion": [" løg"], "onion": [" løg"],
"carrot": ["gulerod", "gulerød"], "carrot": ["gulerod", "gulerød"],
"tangerine": ["orange", "appelsin"],
"garlic": ["hvidløg"], "garlic": ["hvidløg"],
"avocado": ["avocado", "avokado"], "avocado": ["avocado", "avokado"],
"mango": ["mango"], "mango": ["mango"],
@ -221,6 +226,7 @@ else:
"sandwich": ["sandwich"], "sandwich": ["sandwich"],
"stuffed_flatbread": ["pita"], "stuffed_flatbread": ["pita"],
"flatbread": ["naanbrød", " naan", "fladbrød"], "flatbread": ["naanbrød", " naan", "fladbrød"],
"taco": ["taco"],
"pie": ["tærte"], "pie": ["tærte"],
"hotdog": ["hotdog", "pølse"], "hotdog": ["hotdog", "pølse"],
"fries": ["fritter "], "fries": ["fritter "],
@ -288,16 +294,20 @@ else:
"søndag", "søndag",
][datetime.datetime.now().weekday()], ][datetime.datetime.now().weekday()],
} }
introduction = random.choice(
[ # Pick an introduction. Now that the canteen operates with "wishes"
"dagens menu er", # from us, we're only adding the "favourite dish" introduction if the
"i dag forkæler kantinen os med", # menu is *not* a wish.
"du kan godt glæde dig til senere! For vi skal have", introductions = [
"der bliver knoklet i køkkenet for at blive klar til at servere", "dagens menu er",
"klokken 11:00 har kantinen fremtryllet en lækker omgang", "i dag forkæler kantinen os med",
"i dag skal vi have {persons} livret:", "du kan godt glæde dig til senere! For vi skal have",
] "der bliver knoklet i køkkenet for at blive klar til at servere",
) "klokken 11:00 har kantinen fremtryllet en lækker omgang",
]
if "ønske" not in menu.lower():
introductions.append("i dag skal vi have {persons} livret:")
introduction = random.choice(introductions)
if random.randint(0, 2) == 0: if random.randint(0, 2) == 0:
introduction = ( introduction = (
random.choice(["Det er", "Så blev det"]) random.choice(["Det er", "Så blev det"])