Command-line interface usage

dicogis-cli

Common options to commands or option only applicable to the main command.

Args:

verbose: enable verbose mode. Defaults to False. version: show version and exit. Defaults to version_callback.

dicogis-cli [OPTIONS] COMMAND [ARGS]...

Options

--verbose, --no-verbose

Increase verbosity to show debug logs.

Default:

False

--version

Show version and exit.

--install-completion

Install completion for the current shell.

--show-completion

Show completion for the current shell, to copy it or customize the installation.

Environment variables

DICOGIS_DEBUG

Provide a default for --verbose

inventory

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.

Args:

input_folder: starting folder for files. Defaults to None. formats: List of files extensions to include into listing. Defaults to every

supported formats.

pg_services: 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: language code to use. If not set, the current default locale is used.

Defaults to None.

verbose: enable verbose mode. Defaults to False.

dicogis-cli inventory [OPTIONS]

Options

--input-folder <input_folder>

Starting folder for listing files. The folder must exist and be readable.If None, files listing is ignored. Defaults to None.

--formats <formats>

List of files extensions to include into listing. Must be part of supported formats. Defaults to every supported formats.

Default:

'dgn,esri_shapefile,file_geodatabase_esri,file_geodatabase_geopackage,file_geodatabase_spatialite,geojson,gml,kml,mapinfo_tab,ecw,geotiff,jpeg'

--pg-services <pg_services>

name(s) of PostgreSQL services to use. It’s a repeatable option. If None, database listing is ignored. Defaults to None.

--output-path <output_path>

If not set, the file is created in the current working directory (cwd) and the filename is a concatenation of various informations.

--output-format <output_format>

Output format. For now, only Excel (Microsoft Excel .xlsx) is supported. Here for the future!

Default:

'excel'

Options:

excel | json | udata

--opt-notify-sound, --no-opt-notify-sound

Enable/disable notification’s sound at the end of processing.

Default:

True

--opt-open-output, --no-opt-open-output

Enable/disable auto opening output file when processing has finished.

Default:

True

--opt-prettify-size, --no-opt-prettify-size

Enable prettified files size in output. Example: 1 ko instead of 1024.

Default:

False

--opt-quick-fail, --no-opt-quick-fail

Enable quick fail instead of passing errors. Useful for debug.

Default:

False

--opt-raw-path, --no-opt-raw-path

Enable raw path instead of hyperlink in formats which support it.

Default:

False

--language <language>

Force language to use. If not set, the current default locale is used.

Options:

EN | FR | ES

--verbose, --no-verbose
Default:

False

Environment variables

DICOGIS_START_FOLDER

Provide a default for --input-folder

DICOGIS_FORMATS_LIST

Provide a default for --formats

DICOGIS_POSTGRES_SERVICES

Provide a default for --pg-services

DICOGIS_OUTPUT_FILEPATH

Provide a default for --output-path

DICOGIS_OUTPUT_FORMAT

Provide a default for --output-format

DICOGIS_ENABLE_NOTIFICATION_SOUND

Provide a default for --opt-notify-sound

DICOGIS_OPEN_OUTPUT

Provide a default for --opt-open-output

DICOGIS_EXPORT_SIZE_PRETTIFY

Provide a default for --opt-prettify-size

DICOGIS_QUICK_FAIL

Provide a default for --opt-quick-fail

DICOGIS_EXPORT_RAW_PATH

Provide a default for --opt-raw-path

DICOGIS_DEFAULT_LANGUAGE

Provide a default for --language

publish

Publish metadata (previously exported as JSON files) to a catalog.

dicogis-cli publish [OPTIONS]

Options

--input-folder <input_folder>

Folder where are stored metadata as JSON files to publish.

--udata-api-key <udata_api_key>

API key of the account uData instance.

--udata-api-url-base <udata_api_url_base>

API URL of the uData instance.

Default:

'https://demo.data.gouv.fr/api/'

--udata-api-version <udata_api_version>

API’s version of the uData instance.

Default:

'1'

--udata-organization-id <udata_organization_id>

Organization ID in uData instance. If set, datasets will be added to the organization instead of the user authenticated with the API key.

--opt-notify-sound, --no-opt-notify-sound

Enable/disable notification’s sound at the end of processing.

Default:

True

--verbose, --no-verbose
Default:

False

Environment variables

DICOGIS_PUBLISH_INPUT_FOLDER

Provide a default for --input-folder

DICOGIS_UDATA_API_KEY

Provide a default for --udata-api-key

DICOGIS_UDATA_API_URL_BASE

Provide a default for --udata-api-url-base

DICOGIS_UDATA_API_VERSION

Provide a default for --udata-api-version

DICOGIS_UDATA_ORGANIZATION_ID

Provide a default for --udata-organization-id

DICOGIS_ENABLE_NOTIFICATION_SOUND

Provide a default for --opt-notify-sound