From 24f9909badd4e7aa1f3aeef717b93e9b71c20a4e Mon Sep 17 00:00:00 2001 From: indium114 <156162907+indium114@users.noreply.github.com> Date: Mon, 11 May 2026 08:04:23 +0200 Subject: feat(locale): add afrikaans (south africa) locale --- locales/af_za.ini | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 locales/af_za.ini diff --git a/locales/af_za.ini b/locales/af_za.ini new file mode 100644 index 0000000..a21ad65 --- /dev/null +++ b/locales/af_za.ini @@ -0,0 +1,34 @@ +[Meta] +Id = "af_za" +Name = "Afrikaans (ZA)" +Direction = "ltr" + +[Keys] +search_placeholder = "Soek op die web..." +search_button = "Soek" +surprise_me_button = "Verras my" +all_tab = "Alles" +images_tab = "Foto's" +settings_tab = "Instellings" +settings_title = "Instellings" +theme_label = "Kleurinstelling" +theme_desc = "Kies jou voorkeur kleurskema." +theme_system = "Stelsel" +theme_light = "Lig" +theme_dark = "Donker" +language_label = "Taal" +display_language_label = "Vertoontaal" +language_desc = "Kies jou voorkeurtaal." +engines_label = "Soekenjins" +engines_desc = "Kies watter soekenjins om te gebruik. Slegs enjins wat op die bediener geaktiveer is, word gewys.." +save_settings_button = "Stoor Instellings" +no_results = "Geen resultate gevind nie" +error_images = "Fout tydens die haal van foto's" +rate_limit = "Stadiger! Te veel soektogte van jou!" +warning_fetch_error = "versoek het misluk voordat OmniSearch soekresultate kon lees." +warning_parse_mismatch = "het soekresultate in 'n formaat teruggegee wat OmniSearch nie kon ontleed nie." +warning_blocked = "het 'n captcha of 'n ander blokkerende bladsy in plaas van soekresultate teruggegee." +read_more = "Lees Meer" +view_cached = "Gekasgeheue" +view_image = "Foto" +visit_site = "Webwerf" -- cgit v1.3 From 499bb9b1268cd422619efdc46889960425462aae Mon Sep 17 00:00:00 2001 From: frosty Date: Tue, 4 Aug 2026 00:51:28 -0400 Subject: fix: remove nix support --- README.md | 26 ----------- flake.lock | 46 -------------------- flake.nix | 76 --------------------------------- module.nix | 142 ------------------------------------------------------------- 4 files changed, 290 deletions(-) delete mode 100644 flake.lock delete mode 100644 flake.nix delete mode 100644 module.nix diff --git a/README.md b/README.md index 00f2173..7798229 100644 --- a/README.md +++ b/README.md @@ -47,32 +47,6 @@ On Alpine, `shadow` is needed for the user creation process during the install. # xbps-install -S libxml2-devel libcurl-devel ``` -### NixOS -Add the flake to your inputs and import the module. That is all you need. -Here's an example of using the modules in a flake: -```nix -# flake.nix -{ - inputs = { - omnisearch = { - url = "git+https://git.bwaaa.monster/omnisearch"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { self, nixpkgs, omnisearch, ... }: { - nixosConfigurations.mySystem = nixpkgs.lib.nixosSystem { - modules = [ - omnisearch.nixosModules.default - { - services.omnisearch.enable = true; - } - ]; - }; - }; -} -``` - ### macOS (Homebrew) ``` $ brew install libxml2 curl openssl pkg-config diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 330fc96..0000000 --- a/flake.lock +++ /dev/null @@ -1,46 +0,0 @@ -{ - "nodes": { - "beaker-src": { - "flake": false, - "locked": { - "lastModified": 1775244490, - "narHash": "sha256-4TJv7X6D0l4rEbTRKf47gU43L8G5uJgxxtsqMkVixQY=", - "ref": "refs/heads/master", - "rev": "3fab89ecf8f4c664477a82add660d28db87357b4", - "revCount": 27, - "shallow": false, - "type": "git", - "url": "https://git.bwaaa.monster/beaker" - }, - "original": { - "shallow": false, - "type": "git", - "url": "https://git.bwaaa.monster/beaker" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1773734432, - "narHash": "sha256-IF5ppUWh6gHGHYDbtVUyhwy/i7D261P7fWD1bPefOsw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cda48547b432e8d3b18b4180ba07473762ec8558", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "beaker-src": "beaker-src", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 1a7140e..0000000 --- a/flake.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - beaker-src = { - url = "git+https://git.bwaaa.monster/beaker?shallow=0"; - flake = false; - }; - }; - - outputs = - { - self, - nixpkgs, - beaker-src, - }: - let - supportedSystems = [ - "x86_64-linux" - "aarch64-linux" - ]; - forAllSystems = nixpkgs.lib.genAttrs supportedSystems; - in - { - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt); - packages = forAllSystems ( - system: - let - pkgs = import nixpkgs { inherit system; }; - - beaker = pkgs.stdenv.mkDerivation { - pname = "beaker"; - version = "git"; - src = beaker-src; - makeFlags = [ - "INSTALL_PREFIX=$(out)/" - "LDCONFIG=true" - ]; - }; - in - { - default = pkgs.stdenv.mkDerivation { - pname = "omnisearch"; - version = "git"; - src = ./.; - - buildInputs = [ - pkgs.libxml2.dev - pkgs.curl.dev - pkgs.openssl - beaker - ]; - - preBuild = '' - makeFlagsArray+=( - "PREFIX=$out" - "CFLAGS=-Wall -Wextra -O2 -Isrc -I${pkgs.libxml2.dev}/include/libxml2" - "LIBS=-lbeaker -lcurl -lxml2 -lpthread -lm -lssl -lcrypto" - ) - ''; - - installPhase = '' - mkdir -p $out/bin $out/share/omnisearch - install -Dm755 bin/omnisearch $out/bin/omnisearch - cp -r templates static locales -t $out/share/omnisearch/ - ''; - - meta = { - description = "Lightweight metasearch engine in C"; - platforms = pkgs.lib.platforms.linux; - }; - }; - } - ); - nixosModules.default = import ./module.nix self; - }; -} diff --git a/module.nix b/module.nix deleted file mode 100644 index c0c7825..0000000 --- a/module.nix +++ /dev/null @@ -1,142 +0,0 @@ -self: - -{ - config, - lib, - pkgs, - ... -}: - -let - cfg = config.services.omnisearch; - pkg = cfg.package; - - finalConfigFile = - if cfg.configFile != null then - cfg.configFile - else - pkgs.writeText "omnisearch.ini" '' - [server] - host = ${cfg.settings.server.host} - port = ${toString cfg.settings.server.port} - domain = ${cfg.settings.server.domain} - ${lib.optionalString (cfg.settings.server.locale != null) "locale = ${cfg.settings.server.locale}"} - - [proxy] - ${lib.optionalString (cfg.settings.proxy.proxy != null) "proxy = \"${cfg.settings.proxy.proxy}\""} - ${lib.optionalString ( - cfg.settings.proxy.list_file != null - ) "list_file = ${cfg.settings.proxy.list_file}"} - max_retries = ${toString cfg.settings.proxy.max_retries} - randomize_username = ${lib.boolToString cfg.settings.proxy.randomize_username} - randomize_password = ${lib.boolToString cfg.settings.proxy.randomize_password} - - [cache] - dir = ${cfg.settings.cache.dir} - ttl_search = ${toString cfg.settings.cache.ttl_search} - ttl_infobox = ${toString cfg.settings.cache.ttl_infobox} - ''; -in -{ - options.services.omnisearch = { - enable = lib.mkEnableOption "OmniSearch metasearch engine"; - - package = lib.mkOption { - type = lib.types.package; - default = self.packages.${pkgs.stdenv.hostPlatform.system}.default; - description = "The omnisearch package to use."; - }; - - configFile = lib.mkOption { - type = lib.types.nullOr lib.types.path; - default = null; - description = "Path to a custom config.ini. Overrides 'settings'."; - }; - - settings = { - server = { - host = lib.mkOption { - type = lib.types.str; - default = "0.0.0.0"; - }; - port = lib.mkOption { - type = lib.types.port; - default = 8087; - }; - domain = lib.mkOption { - type = lib.types.str; - default = "http://localhost:${toString cfg.settings.server.port}"; - }; - locale = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - }; - }; - proxy = { - proxy = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - }; - list_file = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - }; - max_retries = lib.mkOption { - type = lib.types.int; - default = 3; - }; - randomize_username = lib.mkOption { - type = lib.types.bool; - default = true; - }; - randomize_password = lib.mkOption { - type = lib.types.bool; - default = true; - }; - }; - cache = { - dir = lib.mkOption { - type = lib.types.str; - default = "/var/cache/omnisearch"; - }; - ttl_search = lib.mkOption { - type = lib.types.int; - default = 3600; - }; - ttl_infobox = lib.mkOption { - type = lib.types.int; - default = 86400; - }; - }; - }; - }; - - config = lib.mkIf cfg.enable { - systemd.services.omnisearch = { - description = "OmniSearch Service"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = { - ExecStart = "${pkg}/bin/omnisearch"; - - WorkingDirectory = "/var/lib/omnisearch"; - StateDirectory = "omnisearch"; - CacheDirectory = "omnisearch"; - - BindReadOnlyPaths = [ - "${pkg}/share/omnisearch/templates:/var/lib/omnisearch/templates" - "${pkg}/share/omnisearch/static:/var/lib/omnisearch/static" - "${pkg}/share/omnisearch/locales:/var/lib/omnisearch/locales" - "${finalConfigFile}:/var/lib/omnisearch/config.ini" - ]; - - DynamicUser = true; - ProtectSystem = "strict"; - ProtectHome = true; - PrivateTmp = true; - Restart = "always"; - }; - }; - }; -} -- cgit v1.3 From 12f046669e6a9ebd5e9d47ccf0ddd265fcdcdd18 Mon Sep 17 00:00:00 2001 From: frosty Date: Sun, 16 Aug 2026 23:43:55 -0400 Subject: chore: use git tag as version in Makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e57c991..af6b741 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,9 @@ GIT_HASH := $(shell git rev-parse --short HEAD) GIT_DATE := $(shell git log -1 --format='%ad' --date='format:%y.%m.%d') GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) GIT_REMOTE := $(shell git remote get-url origin) +GIT_TAG := $(shell git describe --tags --exact-match HEAD 2>/dev/null) -VERSION := $(GIT_DATE)+$(GIT_HASH)_$(GIT_BRANCH) +VERSION := $(if $(GIT_TAG),$(GIT_TAG),$(GIT_DATE)+$(GIT_HASH)_$(GIT_BRANCH)) CFLAGS := -Wall -Wextra -O2 -Isrc -DVERSION='"$(VERSION)"' -DGIT_REMOTE='"$(GIT_REMOTE)"' -- cgit v1.3 From aace4b8f91487d8cb6b7c6fcd38efaa0a83cf1cc Mon Sep 17 00:00:00 2001 From: axunaattori Date: Sat, 22 Aug 2026 18:46:06 +0300 Subject: locale: update finnish locale --- locales/fi_fi.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locales/fi_fi.ini b/locales/fi_fi.ini index 5ee9918..a921af7 100644 --- a/locales/fi_fi.ini +++ b/locales/fi_fi.ini @@ -21,6 +21,8 @@ display_language_label = "Näyttökieli" language_desc = "Valitse haluamasi kieli." engines_label = "Hakukoneet" engines_desc = "Valitse mitä hakukoneita käytetään. Vain palvelimella käyttöön otetut hakukoneet näytetään." +default_engine_label = "Oletushakukone" +all_engines_option = "Kaikki valitut hakukoneet" save_settings_button = "Tallenna asetukset" no_results = "Ei tuloksia" error_images = "Virhe kuvien haussa" -- cgit v1.3 From 892acdc7f26df93735e0098ce62159571b31eb02 Mon Sep 17 00:00:00 2001 From: frosty Date: Thu, 3 Sep 2026 23:59:20 -0400 Subject: feat: add HTTP status to warning message --- src/Routes/Search.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Routes/Search.c b/src/Routes/Search.c index 7fcdac8..0aa146a 100644 --- a/src/Routes/Search.c +++ b/src/Routes/Search.c @@ -486,8 +486,8 @@ int results_handler(UrlParams *params) { const SearchEngine *selected_engine = find_enabled_engine(selected_engine_id); if (selected_engine && - !engine_allowed_for_user(selected_engine, user_engines, - user_engine_count, has_user_pref)) { + !engine_allowed_for_user(selected_engine, user_engines, user_engine_count, + has_user_pref)) { selected_engine = NULL; } if (selected_engine) { @@ -717,8 +717,16 @@ int results_handler(UrlParams *params) { if (!warning_message) continue; - add_warning_to_collection(jobs[i].engine->name, warning_message, - &warning_matrix); + if (jobs[i].http_status >= 400) { + char warning_with_status[BUFFER_SIZE_LARGE]; + snprintf(warning_with_status, sizeof(warning_with_status), + "%s (HTTP %ld)", warning_message, jobs[i].http_status); + add_warning_to_collection(jobs[i].engine->name, warning_with_status, + &warning_matrix); + } else { + add_warning_to_collection(jobs[i].engine->name, warning_message, + &warning_matrix); + } } if (warning_matrix.count > 0) { -- cgit v1.3