sapo Application - sapotools/sapo GitHub Wiki

The Sapo stand-alone application sapo accepts input in the SIL file format from either the standard input or a file.

If the tool has been installed in a directory in the user path, the sapo application can be executed simply by typing its name on a shell. Otherwise, the name of the directory containing the executable must be prepended to the executable name itself (e.g., ./sapo/bin/sapo). In the next examples, we will assume that sapo has been installed in a directory included among those in the user path.

Users can execute sapo by either passing the path of the input file, as in

./bin/sapo path/to/file.sil

or without any argument. In the latter case, the tool reads its input from standard input.

cat path/to/file.sil | ./bin/sapo

The outputs, which are always written on standard output, can be also presented in JSON format by using the executable -j flag.

sapo -j path/to/file.sil

In order to have more pieces of information about the output format, refer to this document.

Some examples of SIL files are provided for your convenience in the directory examples in this repository.

A complete list of sapo command line options can be obtained by using the -h option.

Multi-threading

Even if sapo was compiled with multi-threading support, it only runs one thread by default. In order to increase the number of threads, use the sapo command line option -t.

This option can take as parameter either nothing or one natural number greater than 0. By issuing the command

./bin/sapo -t path/to/file.sil

sapo uses the maximum number of concurrent threads for the executing architecture, while the line

./bin/sapo -t 5 path/to/file.sil

makes sapo running 5 threads.