[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: services: Add dicod-service.
From: |
宋文武 |
Subject: |
Re: [PATCH] gnu: services: Add dicod-service. |
Date: |
Sun, 05 Jun 2016 13:51:59 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> 宋文武 <address@hidden> skribis:
>
>> * gnu/services/dict.scm: New file.
>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
>> * doc/guix.texi (Various Services): Document it.
>
> Nice! I’ve been wanting it for some time. :-)
>
>> address@hidden {Scheme Procedure} dicod-service [#:config
>> (dicod-configuration)]
>> +Return a service that runs the dicod daemon, an implementation of
>
> @command{dicod}
>
>> +DICT server.
> ^
> Add @pxref{Dicod,,, dico, GNU Dico Manual}
>
>> The optional CONFIG argument specifies the configuration
>
> @var{config}
>
>> +for dicod, which should be a <dicod-configuration> object, by default
>
> @command{dicod}, @code{<dicod-configuration>}
>
>> +it serving the GNU Collaborative International Dictonary of English.
>
> s/it serving/it serves/.
>
> It would be nice to document ‘dicod-configuration’ with @deftp, as done
> in some other places.
>
> Also, maybe we should mention or cross-reference how to configure dico
> to connect to localhost, since the default is to connect elsewhere;
> WDYT?
>
>> + (($ <dicod-database> name module options)
>> + `("
>> +load-module " ,module ";
>> +database {
>> + name \"" ,name "\";
>> + handler \"" ,module
>> + ;; append the options list using space as separator before each element.
>> + ,@(fold-right (cut cons* " " <> <>) '() options) "\";
>> +}\n")))
>> + databases))))
>
> Maybe (string-join (fold-right cons '() options)) instead.
>
>> +(define* (dicod-service #:key (config (dicod-configuration)))
>> + "Return a service that runs the dicod daemon, an implementation of
>> +DICT server."
>
> Use the guix.texi doc as a docstring.
All done, thanks for the review and guide!