Text::ParagraphDiff

Text::ParagraphDiff is a Perl module that offers visual difference for paragraphed text.
Download

Text::ParagraphDiff Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Joseph F. Ryan
  • Publisher web site:
  • http://search.cpan.org/~jryan/Text-ParagraphDiff-2.70/lib/Text/ParagraphDiff.pm

Text::ParagraphDiff Tags


Text::ParagraphDiff Description

Text::ParagraphDiff is a Perl module that offers visual difference for paragraphed text. Text::ParagraphDiff is a Perl module that offers visual difference for paragraphed text.ABSTRACTText::ParagraphDiff finds the difference between two paragraphed text files by word rather than by line, reflows the text together, and then outputs result as xhtml.SYNOPSIS use Text::ParagraphDiff; # old.txt and new.txt are filenames print text_diff('old.txt', 'new.txt'); # Or pass array references print text_diff(@old, @new); # T-Diff 2 plain strings (a FAQ) print text_diff("old", "new", {string=>1}); # Pass options (see below) print text_diff($old, $new, {plain=>1}); # or use the premade script in bin/: # ./tdiff oldfile newfileText::ParagraphDiff is a reimplementation of diff that is meant for paragraphed text rather than for code. Instead of "diffing" a document by line, Text::ParagraphDiff expands a document to one word per line, uses Algorithm::Diff to find the difference, and then reflows the text back together, highlighting the "add" and "subtract" sections. Writers and editors might find this useful for sending revisions to each other across the internet, or a single user might use it to keep track of personal work. For example output, please see diff.html in the distribution, as well as the sources for the difference, old.txt and new.txt.The output is in xhtml, for ease of generation, ease of access, and ease of viewing. Text::ParagraphDiff also takes advantage of two advanced features of the median: CSS and JavaScript.CSS is used to cut down on output size and to make the output very pleasing to the eye. JavaScript is used to implement additional functionality: two buttons that can toggle the display of the difference. CSS and JavaScript can be turned off; see the plain option below. (Note: CSS & Javascript tested with Mozilla 1.0, Camino 0.7, and IE 5.x) Requirements: · Perl


Text::ParagraphDiff Related Software