Table of Contents NAME mg_hilite_words - display text and highlight particular words which...
Table of Contents

NAME

mg_hilite_words - display text and highlight particular words which it contains

SYNOPSIS

mg_hilite_words
[ --stem_method [0-3] ]
[ --style [bold|underline|italic|emphasis|strong] ] [ --pager [less|more|html|???] ]
list-of-words-to-highlight

DESCRIPTION

mg_hilite_words reads text from stdin and outputs it into a pager such as less. It's command arguments include a list of stemmed words which if extracted from the text will be highlighted on the output using a highlighting style.

It has been extended to output the highlighted text using html straight to stdout.

OPTIONS

Options may appear in any order, but the list-of-words-tohighlight, must be last.

--stem_method [0-3]
This option allows one to set the stemming method for the extraction of the words from the incoming text. This should match the way the inverted file index was created. The default is 3, which is fold and stem.

--style [bold|underline|italic|emphasis|strong]
This option sets the highlighting style. Bold and underline are utilised by the pager or for html output. Italic, emphasis, and strong can only be used for html output.

--pager [less|more|html|???]
One can use the standard less or more pages for displaying the highlighted text. Or one can generate highlighted html using the paging setting of html. One can also specify a custom pager of their own choosing (i.e. ???).

list-of-words-to-highlight
Each word is taken as a command line argument. Each word should already be stemmed and folded according to the stem option.

USAGE

This program was written primarily to be called by mgquery(1) When the user selects the mode of "hilite" then this program is called for displaying the query-result documents instead of just the pager.

SEE ALSO

mgquery(1).


Table of Contents