dicogis.export.output_path module

Default output path of an inventory, shared by the CLI and the GUI.

dicogis.export.output_path.determine_output_path(output_path, output_format='excel', input_folder=None, pg_services=None)

Get the output path depending on options passed.

Parameters:
  • output_path (Path | str | None) – output path passed to inventory CLI

  • output_format (str) – input output format passed to inventory CLI

  • input_folder (Optional[Path]) – input folder passed to inventory CLI

  • pg_services (Optional[list[str]]) – list of postgres services names to use

Raises:

ValueError – if output format is not supported

Return type:

Path

Returns:

output path to use. A folder if output_format==’json’,

a file if output_format==’excel’