File: dicod.conf

package info (click to toggle)
dico 2.12-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,300 kB
  • sloc: ansic: 94,671; sh: 52,520; lex: 4,023; tcl: 1,439; yacc: 1,439; makefile: 1,387; python: 1,310; perl: 1,200; lisp: 489; awk: 157; pascal: 127; javascript: 71; cpp: 50; fortran: 28; asm: 21; sed: 16; xml: 8
file content (149 lines) | stat: -rw-r--r-- 3,861 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

capability (mime,xversion);
timing yes;

pidfile /var/run/dicod/dicod.pid;

module-load-path ("/usr/lib/dico");

// Enable handling of databases in dict.org format:
load-module dictorg {
	command "dictorg sort trim-ws dbdir=/usr/share/dictd";
}

// dicodconfig automatically generates the database sections for dictorg
// formatted dictionaries, the following line makes use of this facility:
#include </var/lib/dicod/dictorg-db.list>

// Uncomment the following to enable handling of databases in Emacs outline
// format:
/* load-module outline {
	command "outline";
}
*/

// Uncomment the following to enable Guile interface:
/* load-module guile {
	command "guile";
}
*/

// Uncomment the following to enable Guile interface:
/* load-module python {
	command "python load-path=/usr/share/dico/python";
}
*/

// Emacs outline database example:
/* database {
	name "devdict";
	handler "outline /usr/share/dico/outline/devils.out";
}
*/

#database {
#	name "plnum";
#	handler "guile"
#	        " init-script=/tmp/dico-2.0/tests/example.scm "
#		" init-fun=example-init"
#		" example.db";
#}

// WikiMedia via `debpkg:dico-module-mediawiki`
// <https://www.gnu.org.ua/software/dico/manual/dico.html#Preprocessor>
/*
m4_define([defdbwikimedia], [
database {
        name "$1";
        handler "python load-path=/usr/share/dico/python init-script=mediawiki $2";
        mime-headers <<- EOT
          Content-Type: text/x-wiki
          Content-Transfer-Encoding: quoted-printable
          X-Wiki-Language: $1
        EOT;
m4_ifelse([$2],,,[
        description "$2";])
m4_ifelse([$3],,,[
        info <<- EOT
$3
EOT;])
}
])

defdbwikimedia(wikipedia-en,
  [en.wikipedia.org],
  [English language Wikipedia, a collaborative project to produce a
   free-content multilingual encyclopedia.])
defdbwikimedia(wikipedia-fr, [fr.wikipedia.org])
defdbwikimedia(wiktionary-en,
  [en.wiktionary.org],
  [English language Wiktionary, a collaborative project to produce a
   free-content multilingual dictionary.])
defdbwikimedia(wiktionary-fr, [fr.wiktionary.org])
*/

alias d DEFINE;
alias da d "*";
alias df d "!";
alias m MATCH;
alias mas m "*";
alias mfs m "!";
alias ma mas ".";
alias mf mfs ".";
alias s STATUS;
alias h HELP;
alias q QUIT;

help-text <<- EOT
	+
  The following commands are abbreviations that Gray likes to use when
  debugging the daemon.  You may or may not find them useful.  However
  it is, do not write your client software to relay on them.  They may
  disappear or change any time Gray pleases, without notice.

  d database word                 -- DEFINE database word
  da word                         -- DEFINE * word
  df word                         -- DEFINE ! word
  ma word                         -- MATCH * . word
  mf word                         -- MATCH ! . word
  mas strategy word               -- MATCH * strategy word
  mfs strategy word               -- MATCH ! strategy word
  m database strategy word        -- MATCH database strategy word
  s                               -- STATUS
  h                               -- HELP
  q                               -- QUIT
EOT;

user dicod;
max-children 18;
#inactivity-timeout 5;

server-info <<EOT
This is a Dico server.
EOT;

# The "Match everything (experimental)" strategy is not suited for
# production servers, it consumes all CPU, leading to an easy DOS attack
# method. It can be enabled by uncommenting the following:
/* load-module stratall {
  command "stratall";
}

# Deny this strategy in default searches:
strategy all {
  deny-all yes;
}
*/

# New strategy `substr' matches a substring anywhere in the headword.
# To enable this strategy, uncomment the following:
/* load-module substr {
  command "substr";
}

# Substr strategy can be quite resource consuming, hence it is better to limit
# it to 3+ pattern length:
strategy substr {
  deny-length-lt 3;
}
*/