Choosing results destinations

The read, extract, classify and redact commands share common parameters to determine how results are output to files. The -m/--multiple parameter will write results to files in the same directory as the source files and is most useful when using the CLI with more than one source file. The -o/--output-file parameter will write all results to a single file, and is particularly useful when classifying or extracting from more than one file.

The examples below refer to the extract command, but they apply to read, classify and redact too.

Writing all results to a single file

The --output-file (or -o) parameter writes all results to a single file, in whatever output format is selected.

For example, the following command writes the results in CSV format to results.csv:

aluma extract extractor-name test/*.* -f csv -o results.csv

Note that any existing file with the same name will be overwritten.

An alternative way of achieving the same thing is to redirect stdout, like this:

aluma extract extractor-name test/*.* -f csv > results.csv

Writing results for each processed file to a separate results file

The --multiple-files (or -m) parameter writes results for each input file into a separate results file in the same directory, with the same name but different file extension. The extension is determined from the output format being used.

For example, let's say we have these two files in a directory:

  • 0001.tif
  • 0002.tif

Using the -m option with the csv output format will create the following results files in the same directory:

  • 0001.csv

  • 0002.csv

    0001.csv will contain only the results for 0001.tif and so on.

To create individual results files, simply add the -m parameter. Normally you'll also want to specify csv or json format when using this parameter, like this:

aluma extract extractor-name test/*.* -f csv -m

Note that any existing files with the same names as the results files will be overwritten.

Displaying progress information

If you are processing multiple files and writing results to a file (or files) using the -m or -o parameters, you can display a progress bar using the -p parameter.

The progress bar will show you how many files have been processed and how many are still pending.