File: dict.1

package info (click to toggle)
dictd 1.4.8-8
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,492 kB
  • ctags: 2,540
  • sloc: ansic: 20,420; sh: 1,721; makefile: 745; perl: 235; yacc: 189; lex: 117
file content (245 lines) | stat: -rw-r--r-- 8,162 bytes parent folder | download
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
.\" dict.1 -- 
.\" Created: Tue Jul  8 11:36:19 1997 by faith@acm.org
.\" Revised: Sun Feb 15 18:54:25 1998 by faith@acm.org
.\" Copyright 1997, 1998 Rickard E. Faith (faith@acm.org)
.\" 
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\" 
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\" 
.TH DICT 1 "15 February 1998" "" "Linux Programmer's Manual"
.SH NAME
dict \- DICT Protocol Client
.SH SYNOPSIS
.nf
.BI dict " word"
.br
.BI dict " [options] [word]"
.br
.BI dict " [options] dict://host:port/d:word:database"
.br
.BI dict " [options] dict://host:port/m:word:database:strategy"
.fi
.SH DESCRIPTION
.B dict
is a client for the Dictionary Server Protocol (DICT), a TCP transaction
based query/response protocol that provides access to dictionary
definitions from a set of natural language dictionary databases.
.SH OPTIONS
.TP
.BI \-h " server\fR or " \-\-host " server"
Specifies the hostname for the DICT server.  Server/port combinations can
be specified in the configuration file.  If no servers are specified the
default behavior is to try dict.org, alt0.dict.org, alt1.dict.org, and
alt2.dict.org, in that order.  If IP lookup for a server expands to a list
of IP addresses (as dict.org does currently), then each IP will be tried in
the order listed.
.TP
.BI \-p " service\fR or " \-\-port " service"
Specifies the port (e.g., 2628) or service (e.g., dict) for connections.
The default is 2628, as specified in the DICT Protocol RFC.  Server/port
combinations can be specified in the configuration file.
.TP
.BI \-d " dbname\fR or " \-\-database " dbname"
Specifies a specific database to search.  The default is to search all
databases (a "*" from the DICT protocol).  Note that a "!" in the DICT
protocol means to search all of the databases until a match is found, and
then stop searching.
.TP
.BR \-m " or " \-\-match
Instead of printing a definition, perform a match using the specified
strategy.
.TP
.BI \-s " strategy\fR or " \-\-strategy " strategy"
Specify a matching strategy.  By default, the server default match strategy
is used.  This is usually "exact" for definitions, and some form of
spelling-correction strategy for matches ("." from the DICT protocol).
.TP
.BR \-C " or " \-\-nocorrect
Usually, if a definition is requested and the word cannot be found,
spelling correction is requested from the server, and a list of possible
words are provided.  This option disables the generation of this list.
.TP
.BI \-c " file\fR or " \-\-config " file"
Specify the configuration file.  The default is to try
.I ~/.dictrc
and
.IR /etc/dict.conf ,
using the first file that exists.  If a specific configuration file is
specified, then the defaults will not be tried.
.TP
.BR \-D " or " \-\-dbs
Query the server and display a list of available databases.
.TP
.BR \-S " or " \-\-strats
Query the server and display a list of available search strategies.
.TP
.BR \-H " or " \-\-serverhelp
Query the server and display the help information that it provides.
.TP
.BI \-i " dbname\fR or " \-\-info " dbname"
Request information on the specified database (usually the server will
provide origination, descriptive, or other information about the database
or its contents).
.TP
.BR \-I " or " \-\-serverinfo
Query the server and display information about the server.
.TP
.BR \-a " or " \-\-noauth
Disable authentication (i.e., don't send an AUTH command).
.TP
.BI \-u " user\fR or " \-\-user " user"
Specifies the username for authentication.
.TP
.BI \-k " key\fR or " \-\-key " key"
Specifies the shared secret for authentication.
.TP
.BR \-V " or " \-\-version
Display version information.
.TP
.BR \-L " or " \-\-license
Display copyright and license information.
.TP
.B \-\-help
Display help information.
.TP
.BR -v " or " \-\-verbose
Be verbose.
.TP
.BR -r " or " \-\-raw
Be very verbose: show the raw client/server interaction.
.TP
.B \-\-html
Generate HTML tags in the output.  The HTML generated is not very useful.
Support for this option needs to be rewritten.
.TP
.B \-\-pipesize
Specify the buffer size for pipelineing commands.  The default is 256,
which should be sufficient for general tasks and be below the MTU for most
transport media.  Larger values may provide faster or slower throughput,
depending on MTU.  If the buffer is too small, requests will be
serialized.  Values less than 0 and greater than one million are silently
changed to something more reasonable.
.TP
.BI \-\-client " text"
Specifies additional text to be sent using the CLIENT command.
.TP
.BI \-\-debug " flag"
Set a debugging flag.  Valid flags are:
.RS
.TP
.B verbose
The same as
.BR \-v " or " \-\-verbose .
.TP
.B raw
The same as
.BR \-r " or " \-\-raw .
.TP
.B scan
Debug the scanner for the configuration file.
.TP
.B parse
Debug the parser for the configuration file.
.TP
.B pipe
Debug TCP pipelining support (see the DICT RFC and RFC1854).
.TP
.B serial
Disable pipelining support.
.TP
.B time
Perform transaction timing.
.TP
.RE
.TP
.SH CONFIGURATION
The configuration file currently has a very simple format.  Lines are used
to specify servers, for example:
.RS
server dict.org
.RE
or, with options:
.RS
server dict.org { port 8080 }
.br
server dict.org { user username secret }
.br
server dict.org { port dict user username secret }
.RE
the
.B port
and
.B user
options may be specified in any order.  The
.B port
option is used to specify an optional port (e.g., 2628) or service (e.g.,
dict) for the TCP/IP connection.  The
.B user
option is used to specify a username and shared secret to be used for
authentication to this particular server.
.P
Servers are tried in the order listed until a connection is made.  If none
of the specified servers are available, then an attempt will be made to
connect on
.B localhost
and on
.B dict.org
at the standard part (2628).  We expect that dict.org will point to one or
more DICT servers (perhaps in round-robin fashion) for the foreseeable
future (starting in July 1997), although it is difficult to predict
anything on the Internet for more than about 3-6 months.
.SH CREDITS
.B dict
was written by Rik Faith (faith@cs.unc.edu) and is distributed under the
terms of the GNU General Public License.  If you need to distribute under
other terms, write to the author.
.P
The main libraries used by this programs (zlib, regex, libmaa) are
distributed under different terms, so you may be able to use the libraries
for applications which are incompatible with the GPL -- please see the
copyright notices and license information that come with the libraries for
more information, and consult with your attorney to resolve these issues.
.SH BUGS
If a
.B dict:
URL is given on the command line, only the first one is used.  The rest are
ignored.
.P
If a
.B dict:
URL contains a specifier for the nth definition or match of a word, it will
be ignored and all the definitions or matches will be provided.  This
violates the RFC, and will be corrected in a future release.
.P
If a
.B dict:
URL contains a shared secret, it will not be parsed correctly.
.P
HTML mode isn't as useful as it could be.  This will be improved in a
future release.
.SH FILES
.I ~/.dictrc
.br
.I /etc/dict.conf
.SH "SEE ALSO"
.BR dictd (8),
.BR dictzip (1),
.BR http://www.dict.org,
.B RFC 2229