#s2v-fh
s2v-fh: error parsing command line -> Missing required options: t, f
After installation, simply run an application with command line (CLI) options. Input file and target are always required. Some applications have other required CLI options.
Running an application without any option will produce either an error stating which options are required or do nothing.
For instance, running s2v-fh
without any options:
#s2v-fh
s2v-fh: error parsing command line -> Missing required options: t, f
Use --help
for general usage information and --help [option]
for detailed help information on a particular option.
For instance, running s2v-is
with --help target
will provide detailed information on the CLI option target:
#s2v-is --help target CLI option: -t, --target <TARGET> (required) - specifies a conversion target Description: target for the conversion Supported targets are: svg, pdf, emf, wmf, ps, eps, png
Assuming there is an input file time-interval-based.svgz
in the directory src/test/resources/svg-files
, a conversion with layer handling into the output folder target/output-tests/s2v-fh/pdf/layers-index
with simple progress information can be realised as follows:
# s2v-fh --create-directories --overwrite-existing -l -i -t pdf -f src/test/resources/svg-files/time-interval-based.svgz -d target/output-tests/s2v-fh/pdf/layers-index -p
s2v-fh: --- processing multi layer, multi file output
s2v-fh: --- creating directories for output
s2v-fh: --- processing layer 00-frame
s2v-fh: --- processing layer 06-xEy
s2v-fh: --- processing layer 01-table
s2v-fh: --- processing layer 10-xSy
s2v-fh: --- processing layer 11-xFy
s2v-fh: --- processing layer 08-xOy
s2v-fh: --- processing layer 07-xMy
s2v-fh: --- processing layer 09-xDy
s2v-fh: --- processing layer 05-xBy
s2v-fh: --- finished successfully
The applications can be used in Java by simply creating a String[]
with the commands (same as command line) and then calling the execution method executeApplication(…)`directly.
The following code shows an example creating and object for the `s2v-fh
application, with a set of command line options, and then executing it.
1
2
3
4
5
6
7
8
9
10
String[] args = new String[]{
"--create-directories", "--overwrite-existing",
"--all-layers", "-l", "-i",
"-t", "pdf",
"-f", "src/test/resources/svg-files/time-interval-based.svgz",
"-d", "target/output-tests/s2v-fh/pdf/layers-index",
"-q"
};
Svg2Vector_FH app = new Svg2Vector_FH();
app.executeApplication(args);
The applications use return codes to provide information about the execution status:
0
means successfull execution
>0
means an early exit option (such as --help
or --version
) was used
<0
means an error did occur