summaryrefslogtreecommitdiff
path: root/doc/sdcv.1
blob: 86351b76df2906c0df3a9be28b40d15c98046df0 (plain)
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
.TH SDCV 1 "2006-04-24" "sdcv-0.4.2"
.SH NAME
sdcv \- console version of StarDict program
.SH SYNOPSIS
.B sdcv 
[ 
.BI options 
] 
[list of words]
.SH DESCRIPTION
.I sdcv 
is a simple, cross-platform text-based utility
for working with dictionaries in StarDict format.
Each word from "list of words" may be a string
with a leading '/' for using a Fuzzy search algorithm,
with a leading '|' for using full-text search,
and the string may contain '?' and '*' for regexp search.
It works in interactive and non-interactive mode.
To exit from interactive mode press Ctrl+D. 
In interactive mode, 
if sdcv was compiled with readline library support,
you can use the UP and DOWN keys to cycle through history.
.SH OPTIONS
.TP 8
.B "\-h  \-\-help"
Display help message and exit
.TP 8
.B "\-v \-\-verbose"
Display version and exit
.TP 8
.B "\-l \-\-list\-dicts" 
Display list of available dictionaries and exit
.TP 8
.B "\-u \-\-use\-dict filename"
For search use only dictionary with this bookname
.TP 8
.B "\-n \-\-non\-interactive"
For use in scripts
.TP 8
.B "\-x \-\-only\-data\-dir"
For use in scripts: only use the dictionaries in data-dir, do not search in user and system directories
.TP 8
.B "\-e \-\-exact\-search" 
Do not fuzzy-search for similar words, only return exact matches
.TP 8
.B "\-j \-\-json"
Print the results of list-dicts and searches as json, not as plain text.
For use in automatically processing the results of a dictionary lookup.
.TP 8
.B "\-\-utf8\-output"
Force sdcv to not convert to locale charset, output in utf8
.TP 8
.B "\-\-utf8\-input"
Force sdcv to not convert from locale charset, assume that
input is in utf8
.TP 8
.B "\-\-data\-dir path/to/directory" 
Use this directory as the path to the stardict data directory. This means that
sdcv searches for dictionaries in data-dir/dic directory.
.TP 8
.B "\-\-color" 
Use ANSI escape codes for colorizing sdcv output (does not work with json output).
.SH FILES
.TP 
/usr/share/stardict/dic
.TP
$(HOME)/.stardict/dic

Place where sdcv expects to find dictionaries.
Instead of /usr/share/stardict/dic you can use any directory
you want, just set the STARDICT_DATA_DIR environment variable.
For example, if you have dictionaries in /mnt/data/stardict-dicts/dic,
set STARDICT_DATA_DIR to /mnt/data/stardict-dicts.
.TP
$(HOME)/.sdcv_history

This file includes the last $(SDCV_HISTSIZE) words, which you sought with sdcv.
SDCV uses this file only if it was compiled with readline library support.
.TP
$(HOME)/.sdcv_ordering

This is a text file containing one dictionary bookname per line.
It specifies in which order the results of a search should be shown.
.SH ENVIRONMENT 
Environment Variables Used By \fIsdcv\fR:
.TP 20
.B STARDICT_DATA_DIR
If set, sdcv uses this variable as the data directory, this means that sdcv
searches dictionaries in $\fBSTARDICT_DATA_DIR\fR\\dic
.TP 20
.B SDCV_HISTSIZE
If set, sdcv writes in $(HOME)/.sdcv_history the last $(SDCV_HISTSIZE) words, 
which you look up using sdcv. If it is not set, then the last 2000 words are saved in $(HOME)/.sdcv_history.
.TP 20
.B SDCV_PAGER
If SDCV_PAGER is set, its value is used as the name of the program
to use to display the dictionary article.
.SH BUGS
Email bug reports to dushistov at mail dot ru. Be sure to include the word
"sdcv" somewhere in the "Subject:" field.
.SH AUTHORS
Evgeniy A. Dushistov, Hu Zheng
.SH SEE ALSO
stardict(1), http://sdcv.sourceforge.net/, http://stardict.sourceforge.net