From 24cfc5136e7d34e72661794e23f036f14fc8cc3e Mon Sep 17 00:00:00 2001 From: cynic Date: Fri, 22 Sep 2023 21:44:33 -0500 Subject: some misc. oracles stuff (fixes/features) (#15) fix a small calc.php bug, and add date information to the time module. the changes have been sitting on a branch for like a week, so I figured I'd cherry-pick them over to this branch for a PR. [as always, these changes are live on my instance.](https://4get.silly.computer/web?s=what+is+the+date&scraper=yandex&nsfw=yes) Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/15 Co-authored-by: cynic Co-committed-by: cynic --- oracles/calc.php | 2 +- oracles/time.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/oracles/calc.php b/oracles/calc.php index bcc127b..833749e 100644 --- a/oracles/calc.php +++ b/oracles/calc.php @@ -118,7 +118,7 @@ class calculator extends oracle { if (count($tokens) > 0 && $tokens[0][0] == "o" || $tokens[count($tokens)-1][0] == "o") { throw new Exception("Error Processing Request", 1); } - if (in_array(["g", "("], $tokens)) { + while (in_array(["g", "("], $tokens)) { $first_open = array_search(["g", "("], $tokens); $enclosedality = 1; for ($i = $first_open+1; $i < count($tokens); $i++) { diff --git a/oracles/time.php b/oracles/time.php index 57af093..954bc60 100644 --- a/oracles/time.php +++ b/oracles/time.php @@ -8,7 +8,7 @@ class time extends oracle { $prompts = [ "what", "time", "is", "it", "right", "now", "the", "current", - "get" + "get", "date" ]; $q = str_replace(",", "", $q); $q = str_replace("?", "", $q); @@ -37,6 +37,7 @@ class time extends oracle { date_default_timezone_set($timezone); return [ "The time in ".$timezone => date("H:i:s"), + " " => date("l, F jS"), "" => "include the string \"tz:XXX\" to use timezone XXX" ]; } -- cgit v1.2.3 From f42b3a487957f4b82bea79e8ac3cb8eae37413a0 Mon Sep 17 00:00:00 2001 From: pumuckel Date: Sat, 30 Sep 2023 08:35:24 -0500 Subject: optimize assets again (#17) pngoptimizer, truepng, pngout, optipng, leanify, pngwolf, pngrewrite, advpng, ect, pingo, deflopt, and defluff Co-authored-by: unknown <> Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/17 Co-authored-by: pumuckel Co-committed-by: pumuckel --- banner/4get-default.png | Bin 30756 -> 21969 bytes favicon.ico | Bin 393 -> 193 bytes lib/classic.png | Bin 7623 -> 358 bytes lib/favicon404.png | Bin 807 -> 744 bytes lib/img404.png | Bin 4549 -> 216 bytes static/icon/amazon.png | Bin 1228 -> 1223 bytes static/icon/facebook.png | Bin 574 -> 555 bytes static/icon/gamespot.png | Bin 1739 -> 1663 bytes static/icon/github.png | Bin 511 -> 508 bytes static/icon/imdb.png | Bin 1287 -> 1259 bytes static/icon/instagram.png | Bin 1827 -> 1804 bytes static/icon/itunes.png | Bin 1725 -> 1721 bytes static/icon/quora.png | Bin 841 -> 835 bytes static/icon/soundcloud.png | Bin 602 -> 592 bytes static/icon/steam.png | Bin 629 -> 622 bytes static/icon/wikipedia.png | Bin 1085 -> 1068 bytes static/icon/youtube.png | Bin 1335 -> 1316 bytes 17 files changed, 0 insertions(+), 0 deletions(-) diff --git a/banner/4get-default.png b/banner/4get-default.png index 5b549d0..c075175 100644 Binary files a/banner/4get-default.png and b/banner/4get-default.png differ diff --git a/favicon.ico b/favicon.ico index e5c1fbc..a54beb0 100644 Binary files a/favicon.ico and b/favicon.ico differ diff --git a/lib/classic.png b/lib/classic.png index 3d2b8fc..d2c9609 100644 Binary files a/lib/classic.png and b/lib/classic.png differ diff --git a/lib/favicon404.png b/lib/favicon404.png index 7540694..fa8f4d1 100644 Binary files a/lib/favicon404.png and b/lib/favicon404.png differ diff --git a/lib/img404.png b/lib/img404.png index 4549dee..e8588cf 100644 Binary files a/lib/img404.png and b/lib/img404.png differ diff --git a/static/icon/amazon.png b/static/icon/amazon.png index 85c9454..043a7e2 100644 Binary files a/static/icon/amazon.png and b/static/icon/amazon.png differ diff --git a/static/icon/facebook.png b/static/icon/facebook.png index 794458d..0ae3137 100644 Binary files a/static/icon/facebook.png and b/static/icon/facebook.png differ diff --git a/static/icon/gamespot.png b/static/icon/gamespot.png index 8c66a7d..3453e07 100644 Binary files a/static/icon/gamespot.png and b/static/icon/gamespot.png differ diff --git a/static/icon/github.png b/static/icon/github.png index 81ea36c..f78f0c0 100644 Binary files a/static/icon/github.png and b/static/icon/github.png differ diff --git a/static/icon/imdb.png b/static/icon/imdb.png index 348c259..d8ccb2f 100644 Binary files a/static/icon/imdb.png and b/static/icon/imdb.png differ diff --git a/static/icon/instagram.png b/static/icon/instagram.png index db9cabe..41d9bf2 100644 Binary files a/static/icon/instagram.png and b/static/icon/instagram.png differ diff --git a/static/icon/itunes.png b/static/icon/itunes.png index b8652eb..99a1dff 100644 Binary files a/static/icon/itunes.png and b/static/icon/itunes.png differ diff --git a/static/icon/quora.png b/static/icon/quora.png index 1b39044..00746b3 100644 Binary files a/static/icon/quora.png and b/static/icon/quora.png differ diff --git a/static/icon/soundcloud.png b/static/icon/soundcloud.png index 4e93f41..a12ba39 100644 Binary files a/static/icon/soundcloud.png and b/static/icon/soundcloud.png differ diff --git a/static/icon/steam.png b/static/icon/steam.png index 03671d9..ab3e73d 100644 Binary files a/static/icon/steam.png and b/static/icon/steam.png differ diff --git a/static/icon/wikipedia.png b/static/icon/wikipedia.png index 7324c9e..b3e778e 100644 Binary files a/static/icon/wikipedia.png and b/static/icon/wikipedia.png differ diff --git a/static/icon/youtube.png b/static/icon/youtube.png index 2e068c8..542d7f0 100644 Binary files a/static/icon/youtube.png and b/static/icon/youtube.png differ -- cgit v1.2.3