The controls on this page let you define converters to apply
on files at loading time so as to allow conversions from binary
to text format for example. This is the primary place to edit
converters.
The list contains all the registered converters (active
or not). Use checkboxes to enable or disable converters.
The
New and
Edit buttons will open the Converter details
dialog box. Use the
Remove button to delete a converter from the
list.
Removing a converter
can be undone only by cancelling the whole Options dialog
box.
An
Auto-detection feature is provided with
Ellié Computing Merge. This feature allows to configure
converters by simply including detection scripts in the
'macros' application folder. We provide a variety of detectors
built-in with Ellié Computing Merge. If you think that a
particular tool would fit well this purpose and is not
built-in, please
contact us. We will
study the possibility of including a detection script in the
main build or in the
Add-Ons
part of our website (in fact, we'll make all efforts
to make it work, but sometimes there is no way!).
Typically if your converter is covered by a plug-in, you
just have to install it if it has an installer, or unzip it to
the
user-converters sub-folder aside ECMerge
executable (for Mac OS X, it is within the package
content, in
Contents/MacOS). Placing your converters in
user-converters sub-folder is particularly
practical if you placed ECMerge in a USB stick in its
"portable" mode.
If you do not want to ask us for a detection script or
the tool is not widely available. Please read and follow the
below instructions to add converters.
Currently the converter mechanism is better oriented toward
files but is able to handle folders as well. Converters take in
fact a
path in input and produces something at a location
specified by Merge. The input
file name is matched against a mask (e.g. *.doc), the
converter can do anything you like.
ECMerge colours enabled converters in
red when they are
hidden by another more
generic converter placed before in the list. Such a
converter would be indeed never selected by ECMerge for use.
The converter which
hides another one is
coloured in
blue.
Each converter contains the following information:
a
name: used to be displayed in the list.
some activation conditions:
a
pattern and optionally a type of
document in
Activate for : files
or folders matching the pattern will be processed
by the given converter, and only if the type document is
not specified by the user or is exactly what was specified
(e.g. activate filters which output images only when
choosing image viewer).
OR an
activation script: the script is a
function body of 'function (filename, expects, child,
undecorated_filename)', filename being the $(input) as in
arguments, and expects is either undefined if the user did
not force a particular comparison type or one of the known
scripting document identifiers. The undecorated file name
is the filename without SCC related extensions (as .r## of
SVN or .mine...). The return value is true if the
converter should be activated.
a technic to compute the output filename:
an
output extension: this text is appended to
the temporary file name before it is set in
$(output) value. For a bitmap you can use
.bmp for example. This option is useful
when the converter application selects its output type from
this extension. This extension is not particularly used by
Ellié Computing Merge for file type detection (it uses
the data themselves to determine which type of comparisons
to use).
OR an
output filename script: the script is a
function body of 'function (filename,
undecorated_filename)', the return value is the filename to
use as output. The returned filename must be unique to
avoid collision a function is provided by the virtual file
system scripting for that purpose.
application: path to application to use. Can
be a batch file.
arguments: arguments to use with the
application path. Placeholders
$(input) and
$(output) will be replaced by the
appropriate file names with full path. Ellié Computing
Merge automatically escapes these parameters so that you do
not have to care about spaces inside these arguments. You do
not need to put quotes around them.
outputs a folder: should be checked for
archives expanders, this way Ellié Computing provides a
temporary folder rather than a temporary empty file to
generate the result
use this converter for folders sub-document
comparisons: activate this when you want the
converter to be used from folders sub-document comparisons.
This option is disabled (and cannot be used) if
outputs a folder is activated. It is useful to disable
check exit code: if this option is checked,
Ellié Computing Merge will generate an error
message if the converter ("application" field) did
not exit with the success exit code. If unchecked,
Ellié Computing Merge will assume the converter ran
successfully.
exit code for success: Success exit code of
the application (usually 0).
If a converter is enabled for certain patterns, it will be
used to preprocess files matching these patterns prior to
comparison. If more that one converter is enabled for a
pattern, all of them will be executed one by one in top-down
order. You can change the order of converters with the
Move Up/
Move Down buttons near the list.
This screen also let you
Import/Export converters definitions.
You cannot save
converted files in place, since saving the converted data would
destroy the original file. Though, you can edit them and save
them elsewhere.
Use of standard
input and output streams: For technical reasons, it is not
possible to use the standard input and output stream in
converters. Please write a batch such as the following example.
Note that under Unices, parameters use the $ prefix in place of
% (i.e. $1 in place of %1)
You wish to use a converter with the following
arguments:
app_name --options < $(input) > $(output)
Use the
stdioconv converters located in the
converters directory (
stdioconv.sh for Unix-like,
stdioconv.bat for Windows and
stdiocon9x.bat for old Win9x Windows) and call
them as explained in their sources.
A converter can take
an archive and generate a folder from this archive. This is
particularly useful for ZIP, tar or any archive format which
can contain several files. You can also use converters for
gzip, bzip files and generally any single-file compression
formats.