From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id EEMpKaSwamcV7wAA62LTzQ:P1 (envelope-from ) for ; Tue, 24 Dec 2024 13:01:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EEMpKaSwamcV7wAA62LTzQ (envelope-from ) for ; Tue, 24 Dec 2024 14:01:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=BXv4tSfg; dkim=fail ("headers rsa verify failed") header.d=whispers-vpn.org header.s=protonmail header.b=hSIuOEPO; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735045283; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=109kbmlVAqJQ69zJrxqLwZFFF93U6S2hDs6niJyo4YQ=; b=TgrEWXFSs/a9m0BsDfQuwEsNesmf/G2Xy2iFwodQgTnIJY2LSSrd+lXkYNRC3+I+TTP9D8 50y7P4EHlG5GH5xiV7mpScZG3ny0u5VC07s9nDh3bv/lXtEAgXoEsxOTML4ZyqsmiRUk6Z 4YRZRy+PjvoYvSaKMKkpIByeFzLwdX9Okl02um2B/zIZsrAinTvJ9yK+sxMlAlBine7npJ arEvMjMIPY6Pto9uB8SSckUAA/H5fX9eNHSKeXd0WqbZ0UQSjJYEAkLbUMVQUSkz1+SNPf +hcnq+ohzBKxIF5zns7hTozjyBbtV8ogROsNTVHUu3Zw9TmxMFbunqgQgDr03g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=BXv4tSfg; dkim=fail ("headers rsa verify failed") header.d=whispers-vpn.org header.s=protonmail header.b=hSIuOEPO; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735045283; a=rsa-sha256; cv=none; b=mAO9NfUlmJ4BXJOp6NUN8A9BH9JhqjqD1b5vPLxpvtzdZKtTMStPf1ag/xuY9AVCumHv/7 gQTlrtP6PEm7RDUxmUKtw/tgG+SZps5yIeqopoxELeTvrC/HOXgROU+27/Urf9+Hbi+Zr1 JBPA2pffI2pstBHonU3647KU60CDqdK9XYYguah9OWCRUW0C6HPdoeUfgQcpVKkrGpwN3M /LUa4nM6tEobmsGg+AYsmDVNsO3SGylbyv//RiBoSCBA1w4RSDjZczD/M9UV7S6WeWYSfv rYL/fv+JW2X4OiJXVbdaIcHaBw/hlHuouNX7ML2oYLDSp1FCAI5Xt+ZPj7PfgQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 749DC88425 for ; Tue, 24 Dec 2024 14:01:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQ4X3-0006ra-V2; Tue, 24 Dec 2024 08:01:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ4X0-0006pr-AK for guix-patches@gnu.org; Tue, 24 Dec 2024 08:01:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQ4X0-000261-0Q for guix-patches@gnu.org; Tue, 24 Dec 2024 08:01:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:In-Reply-To:References:Subject; bh=109kbmlVAqJQ69zJrxqLwZFFF93U6S2hDs6niJyo4YQ=; b=BXv4tSfg1QQ9y3Y/fg8l2JF6rTwSP5VPAnJ07ySLJXkDmuL/geb3tXFsyc8S340OMao76ot9/tfZgZf6RZ5gpCsn/l21nxc4CfbYvQyEZq2r6WSwcV9WItaw8/Y44BYmYX3slQooQfAozaL9K+Dtpi3HRqaAeXp8qbCzTjzsZ5x/IzzlwCUkbAFd4kLJ4iBj913Gd18ZX5WtOZ2878+RvOV8JX0gKOwjXBz9PDCgEsW2dhSiXaNuRvQUviuZPglhBgb+X5jOkLP+p5Yk1OaymLBxhoptS9fnbWAuErNvsgwFs5fT0uN4xpckwIjGZbMGwfZgnEerXKIbSZkXruDBiA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQ4Wz-0007UU-S0 for guix-patches@gnu.org; Tue, 24 Dec 2024 08:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75063] [PATCH 1/2] gnu: dict: Add symbols to help users configure FreeDict with dicod. References: In-Reply-To: Resent-From: Runciter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Dec 2024 13:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75063 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75063@debbugs.gnu.org Cc: Runciter Received: via spool by 75063-submit@debbugs.gnu.org id=B75063.173504525628764 (code B ref 75063); Tue, 24 Dec 2024 13:01:01 +0000 Received: (at 75063) by debbugs.gnu.org; 24 Dec 2024 13:00:56 +0000 Received: from localhost ([127.0.0.1]:59903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ4Wt-0007Ts-R8 for submit@debbugs.gnu.org; Tue, 24 Dec 2024 08:00:56 -0500 Received: from mail-4022.proton.ch ([185.70.40.22]:35965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ4Wr-0007Tb-JW for 75063@debbugs.gnu.org; Tue, 24 Dec 2024 08:00:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whispers-vpn.org; s=protonmail; t=1735045247; x=1735304447; bh=109kbmlVAqJQ69zJrxqLwZFFF93U6S2hDs6niJyo4YQ=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=hSIuOEPOhVX6mJ6sHnW5GzNZVW8hLXywcSiKKRdU+/Rqj/204mB851o1jWGo+H7Xh OPM5R+rShnjwqaRoQwmKocIxt/8qZUKuy0UfAtyQQj9ArF/aANqeD2m7U4Bz1aXEuQ ZE+WW9EgupbbGPdDlq9OWqSHpKsCUabEIVoAnrc9aZ/WcdL2Kj7hE7pT0g8eMpV3Vq q/cggrtMmtxEGkiERL/JpT8qteUYW9lKhFknN7k6yYjLqcmlqynJWKUt21Yf5rQEYF B92MgQh/ZefNP0m76EdcecxN1xDJOW1Kwp7uUWMKUGY7fcefKR/SKmyalvpn2H4VKG jDgo6aMNkhFVw== Date: Tue, 24 Dec 2024 13:00:45 +0000 Message-ID: <37d349728afe8f4403d7a652e02b33fc895bc02b.1735043983.git.runciter@whispers-vpn.org> Feedback-ID: 119317227:user:proton X-Pm-Message-ID: 6635fe9a9a42ce8fa08b5bac5682ad87a57c34de MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Runciter X-ACL-Warn: , Runciter via Guix-patches From: Runciter via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -3.71 X-Spam-Score: -3.71 X-Migadu-Queue-Id: 749DC88425 X-TUID: mxQ7oel2BSZk * gnu/services/dict.scm: (%dictorg-handler): New variable; (freedict-dictorg-database): new procedure; (%freedict-dictorg-databases): new variable. Signed-off-by: Runciter --- gnu/services/dict.scm | 107 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm index a4e25f5302..39fb38c9c3 100644 --- a/gnu/services/dict.scm +++ b/gnu/services/dict.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2016 Sou Bunnbu ;;; Copyright =C2=A9 2016, 2017, 2018, 2020, 2022, 2023 Ludovic Court= =C3=A8s ;;; Copyright =C2=A9 2017 Huang Ying +;;; Copyright =C2=A9 2024 Runciter ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,7 +41,10 @@ (define-module (gnu services dict) dicod-configuration dicod-handler dicod-database - %dicod-database:gcide)) + %dicod-database:gcide + %dictorg-handler + freedict-dictorg-database + %freedict-dictorg-databases)) =20 =0C ;;; @@ -94,6 +98,107 @@ (define %dicod-database:gcide (options (list #~(string-append "dbdir=3D" #$gcide "/share/gcide") #~(string-append "idxdir=3D" #$%dicod-gcide-index))))) =20 +(define %dictorg-handler + (dicod-handler (name "dictorg") + (module "dictorg") + (options (list #~(string-append "dbdir=3D/"))))) + +(define (freedict-dictorg-database dict-name) + "Return a record of type @code{} that configures a +database for the freedict multilingual dictionary named by the string +DICT-NAME." + (dicod-database (name (string-append "freedict-" + dict-name)) + (complex? #t) + (handler "dictorg") + (options (list #~(string-append "database=3D" + #$freedict-dictionaries + "/share/dictd/" + #$dict-name))))) + +(define %freedict-dictorg-databases + (map freedict-dictorg-database (list "afr-deu" + "afr-eng" + "ara-eng" + "bre-fra" + "ces-eng" + "ckb-kmr" + "cym-eng" + "dan-eng" + "deu-ita" + "deu-kur" + "deu-nld" + "deu-por" + "deu-tur" + "eng-afr" + "eng-ara" + "eng-ces" + "eng-cym" + "eng-dan" + "eng-ell" + "eng-fra" + "eng-gle" + "eng-hin" + "eng-hrv" + "eng-hun" + "eng-ita" + "eng-lat" + "eng-lit" + "eng-nld" + "eng-pol" + "eng-por" + "eng-rom" + "eng-rus" + "eng-spa" + "eng-srp" + "eng-swh" + "eng-tur" + "fra-bre" + "fra-eng" + "fra-nld" + "gla-deu" + "gle-eng" + "gle-pol" + "hrv-eng" + "hun-eng" + "isl-eng" + "ita-deu" + "ita-eng" + "jpn-deu" + "jpn-eng" + "jpn-fra" + "jpn-rus" + "kha-deu" + "kha-eng" + "kur-deu" + "kur-eng" + "kur-tur" + "lat-deu" + "lat-eng" + "lit-eng" + "mkd-bul" + "nld-deu" + "nld-eng" + "nld-fra" + "nno-nob" + "oci-cat" + "pol-gle" + "por-deu" + "por-eng" + "san-deu" + "slk-eng" + "slv-eng" + "spa-ast" + "spa-eng" + "spa-por" + "srp-eng" + "swe-eng" + "swh-eng" + "swh-pol" + "tur-deu" + "tur-eng" + "wol-fra"))) + (define %dicod-accounts (list (user-group (name "dicod") --=20 2.46.0