HTML::HiLiter

HTML::HiLiter is a Perl module that can highlight words in an HTML document just like a felt-tip HiLiter.
Download

HTML::HiLiter Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Peter Karman
  • Publisher web site:
  • http://search.cpan.org/~karman/CatalystX-CRUD-0.17/lib/CatalystX/CRUD/Tutorial.pod

HTML::HiLiter Tags


HTML::HiLiter Description

HTML::HiLiter is a Perl module that can highlight words in an HTML document just like a felt-tip HiLiter. HTML::HiLiter is a Perl module that can highlight words in an HTML document just like a felt-tip HiLiter.HTML::HiLiter is designed to make highlighting search queries in HTML easy and accurate. HTML::HiLiter was designed for CrayDoc 4, the Cray documentation server. It has been written with SWISH::API users in mind, but can be used within any Perl program.SYNOPSIS use HTML::HiLiter; my $hiliter = new HTML::HiLiter( WordCharacters => 'w-.', BeginCharacters => 'w', EndCharacters => 'w', HiTag => 'span', Colors => , Links => 1 TagFilter => &yourtagcode(), TextFilter => &yourtextcode(), Force => 1, SWISH => $swish_api_object ); $hiliter->Queries( 'foo bar or "some phrase"' ); $hiliter->CSS; $hiliter->Run('some_file_or_URL'); Here are some key features of "HTML::HiLiter": · With HTML::Parser enabled (default), HTML::HiLiter evals highlighted HTML chunk by chunk, buffering all text within an HTML block element before evaluating the buffer for highlighting. If no matches to the queries are found, the HTML is immediately printed (default) or cached and returned at the end of all evaluation (Print=>0). · You can direct the print() to a filehandle with the standard select() function in your script. Or use Print=>0 to return the highlighted HTML as a scalar string. · Turn highlighting off on a per-tagset basis with the custom HTML "nohiliter" attribute. Set the attribute to a TRUE value (like 1) to turn off highlighting for the duration of that tag. · Ample debugging. Set the $HTML::HiLiter::Debug variable to a level between 1 and 3, and lots of debugging info will be printed within HTML comments . · Will highlight link text (the stuff within an tagset) if the HREF value is a valid match. See the Links option. · Smart context. Won't highlight across an HTML block element like a tagset or a tagset. (IMHO, your indexing software shouldn't consider matches for phrases that span across those tags either.) · Rotating colors. Each query gets a unique color. The default is four different colors, which will repeat if you have more than four queries in a single document. You can define more colors in the new() object call. · Cascading Style Sheets. Will add a tagset in CSS to the of an HTML document if you use the CSS() method. If you use the Inline() method, the style attribute will be used instead. The added set will be placed immediately after the opening tag, so that any subsequent CSS defined in the document will override the added . This allows you to re-define the highlighting appearance in one of your own CSS files. Requirements: · Perl version 5.6.1 or later. · Text::ParseWords


HTML::HiLiter Related Software