From 008888e08c9dcb834dd5c79178001aa9d63da2c7 Mon Sep 17 00:00:00 2001 From: mike Date: Thu, 18 Dec 2025 15:28:30 +0100 Subject: [PATCH] init --- ...-nten-nederland-moet-zich-in-eu-verze.json | 92 ++++++++++++++++++ ...nderzoek-dat-schade-van-apps-op-menta.json | 95 +++++++++++++++++++ ...t-tientallen-queer-en-abortus-account.json | 85 +++++++++++++++++ data/index.json | 4 +- tools/puzzle-gen/generate_daily_puzzles.py | 26 +++-- 5 files changed, 293 insertions(+), 9 deletions(-) create mode 100644 data/crossword_2025-12-18_01_parkinsonpati-nten-nederland-moet-zich-in-eu-verze.json create mode 100644 data/crossword_2025-12-18_03_meta-blokkeert-tientallen-queer-en-abortus-account.json diff --git a/data/crossword_2025-12-18_01_parkinsonpati-nten-nederland-moet-zich-in-eu-verze.json b/data/crossword_2025-12-18_01_parkinsonpati-nten-nederland-moet-zich-in-eu-verze.json new file mode 100644 index 0000000..49ac707 --- /dev/null +++ b/data/crossword_2025-12-18_01_parkinsonpati-nten-nederland-moet-zich-in-eu-verze.json @@ -0,0 +1,92 @@ +{ + "gridv2": [ + "###########", + "###########", + "##EUROPA#N#", + "######A##A#", + "####VERZET#", + "######K##U#", + "######I##U#", + "###KLANK#R#", + "######F##B#", + "###########" + ], + "words": [ + { + "word": "KLANK", + "clue": "Stemmen voor een betere toekomst", + "startRow": 7, + "startCol": 3, + "direction": "horizontal", + "answer": "KLANK", + "arrowRow": 7, + "arrowCol": 2 + }, + { + "word": "PARKIN", + "clue": "Dergelijke aandoening beïnvloedt beweging", + "startRow": 2, + "startCol": 6, + "direction": "vertical", + "answer": "PARKIN", + "arrowRow": 1, + "arrowCol": 6 + }, + { + "word": "VERZET", + "clue": "Collectief optreden tegen beleid", + "startRow": 4, + "startCol": 4, + "direction": "horizontal", + "answer": "VERZET", + "arrowRow": 4, + "arrowCol": 3 + }, + { + "word": "NATUUR", + "clue": "Leefgebied voor planten en dieren", + "startRow": 2, + "startCol": 9, + "direction": "vertical", + "answer": "NATUUR", + "arrowRow": 1, + "arrowCol": 9 + }, + { + "word": "EUROPA", + "clue": "Het politieke blok waarin Nederland deel uitmaakt", + "startRow": 2, + "startCol": 2, + "direction": "horizontal", + "answer": "EUROPA", + "arrowRow": 2, + "arrowCol": 1 + }, + { + "word": "PARKINF", + "clue": "Afkorting Parkinson", + "startRow": 2, + "startCol": 6, + "direction": "vertical", + "answer": "PARKINF", + "arrowRow": 1, + "arrowCol": 6 + }, + { + "word": "NATUURB", + "clue": "Bescherming van natuurgebieden", + "startRow": 2, + "startCol": 9, + "direction": "vertical", + "answer": "NATUURB", + "arrowRow": 1, + "arrowCol": 9 + } + ], + "difficulty": 1, + "rewards": { + "coins": 50, + "stars": 2, + "hints": 1 + } +} \ No newline at end of file diff --git a/data/crossword_2025-12-18_02_meta-stopte-onderzoek-dat-schade-van-apps-op-menta.json b/data/crossword_2025-12-18_02_meta-stopte-onderzoek-dat-schade-van-apps-op-menta.json index e69de29..e896814 100644 --- a/data/crossword_2025-12-18_02_meta-stopte-onderzoek-dat-schade-van-apps-op-menta.json +++ b/data/crossword_2025-12-18_02_meta-stopte-onderzoek-dat-schade-van-apps-op-menta.json @@ -0,0 +1,95 @@ +{ + "gridv2": [ + "#############", + "#############", + "##I#O####D###", + "##N#N####O#S#", + "##S#D####C#C#", + "##T#E#M##U#H#", + "##A#R#E##M#A#", + "##GEZONDHEID#", + "##R#O#T##N#E#", + "##A#E#A##T###", + "##M#K#A#META#", + "######L##N###", + "#############" + ], + "words": [ + { + "word": "GEZONDHEID", + "clue": "Welzijn", + "startRow": 7, + "startCol": 2, + "direction": "horizontal", + "answer": "GEZONDHEID", + "arrowRow": 7, + "arrowCol": 1 + }, + { + "word": "DOCUMENTEN", + "clue": "Papieren", + "startRow": 2, + "startCol": 9, + "direction": "vertical", + "answer": "DOCUMENTEN", + "arrowRow": 1, + "arrowCol": 9 + }, + { + "word": "INSTAGRAM", + "clue": "Platform", + "startRow": 2, + "startCol": 2, + "direction": "vertical", + "answer": "INSTAGRAM", + "arrowRow": 1, + "arrowCol": 2 + }, + { + "word": "ONDERZOEK", + "clue": "Studie", + "startRow": 2, + "startCol": 4, + "direction": "vertical", + "answer": "ONDERZOEK", + "arrowRow": 1, + "arrowCol": 4 + }, + { + "word": "MENTAAL", + "clue": "Geestelijk", + "startRow": 5, + "startCol": 6, + "direction": "vertical", + "answer": "MENTAAL", + "arrowRow": 4, + "arrowCol": 6 + }, + { + "word": "SCHADE", + "clue": "Negatief effect", + "startRow": 3, + "startCol": 11, + "direction": "vertical", + "answer": "SCHADE", + "arrowRow": 2, + "arrowCol": 11 + }, + { + "word": "META", + "clue": "Stopte onderzoek", + "startRow": 10, + "startCol": 8, + "direction": "horizontal", + "answer": "META", + "arrowRow": 10, + "arrowCol": 7 + } + ], + "difficulty": 1, + "rewards": { + "coins": 50, + "stars": 2, + "hints": 1 + } +} \ No newline at end of file diff --git a/data/crossword_2025-12-18_03_meta-blokkeert-tientallen-queer-en-abortus-account.json b/data/crossword_2025-12-18_03_meta-blokkeert-tientallen-queer-en-abortus-account.json new file mode 100644 index 0000000..7a1c354 --- /dev/null +++ b/data/crossword_2025-12-18_03_meta-blokkeert-tientallen-queer-en-abortus-account.json @@ -0,0 +1,85 @@ +{ + "gridv2": [ + "############", + "############", + "#########Q##", + "#########U##", + "#########E##", + "##P##VRAGEN#", + "##L##E###R##", + "##ABORTUS###", + "##A##S######", + "##T##L######", + "##J##AFMELD#", + "##E##G######", + "############" + ], + "words": [ + { + "word": "ABORTUS", + "clue": "Medische term voor zwangerschap beëindigen", + "startRow": 7, + "startCol": 2, + "direction": "horizontal", + "answer": "ABORTUS", + "arrowRow": 7, + "arrowCol": 1 + }, + { + "word": "VERSLAG", + "clue": "Schriftelijke of mondelinge informatie over iets", + "startRow": 5, + "startCol": 5, + "direction": "vertical", + "answer": "VERSLAG", + "arrowRow": 4, + "arrowCol": 5 + }, + { + "word": "PLAATJE", + "clue": "Korte afbeelding die gedeeld wordt", + "startRow": 5, + "startCol": 2, + "direction": "vertical", + "answer": "PLAATJE", + "arrowRow": 4, + "arrowCol": 2 + }, + { + "word": "AFMELD", + "clue": "Account weggeven uit het platform", + "startRow": 10, + "startCol": 5, + "direction": "horizontal", + "answer": "AFMELD", + "arrowRow": 10, + "arrowCol": 4 + }, + { + "word": "VRAGEN", + "clue": "Inzichten of informatie zoeken", + "startRow": 5, + "startCol": 5, + "direction": "horizontal", + "answer": "VRAGEN", + "arrowRow": 5, + "arrowCol": 4 + }, + { + "word": "QUEER", + "clue": "Overkoepelende term voor LGBTQ+ gemeenschap", + "startRow": 2, + "startCol": 9, + "direction": "vertical", + "answer": "QUEER", + "arrowRow": 1, + "arrowCol": 9 + } + ], + "difficulty": 1, + "rewards": { + "coins": 50, + "stars": 2, + "hints": 1 + } +} \ No newline at end of file diff --git a/data/index.json b/data/index.json index 579220d..172c2a2 100644 --- a/data/index.json +++ b/data/index.json @@ -2,10 +2,12 @@ "date": "2025-12-18", "files": [ "crossword_2025-12-18_01_duizenden-lachgascilinders-in-beslag-genomen-in-de.json", + "crossword_2025-12-18_01_parkinsonpati-nten-nederland-moet-zich-in-eu-verze.json", "crossword_2025-12-18_01_slechtste-slogan-van-het-jaar-over-verslavende-dru.json", "crossword_2025-12-18_02_meta-blokkeert-tientallen-queer-en-abortus-account.json", "crossword_2025-12-18_02_meta-stopte-onderzoek-dat-schade-van-apps-op-menta.json", "crossword_2025-12-18_03_30-11-in-nieuwsuur-pijn-bij-keizersnede-netanyahu-.json", - "crossword_2025-12-18_03_dan-bongino-stepping-down-as-fbi-deputy-director.json" + "crossword_2025-12-18_03_dan-bongino-stepping-down-as-fbi-deputy-director.json", + "crossword_2025-12-18_03_meta-blokkeert-tientallen-queer-en-abortus-account.json" ] } \ No newline at end of file diff --git a/tools/puzzle-gen/generate_daily_puzzles.py b/tools/puzzle-gen/generate_daily_puzzles.py index 136f9a0..2eae117 100644 --- a/tools/puzzle-gen/generate_daily_puzzles.py +++ b/tools/puzzle-gen/generate_daily_puzzles.py @@ -8,9 +8,15 @@ import urllib.request import xml.etree.ElementTree as ET import json, re -WORD_RE = re.compile(r"^[A-Z]{3,12}$") +# --- USER-FRIENDLY CONFIG --- +# Max 7 letters for shorter, more common words +WORD_RE = re.compile(r"^[A-Z]{3,7}$") EMPTY = " " -SIZE = 11 +# Slightly smaller grid for denser puzzles +SIZE = 10 +# More words needed since they're shorter +TARGET_WORDS = 15 +MIN_ACCEPT_WORDS = 10 FEEDS = [ "https://feeds.nos.nl/nosnieuwsalgemeen", @@ -91,7 +97,7 @@ def sanitize_wordcluemap(obj): Accepts: - dict: {"WORD":"clue", ...} - list: [{"word":"...","clue":"..."}, {"WOORD":"...","clue":"..."}, ...] - Returns dict with keys A-Z 3..12 and non-empty clue. + Returns dict with keys A-Z 3..7 and non-empty clue. """ out = {} @@ -289,9 +295,10 @@ Formaat exact: ... }} -Regels: -- WOORD: alleen letters A-Z, geen streepjes, geen cijfers, lengte 3..9. -- waarde: clue in het Nederlands, kort. +REGELS: +- WOORD: alleen letters A-Z, geen streepjes/cijfers, lengte 3..7. +- Gebruik KORTE, GEBRUIKELIJKE Nederlandse woorden (geen jargon, geen moeilijke termen). +- Clue: korte, duidelijke hint in het Nederlands. - Maak {n_words} items. Thema: {title} Context: {desc[:260]} @@ -315,7 +322,10 @@ Context: {desc[:260]} if len(wc) < max(6, n_words - 4): repair = f""" Zet dit om naar een STRICT JSON OBJECT (geen array) "WOORD":"clue". -WOORD: A-Z only, 3..9, geen streepjes/cijfers. Vervang ongeldige woorden door passende synoniemen. +KRITIEK: +- WOORD: A-Z only, lengte 3..7. GEEN lange woorden! +- Gebruik ALLEEN korte, bekende Nederlandse woorden bij twijfel. +- Vervang ongeldige/moeilijke woorden door veelvoorkomende synoniemen. Input: {content} """.strip() @@ -384,4 +394,4 @@ def main(): if __name__ == "__main__": - main() + main() \ No newline at end of file