Did you know ... Search Documentation:
Pack prolog_library_collection -- prolog/conf.pl
PublicShow source

This module is typically used in the following way:

:- initialization
   conf_json(Conf),
   configure_your_application(Conf).

or

:- initialization
   conf_json('my-application', Conf),
   configure_your_application(Conf).

The configuration file location can be supplied from the command line by using the following flag. If no location is supplied, the default configuration file location is used, i.e., `~/conf.json'.

--conf=$(FILE)
 cli_argument(+Key:atom, -Value:term) is semidet
 cli_argument(+Key:atom, +Default:term, -Value:term) is det
 cli_arguments(-Conf:dict) is det
 cli_arguments(+FlagMap:list(pair(atom,atom)), -Conf:dict) is det
 cli_arguments(+Argv:list(atom), +FlagMap:list(pair(atom,atom)), -Conf:dict) is det
 conf_json(-Conf:dict) is semidet
Read a dictionary with configuration information from a file whose FILE name is supplied as a command-line argument of the form `--conf=FILE`.
throws
- existence_error/1 if no configuration file exists.
 conf_json(+Key:atom, -Value:atom) is semidet
Like conf_json/1, but only returns that part of the configuration that resides underneath the given Key.
throws
- existence_error/1 if no configuration files exists.
- existence_error/2 if Key does not occur in the configuration file.
 data_directory(-Directory:atom) is semidet
 data_file(-AbsolutePath:atom) is multi
 data_file(+RelativePath:atom, -AbsolutePath:atom) is det

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 cli_arguments(Arg1, Arg2)
 cli_arguments(Arg1, Arg2, Arg3)