rdict - a DICT protocol client
rdict [-h|--host server] [-p|--port service] [-d|--database dbname]
[-m|--match] [-s|--strategy strategy] [-C|--nocorrect]
[-D|--dbs] [-S|--strats] [-H|--serverhelp] [-i|--info dbname]
[-I|--serverinfo] [-T|--status] [-b|--debug] [-u|--user user]
[-k|--key key] [-v|--verbose] word1 [word2 ... wordn]
rdict [--help|-v|--version]
rdict is an RFC 2229 compliant
Dictionary Server Protocol (DICT) client that provides access to dictionary
definitions from a set of natural language dictionary databases.
- -h server or --host server
-
Specifies the hostname for the DICT server. If no servers are specified,
the default behavior is to try dict.org, followed by alt0.dict.org.
- -p port or --port port
-
Specifies the port (e.g. 2628) or service (e.g. dict) for connections.
The default is 2628, as specified in the DICT Protocol RFC.
- -d dbname 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.
- -m or --match
-
Instead of printing a definition, perform a match using the specified
strategy.
- -s strategy or --strategy strategy
-
Specify a matching strategy. By default, the server default match strategy
is used. This is usually 'exact' for definitions, and a server-defined
optimal spelling correction strategy for matches ('.' from the DICT
protocol). The available strategies are dependent on the server
implementation. For a list of available strategies, see the -S or --strats
option.
- -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.
- -D or --dbs
-
Query the server and display a list of available databases.
- -S or --strats
-
Query the server and display a list of available search strategies.
- -H or --serverhelp
-
Query the server and display the help information that it provides.
- -i dbname 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).
- -I or --serverinfo
-
Query the server and display information about the server.
- -T or --status
-
Query the server for status information.
- -u user or --user user
-
Specifies the username for authentication.
- -k key or --key key
-
Specifies the shared secret for authentication.
- -V or --version
-
Display version information.
- --help
-
Display help information.
- -v or --verbose
-
Be verbose.
- -b or --debug
-
Display debugging information. This is long-winded, as the entire protocol
exchange will be dumped.
- $ rdict -D
-
This will provide you with a list of databases you can query.
- $ rdict -S
-
This will provide you with a list of strategies you can employ to match
words.
- $ rdict -m -s prefix foo
-
This shows you a list of all words that begin with 'foo' in all of the
databases.
- $ rdict -s re '^(cu|ke)rb$'
-
This shows you all the definitions relating to both 'curb' and 'kerb' from
all the databases. The 're' strategy allows regular expression matching.
- $ rdict -m -s suffix fix
-
This shows a list of all words that end in 'fix' in all of the databases.
- $ rdict -d jargon -m -s prefix ''
-
This displays a list of all the entries in the 'jargon' database.
Written by Ian Macdonald <ian@caliban.org>
Copyright (C) 2002-2007 Ian Macdonald
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
- MIME is not implemented
- command pipelining is not implemented
- URL parsing is not implemented