what words are different?

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
jack99999
New Member
Posts: 3
Joined: Fri Jun 16, 2006 1:25 am
Location: UK

what words are different?

Post by jack99999 »

i sometimes want to compare the contents of two files to check the differences between words. i don't care about any layout whatsoever.

these could be a text file and a similar one that has been reformatted. or text taken by cutting from a web page compared with text extracted from a word document.

it would be nice to have a compare option that would just treat the documents as streams of text, ignoring all space and carriage returns. the result would then show what content had changed, ignoring any layout.

of course there may already be an option to do this that i haven't found...


jack
dangerously dependent on his charisma
User avatar
psguru
Site Admin
Posts: 2232
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Post by psguru »

No, there's no such option. But it can be done with the help of plug-ins and synchronized word wrap.

First, you need a plug-in (a console application capable of processing files) that would strip line feeds and carriage returns from your files. For example, you could use a Perl script, such as:

Save the following lines in Strip-LF-CF.pl file:

Code: Select all

#!/usr/local/bin/perl
$/ = undef;
$_ = <>;
s/\s+/ /g;
print;
Then define the following plug-in (obviously, your file locations and extensions will be different):

Name: Strip CR-LF
Extensions: *
Application: C:\Perl\bin\perl.exe
Arguments: C:\Strip-CR-LF.pl $INPUTFILEPATH

After the comparison is done, you'll see that both files are now represented by single lines. Now use View | Enable Word Wrap command to wrap the results.
psguru
PrestoSoft
jack99999
New Member
Posts: 3
Joined: Fri Jun 16, 2006 1:25 am
Location: UK

Post by jack99999 »

superb :)

that works very nicely. i've never used plugins before.


incidentally, a couple of bugs in my Examdiff 3.2c version:
  • my list of plugins does not show any text, even though i completed all the fields when creatgin the plugin. so all i get is a checkbox in the list.
  • on the Plug-in Details page there is a typo: 'do not surround ExamDiff Pro arguments with qoutes'

many thanks


jack
dlrow dednah-thgir a ni tfirda
User avatar
psguru
Site Admin
Posts: 2232
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Post by psguru »

No problem.

The bugs you mentioned have been fixed in 3.3 and 3.4.
psguru
PrestoSoft
jack99999
New Member
Posts: 3
Joined: Fri Jun 16, 2006 1:25 am
Location: UK

Post by jack99999 »

ok

thanks

jack
Good Morning! said Bilbo, and he meant it
Post Reply