From 9a4eb72956774058896128d00990ddf2a6b193f1 Mon Sep 17 00:00:00 2001 From: sij-ai <67624670+sij-ai@users.noreply.github.com> Date: Fri, 1 Aug 2025 17:50:39 -0700 Subject: [PATCH 01/10] Create WhiteHouseExecutiveOrdersBridge.php Returns the latest executive orders from The White House --- bridges/WhiteHouseExecutiveOrdersBridge.php | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 bridges/WhiteHouseExecutiveOrdersBridge.php diff --git a/bridges/WhiteHouseExecutiveOrdersBridge.php b/bridges/WhiteHouseExecutiveOrdersBridge.php new file mode 100644 index 00000000000..24d9b4f341a --- /dev/null +++ b/bridges/WhiteHouseExecutiveOrdersBridge.php @@ -0,0 +1,35 @@ +getURI()); + $articles = $html->find('ul.wp-block-post-template li.wp-block-post'); + + foreach ($articles as $article) { + $item = []; + $titleElement = $article->find('h2.wp-block-post-title a', 0); + if (!$titleElement) { + continue; + } + + $item['title'] = trim($titleElement->plaintext); + $item['uri'] = $titleElement->href; + + $dateElement = $article->find('div.wp-block-post-date time', 0); + if ($dateElement && !empty($dateElement->datetime)) { + $item['timestamp'] = strtotime($dateElement->datetime); + } + + $item['content'] = '
Read the full executive order: ' . $item['title'] . '
'; + $item['uid'] = $item['uri']; + $this->items[] = $item; + } + } +} From 9f632c423194cd64ac9b8556335b80f192952820 Mon Sep 17 00:00:00 2001 From: sij-ai <67624670+sij-ai@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:23:52 -0700 Subject: [PATCH 02/10] Create WhiteHouseBridge.php shared by all White House bridges --- bridges/WhiteHouseBridge.php | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 bridges/WhiteHouseBridge.php diff --git a/bridges/WhiteHouseBridge.php b/bridges/WhiteHouseBridge.php new file mode 100644 index 00000000000..39e88e6e7d4 --- /dev/null +++ b/bridges/WhiteHouseBridge.php @@ -0,0 +1,42 @@ +getURI()); + + $articles = $html->find('ul.wp-block-post-template li.wp-block-post'); + + foreach ($articles as $article) { + $item = []; + + $titleElement = $article->find('h2.wp-block-post-title a', 0); + if (!$titleElement) { + continue; + } + + $item['title'] = trim($titleElement->plaintext); + $item['uri'] = $titleElement->href; + + $dateElement = $article->find('div.wp-block-post-date time', 0); + if ($dateElement && !empty($dateElement->datetime)) { + $item['timestamp'] = strtotime($dateElement->datetime); + } + + // Add categories from the meta tags for better filtering + $categories = []; + foreach($article->find('div.taxonomy-category a') as $categoryLink) { + $categories[] = trim($categoryLink->plaintext); + } + if(!empty($categories)) { + $item['categories'] = $categories; + } + + $item['content'] = ''; + $item['uid'] = $item['uri']; + + $this->items[] = $item; + } + } +} From e283db8f8d974e7d92a567c1da01c58f4b4ae446 Mon Sep 17 00:00:00 2001 From: sij-ai <67624670+sij-ai@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:24:44 -0700 Subject: [PATCH 03/10] Create WhiteHousePresidentialActionsBridge.php Returns all Presidential Actions from The White House. --- bridges/WhiteHousePresidentialActionsBridge.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bridges/WhiteHousePresidentialActionsBridge.php diff --git a/bridges/WhiteHousePresidentialActionsBridge.php b/bridges/WhiteHousePresidentialActionsBridge.php new file mode 100644 index 00000000000..534d8fe3be2 --- /dev/null +++ b/bridges/WhiteHousePresidentialActionsBridge.php @@ -0,0 +1,11 @@ + Date: Fri, 1 Aug 2025 18:25:28 -0700 Subject: [PATCH 04/10] Create WhiteHouseNominationsBridge.php Returns Nominations & Appointments from The White House --- bridges/WhiteHouseNominationsBridge.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bridges/WhiteHouseNominationsBridge.php diff --git a/bridges/WhiteHouseNominationsBridge.php b/bridges/WhiteHouseNominationsBridge.php new file mode 100644 index 00000000000..aaf83f3d98e --- /dev/null +++ b/bridges/WhiteHouseNominationsBridge.php @@ -0,0 +1,11 @@ + Date: Fri, 1 Aug 2025 18:26:03 -0700 Subject: [PATCH 05/10] Create WhiteHouseMemorandaBridge.php Returns Presidential Memoranda from The White House --- bridges/WhiteHouseMemorandaBridge.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bridges/WhiteHouseMemorandaBridge.php diff --git a/bridges/WhiteHouseMemorandaBridge.php b/bridges/WhiteHouseMemorandaBridge.php new file mode 100644 index 00000000000..f6fb7f18d3c --- /dev/null +++ b/bridges/WhiteHouseMemorandaBridge.php @@ -0,0 +1,11 @@ + Date: Fri, 1 Aug 2025 18:26:31 -0700 Subject: [PATCH 06/10] Delete bridges/WhiteHouseExecutiveOrdersBridge.php --- bridges/WhiteHouseExecutiveOrdersBridge.php | 35 --------------------- 1 file changed, 35 deletions(-) delete mode 100644 bridges/WhiteHouseExecutiveOrdersBridge.php diff --git a/bridges/WhiteHouseExecutiveOrdersBridge.php b/bridges/WhiteHouseExecutiveOrdersBridge.php deleted file mode 100644 index 24d9b4f341a..00000000000 --- a/bridges/WhiteHouseExecutiveOrdersBridge.php +++ /dev/null @@ -1,35 +0,0 @@ -getURI()); - $articles = $html->find('ul.wp-block-post-template li.wp-block-post'); - - foreach ($articles as $article) { - $item = []; - $titleElement = $article->find('h2.wp-block-post-title a', 0); - if (!$titleElement) { - continue; - } - - $item['title'] = trim($titleElement->plaintext); - $item['uri'] = $titleElement->href; - - $dateElement = $article->find('div.wp-block-post-date time', 0); - if ($dateElement && !empty($dateElement->datetime)) { - $item['timestamp'] = strtotime($dateElement->datetime); - } - - $item['content'] = 'Read the full executive order: ' . $item['title'] . '
'; - $item['uid'] = $item['uri']; - $this->items[] = $item; - } - } -} From a207d963b5110e2d5f6b8452e847bc642b042721 Mon Sep 17 00:00:00 2001 From: sij-ai <67624670+sij-ai@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:27:04 -0700 Subject: [PATCH 07/10] Create WhiteHouseProclamationsBridge.php Returns Proclamations from The White House --- bridges/WhiteHouseProclamationsBridge.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bridges/WhiteHouseProclamationsBridge.php diff --git a/bridges/WhiteHouseProclamationsBridge.php b/bridges/WhiteHouseProclamationsBridge.php new file mode 100644 index 00000000000..3c98db4e362 --- /dev/null +++ b/bridges/WhiteHouseProclamationsBridge.php @@ -0,0 +1,11 @@ + Date: Fri, 1 Aug 2025 18:27:39 -0700 Subject: [PATCH 08/10] Create WhiteHouseExecutiveOrdersBridge.php Returns Executive Orders from The White House --- bridges/WhiteHouseExecutiveOrdersBridge.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bridges/WhiteHouseExecutiveOrdersBridge.php diff --git a/bridges/WhiteHouseExecutiveOrdersBridge.php b/bridges/WhiteHouseExecutiveOrdersBridge.php new file mode 100644 index 00000000000..f65e0804974 --- /dev/null +++ b/bridges/WhiteHouseExecutiveOrdersBridge.php @@ -0,0 +1,11 @@ + Date: Fri, 1 Aug 2025 18:29:53 -0700 Subject: [PATCH 09/10] Update CONTRIBUTORS.md Add sij-ai to CONTRIBUTORS.md (contributed White House bridges) --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d27421aa969..27688e7d829 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -183,6 +183,7 @@ * [shutosg](https://github.com/shutosg) * [simon816](https://github.com/simon816) * [Simounet](https://github.com/Simounet) +* [sij-ai](https://github.com/sij-ai) * [somini](https://github.com/somini) * [SpangleLabs](https://github.com/SpangleLabs) * [SqrtMinusOne](https://github.com/SqrtMinusOne) From 17fea16cb9bd70c5647af01b07f793fd43880ae2 Mon Sep 17 00:00:00 2001 From: Sangye Ince-JohannsenCould not extract full content, selector may need to be updated.
'; } diff --git a/bridges/IdealoBridge.php b/bridges/IdealoBridge.php index 05a2ebb89c8..1b32bc01a47 100644 --- a/bridges/IdealoBridge.php +++ b/bridges/IdealoBridge.php @@ -119,11 +119,11 @@ private function getPriceTrend($NewPrice, $OldPrice) // In case there is no old Price, then show no trend if ($OldPrice === null || $OldPrice == 0) { $trend = ''; - } else if ($NewPrice > $OldPrice) { + } elseif ($NewPrice > $OldPrice) { $trend = '↗'; - } else if ($NewPrice == $OldPrice) { + } elseif ($NewPrice == $OldPrice) { $trend = '➡'; - } else if ($NewPrice < $OldPrice) { + } elseif ($NewPrice < $OldPrice) { $trend = '↘'; } return $trend; @@ -159,11 +159,11 @@ public function collectData() $PriceNew = $ActualNewPrice->find('strong', 0)->plaintext; // Save current price $this->saveCacheValue($KeyNEW, $PriceNew); - } else if ($altPrice) { + } elseif ($altPrice) { // Get price from first List item if no New/used Buttons available $PriceNew = trim($altPrice->plaintext); $this->saveCacheValue($KeyNEW, $PriceNew); - } else if (($ActualNewPrice === null || $altPrice === null) && $ActualUsedPrice !== null) { + } elseif (($ActualNewPrice === null || $altPrice === null) && $ActualUsedPrice !== null) { // In case there is no actual New Price and a Used Price exists, then delete the previous value in the cache $this->cache->delete($this->getShortName() . '_' . $KeyNEW); } @@ -173,7 +173,7 @@ public function collectData() $PriceUsed = $ActualUsedPrice->find('strong', 0)->plaintext; // Save current price $this->saveCacheValue($KeyUSED, $PriceUsed); - } else if ($ActualUsedPrice === null && ($ActualNewPrice !== null || $altPrice !== null)) { + } elseif ($ActualUsedPrice === null && ($ActualNewPrice !== null || $altPrice !== null)) { // In case there is no actual Used Price and a New Price exists, then delete the previous value in the cache $this->cache->delete($this->getShortName() . '_' . $KeyUSED); } diff --git a/bridges/LeagueOfLegendsNewsBridge.php b/bridges/LeagueOfLegendsNewsBridge.php index 57e4f792172..acbdcf8942b 100644 --- a/bridges/LeagueOfLegendsNewsBridge.php +++ b/bridges/LeagueOfLegendsNewsBridge.php @@ -98,7 +98,7 @@ private function getSiteUrl() if ($onlyPatchNotes) { return $url . '/tags/patch-notes'; - } else if ($category === 'all') { + } elseif ($category === 'all') { return $url; } diff --git a/bridges/NextInkBridge.php b/bridges/NextInkBridge.php index d9410d514ce..48ec7a95c63 100644 --- a/bridges/NextInkBridge.php +++ b/bridges/NextInkBridge.php @@ -79,7 +79,7 @@ public function collectData() $url = $url . '?category=' . $category; } $this->collectArticlesFromHtmlListing($url, $limit); - } else if ($feed === 'free') { + } elseif ($feed === 'free') { // Expand Free RSS feed $url = self::URI . 'feed/free'; $this->collectExpandableDatas($url, $limit); diff --git a/bridges/OpenCVEBridge.php b/bridges/OpenCVEBridge.php index 1e528322a41..a2c8dda8f7a 100644 --- a/bridges/OpenCVEBridge.php +++ b/bridges/OpenCVEBridge.php @@ -302,10 +302,10 @@ private function formatCVSSLabel($score, $version, $critical_thr, $high_thr, $me if ($score >= $critical_thr) { $importance = 'CRITICAL'; $class = 'cvss-crit-color'; - } else if ($score >= $high_thr) { + } elseif ($score >= $high_thr) { $importance = 'HIGH'; $class = 'cvss-high-color'; - } else if ($score >= $medium_thr) { + } elseif ($score >= $medium_thr) { $importance = 'MEDIUM'; $class = 'cvss-medium-color'; } else { diff --git a/bridges/PepperBridgeAbstract.php b/bridges/PepperBridgeAbstract.php index 43dbe82906e..a835001f53f 100644 --- a/bridges/PepperBridgeAbstract.php +++ b/bridges/PepperBridgeAbstract.php @@ -527,7 +527,7 @@ private function getGroupURI() // This permit to keep the existing Feed to work if ($order == $this->i8n('context-hot')) { $sortBy = 'temp'; - } else if ($order == $this->i8n('context-new')) { + } elseif ($order == $this->i8n('context-new')) { $sortBy = 'new'; } diff --git a/bridges/ScientificAmericanBridge.php b/bridges/ScientificAmericanBridge.php index 51cdc0d9f2e..15d01b7f234 100644 --- a/bridges/ScientificAmericanBridge.php +++ b/bridges/ScientificAmericanBridge.php @@ -155,11 +155,11 @@ private function updateItem($item) } else { $res .= $block->outertext; } - } else if ($block->tag == 'h2') { + } elseif ($block->tag == 'h2') { $res .= '