Author |
Message |
rcrsn51

Joined: 05 Sep 2006 Posts: 13129 Location: Stratford, Ontario
|
Posted: Fri 13 May 2016, 12:28 Post subject:
PeasyDiff File Comparison Tool |
|
PeasyDiff is a replacement for Xfdiff-cut in the Utility menu. It has a simpler drag-and-drop file selection method and fewer distracting graphics. The default display is vertical, or you can select "Side-by-side" and get a two-column display.
PeasyDiff also dumps its output into the file /tmp/PeasyDiff.txt for "off-line" use. Click the View button to open the file in a text editor.
PeasyDiff can compare two individual files or a pair of folders.
The Spacing option includes differences in white space when files are compared. If you turn it off, any differences in spacing are ignored.
----------------------
Version 1.4 introduces a configuration file to hold the PeasyDiff settings. Look for the hidden file /root/.peasydiff.
Code: | export DIMENSIONS="40 120"
export VERTOPTIONS=""
export SBSOPTIONS="-y --suppress-common-lines --width=130"
export FONT="Monospace bold 12" |
DIMENSIONS sets the size of the output window.
SBSOPTIONS sets the diff command options for side-by-side output.
FONT sets the display font.
If you accidentally break the file, just delete it and restart PeasyDiff.
Description |
|
Filesize |
13.33 KB |
Viewed |
229 Time(s) |

|
Description |
Updated 2017-04-06
|

Download |
Filename |
peasydiff-1.4.pet |
Filesize |
3.96 KB |
Downloaded |
287 Time(s) |
Last edited by rcrsn51 on Thu 06 Apr 2017, 21:35; edited 15 times in total
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Fri 13 May 2016, 17:59 Post subject:
|
|
Hi rcrsn51.
Thanks for this very useful visualization utility for diff.
BFN
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
B.K. Johnson
Joined: 12 Oct 2009 Posts: 810
|
Posted: Fri 13 May 2016, 22:33 Post subject:
|
|
Hi rcrsn51
I welcome the addition of another 'diff'. However, the display on my first pair of files was less than stellar.
The line separating the columns got broken and when I dragged the edges of the display to see if I could adjust the output, I found the display would not scale; a large white space was left on rhe right side.
See attached part of the display.
I want this to work.
Description |
section of display
|

Download |
Filename |
sample.png |
Filesize |
36.48 KB |
Downloaded |
438 Time(s) |
_________________ B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 13129 Location: Stratford, Ontario
|
Posted: Sat 14 May 2016, 06:44 Post subject:
|
|
B.K. Johnson wrote: | The line separating the columns got broken |
Thanks for reporting this. PeasyDiff is pretty simple - it just takes the output of the diff command and dumps it into an Xdialog text box. With regular vertical display, this is good enough.
With side-by-side display, there are two problems.
1. The diff command uses tab characters to align the columns. If you run diff in a terminal window this works correctly. But in the Xdialog box, the tabs get messed up.
2. A terminal window uses a fixed-width font for proper alignment. Xdialog claims to have this option, but I can't get it to work.
But there is a partial solution. Get v1.2 above and run side-by-side. The Xdialog display will still be wonky. But the file /tmp/PeasyDiff.txt will now align properly. If you are looking at a complicated comparison, this is probably the best way to do it.
[Edit] To make this easier, I have added a View button that takes you directly to the text file.
If you want to change the comparison method for side-by-side, look at line 10 of /usr/sbin/peasydiff and modify the OPTIONS variable.
|
Back to top
|
|
 |
B.K. Johnson
Joined: 12 Oct 2009 Posts: 810
|
Posted: Sat 14 May 2016, 09:58 Post subject:
|
|
@rcrsn51
You wrote:
Quote: | But there is a partial solution. Get v1.2 above and run side-by-side. The Xdialog display will still be wonky. But the file /tmp/PeasyDiff.txt will now align properly. If you are looking at a complicated comparison, this is probably the best way to do it. |
Just as you wrote: display still wonky but file /tmp/PeasyDiff.txt and View are OK.
This will do. Thanks.
_________________ B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 13129 Location: Stratford, Ontario
|
Posted: Sat 14 May 2016, 10:27 Post subject:
|
|
B.K. Johnson wrote: | Just as you wrote: display still wonky but file /tmp/PeasyDiff.txt and View are OK.
This will do. |
I will also have a fix for the Xdialog display shortly.
|
Back to top
|
|
 |
B.K. Johnson
Joined: 12 Oct 2009 Posts: 810
|
Posted: Sat 14 May 2016, 13:36 Post subject:
|
|
@rcrsn51
What's the constraint that limits the output (both Diff and View) to 64 chars per line?
_________________ B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 13129 Location: Stratford, Ontario
|
Posted: Sat 14 May 2016, 16:30 Post subject:
|
|
Run: diff --help
Check out the "--width=NUM" option.
[Edit] In v1.4, you can set this with the configuration file:
Code: | export SBSOPTIONS="-y --suppress-common-lines --width=150" |
I tested this. It appears to make the two columns 75 characters wide.
|
Back to top
|
|
 |
|