summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xthesauracles28
1 files changed, 26 insertions, 2 deletions
diff --git a/thesauracles b/thesauracles index c69f28c..4812eb4 100755 --- a/thesauracles +++ b/thesauracles
@@ -15,13 +15,37 @@
15 15
16### Code: 16### Code:
17 17
18wf=/tmp/thesauracles
18dict_server="dict.org" 19dict_server="dict.org"
19dict_database="moby-thesaurus" 20dict_database="moby-thesaurus"
20thesaurus_header_lines=3 21thesaurus_header_lines=3
21 22
22wf=/tmp/thesauracles 23usage() {
24 cat <<EOF
25thesauracles: the wise sage of synonyms
26
27USAGE:
28 thesauracles -h
29 thesauracles [OPTIONS] WORD
23 30
24hops=3 31FLAGS:
32 -h Show this help
33 -q Be quiet (only exclaim the final word).
34
35OPTIONS:
36 -c DEGREE The DEGREE of creativity Thesauracles should use.
37 Higher creativity means a more interesting synonym.
38 Default: $degree.
39 -s SERVER Specify the dict:// SERVER to use.
40 Default: $dict_server.
41 -t THESAURUS Specify the dict:// THESAURUS to use.
42 Default: $dict_database.
43 -l LINES Number of LINES to skip from the server output.
44 Might need to change this if you change the server.
45 Default: $thesaurus_header_lines.
46EOF
47 exit ${1:-0}
48}
25 49
26query() { 50query() {
27 response="/tmp/$1.thesauracles" 51 response="/tmp/$1.thesauracles"