Showing posts with label diff. Show all posts
Showing posts with label diff. Show all posts

Friday, October 5, 2007

Comparing Office documents

I found a website with good overview of different diff utils, it has utils i already know, in addition to many others, unfortunately it does not seem like there are any utils which can be customized like i really want.

Even though most of the tools are Windows based and not open source or freeware, I simply have to give a few trials a try, let alone for the following possibilities:
  • Custom file filters
  • Command line: supported
  • Plug-ins for: data files (CSV), image formats, exe/dll version information, mp3 files, icon/cursor files, MS Office and others

Snips from the diffutils.com reviews:

Beyond Compare 2 is a great software solution for almost any revision control project. It has powerful merge and synchronization functionality. However, Beyond Compare 2 is not completely suitable for the comparison of MS Excel and Word files. If your comparison project includes largely MS Office documents, we advise you to use Compare Suite.

Our rating for Compare Suite is 8/10. However, it is our Editor’s choice as one of the best software applications for office document comparison. It also has powerful capabilities for integrating with document management system. In conclusion, we definitely recommend Compare Suite as the optimal choice for document comparison.

Take a look at the full utils list on http://www.diffutils.com/list-of-reviewed-software.

Defining crucial changes for text files

Sometimes I wish to be able to define what I think is a crucial change for a text file, instead of just every diff from one version to the next which we have plenty of tools for.

I need more than just an average diff util to see what has actually changed from one report output to the next, in order to avoid false positive line matches.

Some of the problems with standard diff util is that it can not handle these cases:

  • The order of rows has changed, but the content has not changed. (Moved lines detection in file compare)
  • The offset of columns has changed, but the content has not changed.
  • Whitespace, tabs and or spaces could be ignored.
  • Data in a line has changed, but is ok to ignore, such as date changes.
  • More or less data in a certain section has changed, but can be ignored.
  • Tags order changes, but the content within a tag does not. Eg. HTML tags.

Some examples of when a more advanced diff util could come in handy is:

  • Nessus .nsr scan result files, looking for interesting changes.
  • WYSIWYG HTML editors saves tags in another way that when file was loaded, even if there was no changes.

One approach is to make a configuration file for the diff util so you can use it in as many places as possible. Is this referred to as custom file filters.

Commandline is required for scripted compare.

Unix version is almost a must. Because often it is output from unix boxes that will be compared!

All this, instead of writing a custom parser for diff everytime a new usage comes up :-)

Wednesday, September 12, 2007

Comparing files and folders

When it comes to comparing files, I have been used to a perform this on text files only, always wondering if similar functionality is availble for Word documents or even images. The tools i have used in the past:

  • diff -y --suppress file1 file2, very usefull for checking changes to config files, eg. in scripting if you want to make only a certain number of lines are changed. Adding something like MKS Toolkit or GnuWin32 will give you similar tools on your Windows platform.
  • Total Commander has a built in compare files.
  • My favorite is WinMerge which is freeware and can recursively compare folders!
  • WinMerge can also magically replace the builtin side-by-side compare functionality of TortoiseCVS and TortoiseSVN which are my favorite Subversion and CVS version control Windows interfaces.
  • FreeCommander can compare files if you set it to use WinMerge. Without WinMerge FreeCommander can recursively compare files and folders (Syncronize).

I dont recall needing to merge a lot of files, so i dont know how the tools above will compare to Araxis Merge.

So at my new job i was pleasently surprised to learn of Araxis Merge, a new tool, that also can compare pictures! I do not have any particular use for it right now, but i am sure i will think of something :-) Unfortunately it will cost me some bucks, so i will probably stick with WinMerge for the time being.