2

I see that BeyondCompare can be extended to include additional file formats, as in Additional File Viewer Rules for Beyond Compare 2 and also Additional file format downloads for version 3 but after a quick initial search I don't see how user's develop these special viewers. Is that documented anywhere?

I downloaded a few additional viewers which are handily imported via the BCFormats.bcpkg file

C:\Program Files (x86)\Beyond Compare 3\Helpers>dir /b /s
C:\Program Files (x86)\Beyond Compare 3\Helpers\HtmlTidy
C:\Program Files (x86)\Beyond Compare 3\Helpers\PdfToText.exe
C:\Program Files (x86)\Beyond Compare 3\Helpers\XLS_to_TAB_Single.vbs
C:\Program Files (x86)\Beyond Compare 3\Helpers\HtmlTidy\HtmlTidy.exe
C:\Program Files (x86)\Beyond Compare 3\Helpers\HtmlTidy\XML_tidied_sorted.bat
C:\Program Files (x86)\Beyond Compare 3\Helpers\HtmlTidy\XML_tidied_sorted_config.txt

What's the design to these things, are they something to the effect of a command line tool that reads in a text file as the first argument and outputs the converted file to standard output?

jxramos
  • 7,356
  • 6
  • 57
  • 105

2 Answers2

1

They are command line tools that preprocess a file before it is loaded for comparison. The first argument is an input file and the second argument is an output filename. As an example, the pdftotext.exe tool extracts a .pdf file to a plain text .txt file, then displays the temp file in Beyond Compare's Text Compare.

See Beyond Compare's help file topic Text Format Conversion Settings for details.

Chris Kennedy
  • 2,639
  • 12
  • 11
  • Solid, that's what I was missing. I got close but didn't snag anything searching for "additional formats" in the help pages. They should include some sort of text that matches the distributed formatting pages to make that search connection more direct. Thanks Chris – jxramos Jan 04 '16 at 20:02
0

In another question (Compare Json Files in Beyond Compare ) I walk through a step by step example that demonstrates some json conversion for diffs to lend a concrete example to this question. What Chris said above is spot on, it's basically a console application that uses some fixed argument positions to take in the input file path as well as an output file path that the text representation will be written to.

$myConvertingConsoleApp $inputFilePath $outputFilePath

Beyond compare will actually provide the actual arguments used by the console application during the conversion process.

It's worth noting that the input file need not even be a text file so long as you can come up with some sane textual representation of the file format that makes sense for diff algorithms to operate upon.

jxramos
  • 7,356
  • 6
  • 57
  • 105