w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

README.dict (1781B)


      1 Dictionary look-up hack for w3m
      2 
      3 1. INTRODUCTION
      4 
      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).
      9 
     10 2. INSTALLATION
     11 
     12 To make use of dictionary look-up, you currently must change a
     13 compile option by hand. After running configure, edit config.h
     14 and change
     15 
     16 #undef USE_DICT
     17 
     18 to
     19 
     20 #define USE_DICT
     21 
     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.
     24 
     25 Then find or install a CGI program which takes a word as a query
     26 string and prints a response.
     27 
     28 Some ways to do this would be:
     29 
     30   * If you have the 'webster' command, put something like this
     31     in a script called 'w3mdict':
     32 
     33       #!/bin/sh
     34 
     35       echo Content-type: text/plain
     36       echo
     37       webster $QUERY_STRING
     38 
     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").
     42 
     43   * If you want this function to look a word up on Google instead,
     44     write a local CGI script like this:
     45 
     46       #!/bin/sh
     47 
     48       google_q='http://google.com/search?btnG=Google&q'
     49 
     50       cat <<_END_
     51       Content-type: text/plain
     52       W3m-control: GOTO $google_q=$QUERY_STRING
     53       W3m-control: DELETE_PREVBUF
     54 
     55       _END_
     56 
     57     and set its path as your dictionary-lookup URL option.
     58 
     59 3. USAGE
     60 
     61 You can use the following two commands:
     62 
     63 ESC w    Input a word and look it up using w3mdict command.
     64 
     65 ESC W    look up the current word in the buffer.
     66 
     67 To change these keys, edit ~/.w3m/keymap and edit lines for the
     68 functions DICT_WORD and DICT_WORD_AT respectively.