From 4cfa80e9fcd8d385367c449e6e8634dce8c1232f Mon Sep 17 00:00:00 2001 From: SansGuidon Date: Wed, 15 Jan 2025 07:34:45 +0000 Subject: [PATCH] feat(journeesmondiales) include event description in feed item body --- cron/generate_journees_mondiales.php | 37 ++++++++++++---------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/cron/generate_journees_mondiales.php b/cron/generate_journees_mondiales.php index 55f2e71..3175c6b 100644 --- a/cron/generate_journees_mondiales.php +++ b/cron/generate_journees_mondiales.php @@ -1,17 +1,13 @@ 'janvier', 'February' => 'février', 'March' => 'mars', 'April' => 'avril', 'May' => 'mai', 'June' => 'juin', 'July' => 'juillet', @@ -19,18 +15,14 @@ $monthsTranslation = [ 'November' => 'novembre', 'December' => 'décembre' ]; -// Get today's date in French $currentDate = date("j F"); $currentDateParts = explode(' ', $currentDate); $currentDay = $currentDateParts[0]; $currentMonth = $monthsTranslation[$currentDateParts[1]] ?? $currentDateParts[1]; $currentDateFr = $currentDay . ' ' . $currentMonth; -// Fetch and parse events from the webpage $html = file_get_contents($eventsUrl); -if (!$html) { - die("Erreur : Impossible de récupérer les événements depuis $eventsUrl"); -} +if (!$html) die; preg_match_all( '/]*>]*>