iyzs...@member.fsf.org (宋文武) skribis:

> l...@gnu.org (Ludovic Courtès) writes:
>
>> 宋文武 <iyzs...@gmail.com> 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.  :-)
>>
>>> +@deffn {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!

Awesome.  :-)

Ludo’.

Reply via email to