diff options
-rwxr-xr-x | thesauracles | 28 |
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 | ||
18 | wf=/tmp/thesauracles | ||
18 | dict_server="dict.org" | 19 | dict_server="dict.org" |
19 | dict_database="moby-thesaurus" | 20 | dict_database="moby-thesaurus" |
20 | thesaurus_header_lines=3 | 21 | thesaurus_header_lines=3 |
21 | 22 | ||
22 | wf=/tmp/thesauracles | 23 | usage() { |
24 | cat <<EOF | ||
25 | thesauracles: the wise sage of synonyms | ||
26 | |||
27 | USAGE: | ||
28 | thesauracles -h | ||
29 | thesauracles [OPTIONS] WORD | ||
23 | 30 | ||
24 | hops=3 | 31 | FLAGS: |
32 | -h Show this help | ||
33 | -q Be quiet (only exclaim the final word). | ||
34 | |||
35 | OPTIONS: | ||
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. | ||
46 | EOF | ||
47 | exit ${1:-0} | ||
48 | } | ||
25 | 49 | ||
26 | query() { | 50 | query() { |
27 | response="/tmp/$1.thesauracles" | 51 | response="/tmp/$1.thesauracles" |