all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Runciter <runciter@whispers-vpn.org>
Cc: 75063@debbugs.gnu.org
Subject: [bug#75063] [PATCH 1/2] gnu: dict: Add symbols to help users configure FreeDict with dicod.
Date: Wed, 25 Dec 2024 22:23:48 +0100	[thread overview]
Message-ID: <874j2r4ftn.fsf@gnu.org> (raw)
In-Reply-To: <37d349728afe8f4403d7a652e02b33fc895bc02b.1735043983.git.runciter@whispers-vpn.org> (runciter@whispers-vpn.org's message of "Tue, 24 Dec 2024 13:00:45 +0000")

Hi,

Nice!  I recently added FreeDict dictionaries to my own config and was
contemplating the idea of having it properly integrated.  Perfect.  :-)

FWIW, I have:

--8<---------------cut here---------------start------------->8---
(define %freedict-databases
  (map (lambda (dictionary-name)
         (dicod-database
          (name "freedict")
          (handler "dictorg")
          (options
           (list #~(string-append "database="
                                  #$freedict-dictionaries
                                  "/share/dictd/" #$dictionary-name)))))
       '("fra-eng" "eng-fra" "eng-spa" "spa-eng")))
--8<---------------cut here---------------end--------------->8---

and then:

--8<---------------cut here---------------start------------->8---
     (service dicod-service-type
              (dicod-configuration
               (databases (cons %dicod-database:gcide
                                %freedict-databases))))
--8<---------------cut here---------------end--------------->8---

Runciter <runciter@whispers-vpn.org> skribis:

> * gnu/services/dict.scm: (%dictorg-handler): New variable;
> (freedict-dictorg-database): new procedure;
> (%freedict-dictorg-databases): new variable.
>
> Signed-off-by: Runciter <runciter@whispers-vpn.org>

[...]

> +(define %dictorg-handler
> +  (dicod-handler (name "dictorg")
> +                 (module "dictorg")
> +                 (options (list #~(string-append "dbdir=/")))))

I believe we don’t even need that; it’s built-in.

> +(define (freedict-dictorg-database dict-name)
> +  "Return a record of type @code{<dicod-database>} 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)

What does ‘complex?’ do actually?  (Seems to work without it.)

> * doc/guix.texi: (Dictionary Service): Update configuration example.

Could you squash both commits?  In general documentation goes to the
same commit as the change it documents.

> diff --git a/doc/guix.texi b/doc/guix.texi
> index 08ffbc36d7..1a394b91b2 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -41158,13 +41158,15 @@ Miscellaneous Services
>                        (name "wordnet")
>                        (module "wordnet")
>                        (options
> -                       (list #~(string-append "wnhome=" #$wordnet))))))
> -          (databases (list
> +                       (list #~(string-append "wnhome=" #$wordnet))))
> +                       %dictorg-handler))
> +          (databases (cons*
>                        (dicod-database
>                         (name "wordnet")
>                         (complex? #t)
>                         (handler "wordnet"))
> -                      %dicod-database:gcide))))
> +                      %dicod-database:gcide
> +                      %freedict-dictorg-databases))))

Could you also document ‘freedict-dictorg-databases’ and
‘%freedict-dictorg-databases’, similar to how ‘%dicod-database:gcide’ is
documented?

For consistency, perhaps the these should be renamed to
‘dicod-freedict-databases’ and ‘%dicod-database:freedict’.

Thanks in advance,
Ludo’.




  reply	other threads:[~2024-12-25 21:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24 12:47 [bug#75063] [PATCH 0/2] Easy configuration of FreeDict into dicod-service-type Runciter via Guix-patches via
2024-12-24 13:00 ` [bug#75063] [PATCH 1/2] gnu: dict: Add symbols to help users configure FreeDict with dicod Runciter via Guix-patches via
2024-12-25 21:23   ` Ludovic Courtès [this message]
2024-12-24 13:00 ` [bug#75063] [PATCH 2/2] doc: add FreeDict dictionaries to dicod configuration example Runciter via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874j2r4ftn.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=75063@debbugs.gnu.org \
    --cc=runciter@whispers-vpn.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.