dicogis.cli.cmd_inventory module

dicogis.cli.cmd_inventory.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 ppostgres 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’

dicogis.cli.cmd_inventory.inventory(input_folder=None, formats='dgn,esri_shapefile,file_geodatabase_esri,file_geodatabase_geopackage,file_geodatabase_spatialite,geojson,gml,kml,mapinfo_tab,ecw,geotiff,jpeg', pg_services=None, output_path=None, output_format='excel', opt_notify_sound=True, opt_open_output=True, opt_prettify_size=False, opt_quick_fail=False, opt_raw_path=False, language=None, verbose=False)

List, extract metadata from geospatial datasets (files or database) and store it as files.

Make an inventory of geodata files starting from a folder and/or databases using connection listed in pg_service.conf and store everything in an output file.

Parameters:
  • input_folder (Optional[Path]) – starting folder for files. Defaults to None.

  • formats (str) – List of files extensions to include into listing. Defaults to every supported formats.

  • pg_services (Optional[list[str]]) – name(s) of PostgreSQL services to use. Repeatable. If None, database listing is ignored. Defaults to None.

  • pg_services – name(s) of PostgreSQL services to use. Repeatable. If None, database listing is ignored. Defaults to None.

  • language (Optional[AvailableLocales]) – language code to use. If not set, the current default locale is used. Defaults to None.

  • verbose (bool) – enable verbose mode. Defaults to False.