1 Dictionary look-up hack for w3m
5 If you have dictionary look-up command (like 'webster'), you can
6 look a word in a document using w3m. This dictionary-lookup code
7 was contributed by `Rubikitch' (rubikitch@ruby-lang.org), and
8 further modifed by Tushar Samant (scribble at pobox.com).
12 To make use of dictionary look-up, you currently must change a
13 compile option by hand. After running configure, edit config.h
22 and recompile w3me (i.e. type "make install").
23 Note that w3m/0.3+cvs-1.373 or later, USE_DICT is defined by default.
25 Then find or install a CGI program which takes a word as a query
26 string and prints a response.
28 Some ways to do this would be:
30 * If you have the 'webster' command, put something like this
31 in a script called 'w3mdict':
35 echo Content-type: text/plain
39 Then install w3mdict as a local CGI (see the local CGI section
40 of the w3m manual), and set your dictionary options from the
41 options page of w3m (usually invoked with "o").
43 * If you want this function to look a word up on Google instead,
44 write a local CGI script like this:
48 google_q='http://google.com/search?btnG=Google&q'
51 Content-type: text/plain
52 W3m-control: GOTO $google_q=$QUERY_STRING
53 W3m-control: DELETE_PREVBUF
57 and set its path as your dictionary-lookup URL option.
61 You can use the following two commands:
63 ESC w Input a word and look it up using w3mdict command.
65 ESC W look up the current word in the buffer.
67 To change these keys, edit ~/.w3m/keymap and edit lines for the
68 functions DICT_WORD and DICT_WORD_AT respectively.