Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Opened
sales@elliecomputing.com - Contact us


Generating Reports from Command Line

 

 

Since Ellié Computing Merge 1.2, we introduced a new reporting feature. This feature is available from both console and graphical interface.

The report generation from the command line is particularly useful to use Merge as a sub-product or a tool for your source code quality works.

  • Basic generation

Syntax:
ecmerge-cli.exe -O<export-file> -X<format> [-E] -x<sub-format> [<ancestor-file|ancestor-folder>] <file1|folder1> <file2|folder2>
NB: under linux the command starts with ecmerge --cli rather than ecmerge-cli.exe

This command will create a report  in the file <export-file> of given <format> (none, unixpatch, html or xml) for the given input files.
-E forces embedding of sub-reports of folders (and to use the same export format as well).
-x set the format for the files report (in the context of folders).

You can also set some of the comparison options with various switches and options and add --factory switch to use factory settings for all the options (comparison and generation) so as to get predictible results on any computer.

Information You may have noticed -Xnone... to produce no report at all. This is typically interesting when you want to generate the report by yourself with the scripting engine (ECMerge contains a full ECMAScript engine and you have access to a document object model for any type of document).

  • Parametering report generation

Though you can generate report using only command line arguments, it is not the most practical way. You can use three major methods to get all the settings set according your wishes:

  • using --doc-settings or --options-set options
    with this method you specify all the path as in the basic method but your report will mimic all the options from the given ECMS/ECMT document or the options set that you specified. You may use this method if some of the options that you need cannot be set from the command line parameters.
    You may also use the --doc-settings parameter when you cannot foresee where the folder or files are located when parametering the report.
  • using the name of an ECMS/ECMT as parameter
    with this method all the source paths are taken from the ECMS or ECMT, together with all the options. Note that paths in ECMS/ECMT documents are absolute paths. 
  • using --pdl-script and/or --pdl-script-text options
    since 2.1.75, you can start ECMAScript scripts between document initialisation (setting URL from command line...) and document load / report generation. See Running scripts at start-up and OptionsSet object for more information about that subject.

With both of these methods you can use all the options box (including the report generation boxes using the Apply button), the only mandatory options are then the main report format (-X) and the location for the report file (-O).

In order to ease the use of these feature, the Reports dialog box has a Export / Copy Command Line to Clipboard option which will generate the command line to launch to generate exactly the report.

See also: