Chapter 8
Command Reference

This section of the manual is intended to serve as a quick reference to ECharts commands and their command line options. More detailed explanations of the commands can be found elsewhere in the manual.

8.1 Machine Dependencies

ECharts translators determine dependencies amongst ECharts compilation units. For example, if a machine in one .ech file references a machine defined in another .ech file, then the default behavior for most translators is to automatically translate the other file as it translates the first file. This behavior can be disabled using the --no-dependencies command line option. Furthermore, if the modification date of an ECharts .ech file is later than the modification date of its respective ECharts host language file then the .ech file is re-translated to ensure the translated version is up to date. These aspects of ECharts translators are similar to the support provided by Java’s javac compiler.

8.2 ECHARTSPATH

Another similarity between javac and ECharts translators is the ability to define a list of directories in which to search for compilation units. While javac uses the CLASSPATH environment variable, ECharts uses the ECHARTSPATH environment variable. When the ECharts translator needs to locate a compilation unit upon which another compilation unit depends, it searches each directory listed in the ECHARTSPATH variable in the order they are listed until it locates the compilation unit. Similar to javac, ECharts translators reference the ECHARTSPATH environment variable or the --echartspath command-line argument. For example, in Example0001 (see Section  2.1), the ech2java translator is invoked as follows:


% ech2java --echartspath .. Example0001.ech

However, an equivalent way to invoke the translator would be to initialize the ECHARTSPATH environment variable. Here we assume a Unix environment using the bash shell.


% export ECHARTSPATH=..; ech2java Example0001.ech

If the ECHARTSPATH environment variable is defined and an ECharts translator is invoked with the --echartspath command-line option, then the value defined by the command-line option will override the value defined by the environment variable.

8.3 ech2java

The ech2java translator translates ECharts .ech machine definition files to Java .java files. The ech2java translator is introduced in Section  2.1.

Usage:

ech2java [options] [echartsfilenames] [echartspackagenames]

Summary:

Translate specified echartsfilenames and echartspackagenames to Java .java files. For each specified package, translate all .ech files in that package.

Options:

--echartspath

‘:’ separated list (‘;’ on Windows) specifying directories to search for the specified echartsfilenames and echartspackagenames. The default value is the current working directory.

--no-dependencies
Forces translator to not translate .ech files upon which the specified echartsfilenames and echartspackagenames depend. The default behavior is to translate dependencies.
--target-directory

Directory path specifying where to write translated files to. If subdirectories on path do not exist then they are created. The default value is the source directory of the specified echartsfilenames and echartspackagenames.

--package-subdirectory
Package subdirectory name relative to the target directory specifying where to write translated files to. The default value is the empty string.
--subpackages

‘:’ separated list (‘;’ on Windows) specifying package names recursively searched for .ech files. This is similar to the echartspackagenames command line argument except that package subdirectories are searched recursively for this option. The default value is the empty string.

--version
Print translator version and exit.
--help
Print help message and exit.

8.4 ech2dot

The ech2dot translator translates ECharts .ech machine definition files to Graphviz .dot files. The ech2dot translator is discussed in detail in Section  6.

Usage:

ech2dot [options] [echartsfilenames] [echartspackagenames]

Summary:

Translate specified echartsfilenames and echartspackagenames to Graphviz .dot files. For each specified package, translate all .ech files in that package.

Options:

--echartspath

‘:’ separated list (‘;’ on Windows) specifying directories to search for the specified echartsfilenames and echartspackagenames. The default value is the current working directory.

--no-dependencies
Forces translator to not translate .ech files upon which the specified echartsfilenames and echartspackagenames depend. The default behavior is to translate dependencies.
--target-directory

Directory path specifying where to write translated files to. If subdirectories on path do not exist then they are created. The default value is the source directory of the specified echartsfilenames and echartspackagenames.

--package-subdirectory
Package subdirectory name relative to the target directory specifying where to write translated files to. The default value is the empty string.
--subpackages
‘:’ separated list (‘;’ on Windows) list specifying package names recursively searched for .ech files. This is similar to the echartspackagenames command line argument except that package subdirectories are searched recursively for this option. The default value is the empty string.
--label-formatter

Fully qualified Python class name of label formatter. Default value is DotMachinePartialFormatter.DotMachinePartialFormatter.

--tooltip-formatter

Fully qualified Python class name of tooltip formatter. Default value is DotMachineCommentFormatter.DotMachineCommentFormatter.

--url-formatter

Fully qualified Python class name of URL formatter. Default value is DotMachineFormatter.DotMachineFormatter.

--version
Print translator version and exit.
--help
Print help message and exit.

8.5 ech2doc

The ech2doc translator translates ECharts .ech machine definition files to .html and .svg files. The ech2doc translator is discussed in detail in Section  7.2.

Usage:

ech2doc [options] [echartsfilenames] [echartspackagenames]

Summary:

Translate specified echartsfilenames and echartspackagenames to .html and .svg files. For each specified package, translate all .ech files in that package. Note that the Graphviz dot program must be installed to run this translator.

Options:

--echartspath

‘:’ separated list (‘;’ on Windows) specifying directories to search for the specified echartsfilenames and echartspackagenames. The default value is the current working directory.

--no-dependencies
Forces translator to not translate .ech files upon which the specified echartsfilenames and echartspackagenames depend. The default behavior is to translate dependencies.
--target-directory

Directory path specifying where to write translated files to. If subdirectories on path do not exist then they are created. The default value is the source directory of the specified echartsfilenames and echartspackagenames.

--subpackages
‘:’ separated list (‘;’ on Windows) list specifying package names recursively searched for .ech files. This is similar to the echartspackagenames command line argument except that package subdirectories are searched recursively for this option. The default value is the empty string.
--dot-path
‘dot’ program file path. Default value is ‘dot’.
--document-title

Documentation title HTML. Default value is ‘ECharts Machine Documentation’.

--window-title
Browser window title. Default value is document title.
--overview
Path to documentation overview file shown on first page of documentation. Overview may utilize HTML tags. Default is no overview file.
--header
Documentation footer HTML. Default value is empty string.
--svg-only
Only generate .html and .svg files to support browsable SVG machine diagrams. Does not generate .html files for navigating machine packages or classes. Default behavior is to generate all .html files.
--svg-fontsize
Font size in points for text associated with SVG machine diagrams. Default value is ‘8’.
--version
Print translator version and exit.
--help
Print help message and exit.

8.6 ech2javadoc

The ech2javadoc translator translates ECharts .ech machine definition files to .html and .svg files. The ech2javadoc translator is discussed in detail in Section  7.3.

Usage:

ech2javadoc [options] [echartsfilenames] [echartspackagenames]

Summary:

Translate specified echartsfilenames and echartspackagenames to .html and .svg files. For each specified package, translate all .ech files in that package. The target directory for translated files is a directory named doc-files that is a subdirectory of the .ech file source directory. Note that the Graphviz dot program must be installed to run this translator.

Options:

--echartspath

‘:’ separated list (‘;’ on Windows) specifying directories to search for the specified echartsfilenames and echartspackagenames. The default value is the current working directory.

--target-directory

Directory path specifying where to write translated files to. If subdirectories on path do not exist then they are created. The default value is the source directory of the specified echartsfilenames and echartspackagenames.

--subpackages
‘:’ separated list (‘;’ on Windows) list specifying package names recursively searched for .ech files. This is similar to the echartspackagenames command line argument except that package subdirectories are searched recursively for this option. The default value is the empty string.
--dot-path
‘dot’ program file path. Default value is ‘dot’.
--version
Print translator version and exit.
--help
Print help message and exit.

8.7 javadocpp

The javadocpp program post-processes HTML documentation generated by javadoc to provide customized views of ECharts machine class documentation. The javadocpp program is introduced in Section  7.3.

Usage:

javadocpp [options] [javadocdirs]

Summary:

Post-process specified javadocdirs. Each specified directory should contain javadoc HTML documentation. For each specified directory, post-process all HTML files corresponding to ECharts machine classes and recursively invoke the program for any subdirectories.

Options:

--version
Print program version and exit.
--help
Print help message and exit.