View Single Post
Old 02-13-2014, 11:19 PM   #33
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Moonraker View Post
I had never heard of Beyond Compare and reading your post I immediately wanted it. Not only would I like to compare html files but I have other uses for the programme as well. I have paid for it and downloaded the trial 30 day version and waiting for my registration code at the moment.
Fantastic! I am a programmer, so I also use it for its original purpose (comparing/merging code). It is an extremely powerful comparison program, and has much more powerful capabilities (such as merging files, versioning, etc. etc.).

Definitely is extremely complex/powerful for your typical user.

Quote:
Originally Posted by Moonraker View Post
I am finding it rather overwhelming at present. I have managed to compare two folders, each containing thousands of files ok and was very pleased with the result.
I tend to do just this:
  • I open/save both files in Sigil, so that they have consistent folder schemes.
  • Unzip the EPUBs using your favorite zipping program (I personally use 7-zip).
  • Open up Beyond Compare, Choose Folder Compare.
  • Then press the little "Browse for Folder" button (highlighted in orange). I put the "Old" folder on the Left, and the "New" folder on the Right.

Click image for larger version

Name:	BeyondCompareStep1.png
Views:	210
Size:	47.0 KB
ID:	119053
  • Right Click on the file you want to compare.
    • Or if you want to compare multiple files, do your typical Ctrl+Click or Shift+Click to highlight many
  • After you right click the files, you can press "File Compare Report..."

Click image for larger version

Name:	BeyondCompareStep2.png
Views:	193
Size:	47.2 KB
ID:	119054

Click image for larger version

Name:	BeyondCompareStep3.png
Views:	196
Size:	9.8 KB
ID:	119055
  • After you click on "File Compare Report", this window pops up. (These are my settings)
    • Important: Make sure you have a checkmark in "Ignore unimportant". (See Side Note for explanation).
  • HTML Report will generate a Report just like in my attached files.
  • Press "Save As..." and save the HTML Report in an easy to reach location. (Perhaps your Desktop)
    • Alternate: If you press the "View in Browser" button, it will just open up the a temporary HTML file in your default browser, so you can quickly compare files to eachother.
  • If you save the Report, then you can easily attach it to an email, attach it to a post, send it to someone else, etc. etc.

Side Note: Ignoring Whitespace means this:

Code:
   <p>This is a sample paragraph</p>
and this

Code:
<p>This is a sample paragraph</p>
will be treated the same (notice in the first example, there is a few SPACES before "<p>". This space does NOTHING to the final output of the file. Whitespace just makes it look nicer to human eyes when they are reading the code.

Quote:
Originally Posted by Moonraker View Post
But I don't know where to start with comparing two html files.

Is there any chance you could do a quick idiots guide howto on your method of working?
If you wanted to just compare two files against eachother, press the "Text Compare" button in the main menu instead. Then you can click that little button up top (in the similar position to the "Browse for Folder" button in the first image above). Then you just choose the Left, and the Right files. (I personally think it is easier if the "Older" file is on the left, and the "Newer" file is on the right).

Quote:
Originally Posted by Moonraker View Post
Thank you
You are welcome. Please let me know if you need any more explanation, I would be glad to help (Although I probably should then split it off into a Tutorial in the Workshop).

Quote:
Originally Posted by HarryT View Post
You can use Calibre's "Compare books" facility to identify changes between two books, or two versions of a book.
I will definitely have to check it out one of these days. (Comparing two versions to see what is different is EXTREMELY helpful, and it is fantastic to see this is added to Calibre's Editor).

Side Note: One code comparison case in particular that was very interesting, is a book that I converted, "An Essay on the Nature of and Significance of Economic Science" by Lionel Robbins. I accidentally EPUBed the First Edition of the book, and then I noticed that a scan of the Second Edition was ALSO available. So I tackled an EPUB of the Second Edition as well. Then I was able to easily code compare between the two to see EXACTLY what was added/changed in the Second Edition.

Attached is:
  • A ZIP of the Comparison Report generated from Beyond Compare.
    • This is where you can see EXACTLY what text was added in the Second Edition of the book

I tried a lot of other "code comparison" programs many moons ago, and many of them seemed to fail MISERABLY when there was a large amount of text in <p>, or there were new paragraphs inserted in between other paragraphs. Beyond Compare seemed to work the best for me (although it still messes up on a few large paragraphs, or when there are a HUGE amount of major changes).
Attached Files
File Type: zip First vs. Second.zip (168.1 KB, 122 views)

Last edited by Tex2002ans; 02-14-2014 at 06:32 AM.
Tex2002ans is offline   Reply With Quote