### Configuration File Structure Example Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blame/27899590fa586afb4c3e2a76bfbe5d36820d8be1/README_page=1 An example demonstrating the structure of an ADOxx configuration file, including key-value pairs, comments, and whitespace handling. Configuration files use a property-like format with key-value pairs separated by equals signs and comments starting with '!' or '#'. ```text # Path to a file to append the logged events to or empty to not log to a file. logFile= # ID of a window in the tool to append the logged events to or empty to not log # to a window. Note that showing a window can change the value in the session. logWindow=Event Log # Up to which level the events should be logged. logLevel=3 # Up to which level simple popups with the logged events should be shown in the # tool or 0 to not show popups. logLevel takes precedence over this. logPopupLevel=0 ``` -------------------------------- ### Example Configuration File Structure Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blob/7398e6519ad295a867f0c2e958bac8b45d7e9f3c/README This example illustrates the expected structure of a configuration file handled by the AdoScript module. It follows a property file-like format with key-value pairs, comments starting with '!' or '#', and ignores leading/trailing whitespace. This format is crucial for the module's parsing and transformation functionalities. ```text # Path to a file to append the logged events to or empty to not log to a file. logFile= # ID of a window in the tool to append the logged events to or empty to not log # to a window. Note that showing a window can change the value in the session. logWindow=Event Log ``` -------------------------------- ### AdoScript Configuration File Syntax Example Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/merge_requests/1/diffs_commit_id=1140e11927940dc78387287fd590d6107cd2d0ba&file=25cda629d44002e0d11c3ac51c6291c44cce1f74 An example demonstrating the syntax for AdoScript configuration files, including key-value pairs, comments, and property groups. Property groups are defined by lines enclosed in square brackets, and comments start with '!' or '#'. ```plaintext active=Object Detection OMiLAB [ Object Detection OMiLAB ] # --------------------- system properties Scene2Mode but testing OliveEndpoint=https://https://berlin.omilab.org/micro-service-controller-rest/rest/ OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d [Object Detection localhost] ``` -------------------------------- ### Example: Loading and Displaying Configuration in AdoScript Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/7398e6519ad295a867f0c2e958bac8b45d7e9f3c_action=show&controller=projects%2Fcommit&id=7398e6519ad_d6f1c3_c8b45d7e9f3c&namespace_id=resources%2Fadoxx-modules&project_id=adoscript-configuration-files&w=1 An example demonstrating how to initialize an ADOxx map with default logger configuration values, load configuration from a file if specified, and then display the current configuration map. This illustrates the practical application of configuration loading procedures. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:( { "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\\mylogger.properties" }) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) ``` -------------------------------- ### Example: Loading and Displaying Configuration (AdoScript) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/7398e6519ad295a867f0c2e958bac8b45d7e9f3c An example demonstrating how to create an ADOxx map with default logging configuration values, load configuration from a file if it exists, and then display the current configuration. This snippet illustrates the practical application of configuration loading procedures. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:( { "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\\mylogger.properties" }) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) # Change some of the values in the configuration ``` -------------------------------- ### Example Configuration File Structure Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/raw/3cba6c325fdd6e75a4dd37ca9bc5567ecbc5a73d/README This example illustrates the expected structure of configuration files handled by the AdoScript module. It follows a key-value pair format similar to property files, with support for comments. ```plaintext # Path to a file to append the logged events to or empty to not log to a file. logFile= # ID of a window in the tool to append the logged events to or empty to not log # to a window. Note that showing a window can change the value in the session. logWindow=Event Log # Up to which level the events should be logged. logLevel=3 # Up to which level simple popups with the logged events should be shown in the ``` -------------------------------- ### ADOxx Script Example: Loading Configuration Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/tree/32c9a161c52088a810800009225b0ecf7471c6c6 An example script demonstrating how to initialize an ADOxx map with default values and then load configuration from a file if specified. It uses SETL for initialization and conditional logic for loading. ```adoscript # Create an ADOxx map with default values. SETL loggerCfg:( "logFile": "", "logWindow": "Event Log", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\mylogger.properties" ) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, ``` -------------------------------- ### Example Configuration File Structure Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/raw/1140e11927940dc78387287fd590d6107cd2d0ba/README This example illustrates the expected format for configuration files handled by the AdoScript module. It demonstrates key-value pairs, comments, and property group definitions. ```plaintext # Path to a file to append the logged events to or empty to not log to a file. logFile= # ID of a window in the tool to append the logged events to or empty to not log # to a window. Note that showing a window can change the value in the session. logWindow=Event Log # Up to which level the events should be logged. logLevel=3 ``` -------------------------------- ### Example: Loading Configuration from File Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blame/7398e6519ad295a867f0c2e958bac8b45d7e9f3c/README An AdoScript example demonstrating how to initialize an ADOxx map with default values and then load configuration from a file if specified. It utilizes `CF_LOAD_CONFIG_FROM_FILE`. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:( "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, # We specify that the configuration is located in the ADOxx Library's DB. "#cfgFile": "db:\\mylogger.properties" ) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, ``` -------------------------------- ### Configuration File Example (OBJ_DECT_config.cfg) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/7b811e9f9e53e6e60252002ca4badcbc5213ccb9 An example of a configuration file in .cfg format, likely used for object detection settings. It includes system properties and group-specific configurations with various endpoint and bucket settings. ```ini active=Image Recognition OMiLAB@BOC Vienna - testing [ Object Detection OMiLAB@BOC Vienna - testing ] # --------------------- system properties Scene2Model faulmanngasse (lab.boc-group.eu) but testing OliveEndpoint=https://lab.boc-group.eu/micro-service-controller-rest/rest OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d #BucketAndRecognitionServiceEndpoint=https://lab.boc-group.eu/scene2model BucketAndRecognitionServiceEndpoint=http://10.0.6.40:9995 BucketEndpoint=https://bucket.boc-group.eu #BucketEndpoint=https://bucket.omilab.org DefaultBucket=s2m [Object Detection localhost] # --------------------- system properties Scene2Model deployed locally on the machine OliveEndpoint=http://localhost:9903/micro-service-controller-rest/rest/ OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d #BucketAndRecognitionServiceEndpoint=https://lab.boc-group.eu/scene2model #BucketAndRecognitionServiceEndpoint=http://localhost:9999 BucketAndRecognitionServiceEndpoint=http://s2m.local:9904 BucketEndpoint=s2m.local:9900 #BucketEndpoint=https://bucket.omilab.org DefaultBucket=s2m ``` -------------------------------- ### Example: Loading and Displaying Configuration in AdoScript Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/raw/1140e11927940dc78387287fd590d6107cd2d0ba/README_inline=false This AdoScript example demonstrates how to initialize an ADOxx map with default logging configurations, load actual settings from a file if it exists, and then display the current configuration. It utilizes CF_LOAD_CONFIG_FROM_FILE for loading and STR for converting the map to a string for display. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:( "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\mylogger.properties" ) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) ``` -------------------------------- ### Example: Initialize and Load Configuration Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/raw/1140e11927940dc78387287fd590d6107cd2d0ba/README An AdoScript example demonstrating how to initialize an ADOxx map with default logger configuration values and then load the actual configuration from a file specified in the map. It includes a conditional check to load the file only if the configuration file path is provided. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:( "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\\mylogger.properties" ) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) ``` -------------------------------- ### Example: Managing Logger Configuration Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blob/4838f6830cf6706e078f4efa90b9935ddc689b89/README Demonstrates a practical example of managing logger configuration in ADOxx. It includes creating a default configuration map, loading from a file, modifying values, saving back to the file, and using the GUI editor. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:( "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\\mylogger.properties" ) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) # Change some of the values in the configuration SETL loggerCfg["logWindow"] tekanan:("MyLogger Window") SETL loggerCfg["logLevel"]:(2) SETL loggerCfg["logPopupLevel"]:(1) SETL loggerCfg["#superSecret"] tekanan:("Hidden message") # Update or create the configuration file from the current state of the map. CF_SAVE_CONFIG_TO_FILE configFile:(loggerCfg["#cfgFile"]) configMap:(loggerCfg) # Let the user select and edit the file. CF_EDIT_CONFIGFILE_FROM_DB_GUI filter:(".*mylogger\\.properties$") configMap:(loggerCfg) ``` -------------------------------- ### Example: Managing Logger Configuration (AdoScript) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blame/3cba6c325fdd6e75a4dd37ca9bc5567ecbc5a73d/README_page=1 Demonstrates a comprehensive workflow for managing logger configuration using ADOxx procedures. It includes creating a default map, loading from a file, modifying values, saving back to the file, editing via GUI, and displaying the final state. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:({ "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, # We specify that the configuration is located in the ADOxx Library's DB. "#cfgFile": "db:\\mylogger.properties" }) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) # Change some of the values in the configuration SETL loggerCfg["logWindow"] tekanan:("MyLogger Window") SETL loggerCfg["logLevel"] tekanan:(2) SETL loggerCfg["logPopupLevel"] tekanan:(1) SETL loggerCfg["#superSecret"] tekanan:("Hidden message") # Update or create the configuration file from the current state of the map. CF_SAVE_CONFIG_TO_FILE configFile:(loggerCfg["#cfgFile"]) configMap:(loggerCfg) # Let the user select and edit the file. CF_EDIT_CONFIGFILE_FROM_DB_GUI filter:(".*mylogger\\.properties$") configMap:(loggerCfg) # Show the current state of the ADOxx map and configuration file. SETL loggerCfgString tekanan:("") CF_MAP_TO_CONFIG_STRING configMap:(loggerCfg) configString:loggerCfgString CC "AdoScript" FREAD file:(loggerCfg["#cfgFile"]) SETL loggerFileString tekanan:(text) CC "AdoScript" VIEWBOX text:(### State of the map #############################\n\n" + STR loggerCfg + "\n\n" + "### Map transformed to configuration string #####\n\n" + loggerCfgString + "\n\n" + "### Actual content of the configuration file #####\n\n" + loggerFileString) # Remove the configuration file again. CC "AdoScript" FILE_DELETE file:(loggerCfg["#cfgFile"]) ``` -------------------------------- ### Example: Managing Logger Configuration - ADOxx Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blame/7c307b3b6f5c81a1a573c160446c5209e87dd0fc/README Demonstrates a comprehensive workflow for managing logger configuration using ADOxx procedures. It includes creating a default map, loading from a file, modifying values, saving back to the file, editing via GUI, and verifying the results. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:({ "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\\mylogger.properties" }) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) # Change some of the values in the configuration SETL loggerCfg["logWindow"] tekanan:("MyLogger Window") SETL loggerCfg["logLevel"]:(2) SETL loggerCfg["logPopupLevel"]:(1) SETL loggerCfg["#superSecret"] tekanan:("Hidden message") # Update or create the configuration file from the current state of the map. CF_SAVE_CONFIG_TO_FILE configFile:(loggerCfg["#cfgFile"]) configMap:(loggerCfg) # Let the user select and edit the file. CF_EDIT_CONFIGFILE_FROM_DB_GUI filter:(".*mylogger\\.properties$") configMap:(loggerCfg) # Show the current state of the ADOxx map and configuration file. SETL loggerCfgString tekanan:("") CF_MAP_TO_CONFIG_STRING configMap:(loggerCfg) configString:loggerCfgString CC "AdoScript" FREAD file:(loggerCfg["#cfgFile"]) SETL loggerFileString:(text) CC "AdoScript" VIEWBOX text:("### State of the map #############################\n\n" + STR loggerCfg + "\n\n" + "### Map transformed to configuration string #####\n\n" + loggerCfgString + "\n\n" + "### Actual content of the configuration file #####\n\n" + loggerFileString) # Remove the configuration file again. CC "AdoScript" FILE_DELETE file:(loggerCfg["#cfgFile"]) ``` -------------------------------- ### Configuration File Example: Object Detection OMiLAB@BOC Vienna (OBJ_DECT_config.cfg) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/7b811e9f9e53e6e60252002ca4badcbc5213ccb9_view=inline This is an example of a configuration file (.cfg) for Object Detection, likely used with OMiLAB@BOC Vienna. It defines system properties such as endpoints and microservice identifiers for different environments, including a remote testing environment and a local setup. ```cfg active=Image Recognition OMiLAB@BOC Vienna - testing [ Object Detection OMiLAB@BOC Vienna - testing ] # --------------------- system properties Scene2Model faulmanngasse (lab.boc-group.eu) but testing OliveEndpoint=https://lab.boc-group.eu/micro-service-controller-rest/rest OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d #BucketAndRecognitionServiceEndpoint=https://lab.boc-group.eu/scene2model BucketAndRecognitionServiceEndpoint=http://10.0.6.40:9995 BucketEndpoint=https://bucket.boc-group.eu #BucketEndpoint=https://bucket.omilab.org DefaultBucket=s2m [Object Detection localhost] # --------------------- system properties Scene2Model deployed locally on the machine OliveEndpoint=http://localhost:9903/micro-service-controller-rest/rest/ OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d #BucketAndRecognitionServiceEndpoint=https://lab.boc-group.eu/scene2model #BucketAndRecognitionServiceEndpoint=http://localhost:9999 BucketAndRecognitionServiceEndpoint=http://s2m.local:9904 BucketEndpoint=s2m.local:9900 #BucketEndpoint=https://bucket.omilab.org DefaultBucket=s2m ``` -------------------------------- ### Example: ADOxx Map Initialization and File Management Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blob/master/README Demonstrates the creation of an ADOxx map with default values, loading configuration from a file, updating map values, saving to a file, editing via GUI, transforming the map to a string, reading the file content, and finally deleting the configuration file. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:({ "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\mylogger.properties" }) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, # since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) # Change some of the values in the configuration SETL loggerCfg["logWindow"] tekanan:("MyLogger Window") SETL loggerCfg["logLevel"] tekanan:(2) SETL loggerCfg["logPopupLevel"] tekanan:(1) SETL loggerCfg["#superSecret"] tekanan:("Hidden message") # Update or create the configuration file from the current state of the map. CF_SAVE_CONFIG_TO_FILE configFile:(loggerCfg["#cfgFile"]) configMap:(loggerCfg) # Let the user select and edit the file. CF_EDIT_CONFIGFILE_FROM_DB_GUI filter:(".*mylogger\.properties$") configMap:(loggerCfg) # Show the current state of the ADOxx map and configuration file. SETL loggerCfgString tekanan:("") CF_MAP_TO_CONFIG_STRING configMap:(loggerCfg) configString:loggerCfgString CC "AdoScript" FREAD file:(loggerCfg["#cfgFile"]) SETL loggerFileString tekanan:(text) CC "AdoScript" VIEWBOX text:("### State of the map #############################\n\n" + STR loggerCfg + "\n\n" + "### Map transformed to configuration string #####\n\n" + loggerCfgString + "\n\n" + "### Actual content of the configuration file #####\n\n" + loggerFileString) # Remove the configuration file again. CC "AdoScript" FILE_DELETE file:(loggerCfg["#cfgFile"]) ``` -------------------------------- ### ADOxx Configuration File with Property Groups Example Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/1140e11927940dc78387287fd590d6107cd2d0ba_merge_request_iid=1&view=parallel&w=0 Illustrates how to structure ADOxx configuration files using property groups. Lines starting with '[group-name]' define a group, and subsequent key-value pairs belong to that group until the next group or the end of the file. ```text active=Object Detection OMiLAB [ Object Detection OMiLAB ] # System properties for OMiLAB deployment OliveEndpoint=https://berlin.omilab.org/micro-service-controller-rest/rest/ OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d [Object Detection localhost] # System properties for local deployment OliveEndpoint=http://localhost:9903/micro-service-controller-rest/rest/ OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d ``` -------------------------------- ### AdoScript Example: Loading and Saving Configuration Files Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/793087e269869368d7c88b123b6b4422f8fc7a7f This AdoScript code demonstrates how to load and save configuration files within the ADOxx environment. It utilizes procedures provided by the module to handle configuration data transformation between string and ADOxx map formats. Ensure the module is correctly installed and dependencies are met. ```AdoScript // Example AdoScript for configuration file operations // Load configuration from a file into an ADOxx map // Assuming CF_EDIT_CONFIGFILE_FROM_DB_GUI is available and configured // let configMap = CF_EDIT_CONFIGFILE_FROM_DB_GUI("path/to/your/config.txt"); // Save configuration from an ADOxx map to a file // Assuming a procedure like CF_SAVE_CONFIGFILE_TO_DB exists // let configMapToSave = ...; // Your ADOxx map data // CF_SAVE_CONFIGFILE_TO_DB(configMapToSave, "path/to/save/config.txt"); // Transform configuration string to ADOxx map // let configString = "key1=value1\nkey2=value2"; // let configMapFromString = CF_TRANSFORM_STRING_TO_MAP(configString); // Transform ADOxx map to configuration string // let configMapToTransform = ...; // Your ADOxx map data // let configStringFromMap = CF_TRANSFORM_MAP_TO_STRING(configMapToTransform); ``` -------------------------------- ### Example: Managing Logger Configuration Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blame/32c9a161c52088a810800009225b0ecf7471c6c6/README Demonstrates the usage of ADOxx configuration functions, including creating a map, loading from a file, modifying values, saving to a file, editing via GUI, and converting the map to a configuration string. It also shows how to display the map's state and file content. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:({ "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, # We specify that the configuration is located in the ADOxx Library's DB. "#cfgFile": "db:\\mylogger.properties" }) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) # Change some of the values in the configuration SETL loggerCfg["logWindow"] tekanan:("MyLogger Window") SETL loggerCfg["logLevel"] tekanan:(2) SETL loggerCfg["logPopupLevel"] tekanan:(1) SETL loggerCfg["#superSecret"] tekanan:("Hidden message") # Update or create the configuration file from the current state of the map. CF_SAVE_CONFIG_TO_FILE configFile:(loggerCfg["#cfgFile"]) configMap:(loggerCfg) # Let the user select and edit the file. CF_EDIT_CONFIGFILE_FROM_DB_GUI filter:(".*mylogger\\.properties$") configMap:(loggerCfg) # Show the current state of the ADOxx map and configuration file. SETL loggerCfgString tekanan:("") CF_MAP_TO_CONFIG_STRING configMap:(loggerCfg) configString:loggerCfgString CC "AdoScript" FREAD file:(loggerCfg["#cfgFile"]) SETL loggerFileString:(text) CC "AdoScript" VIEWBOX text:("### State of the map #############################\n\n" + STR loggerCfg + "\n\n" + "### Map transformed to configuration string #####\n\n" + loggerCfgString + "\n\n" + "### Actual content of the configuration file #####\n\n" + loggerFileString) # Remove the configuration file again. CC "AdoScript" FILE_DELETE file:(loggerCfg["#cfgFile"]) ``` -------------------------------- ### Configuration File Example: Object Detection without Group (OBJ_DECT_config_without_group.ini) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/7b811e9f9e53e6e60252002ca4badcbc5213ccb9_view=inline This is an example of an INI configuration file (.ini) for Object Detection, similar to the .cfg example but without explicit group sections. It specifies system properties like endpoints and microservice details for a testing environment. ```ini active=Image Recognition OMiLAB@BOC Vienna - testing # --------------------- system properties Scene2Model faulmanngasse (lab.boc-group.eu) but testing OliveEndpoint=https://lab.boc-group.eu/micro-service-controller-rest/rest OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d #BucketAndRecognitionServiceEndpoint=https://lab.boc-group.eu/scene2model BucketAndRecognitionServiceEndpoint=http://10.0.6.40:9995 BucketEndpoint=https://bucket.boc-group.eu #BucketEndpoint=https://bucket.omilab.org DefaultBucket=s2m ``` -------------------------------- ### Example: Initialize and Save Logger Configuration Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/tree/v1.0 Demonstrates initializing a logger configuration map with default values, loading it from a file if it exists, modifying some settings, and then saving the updated configuration back to the file. It also shows how to view the configuration and use GUI editing tools. ```SETL SETL loggerCfg:( "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, "#cfgFile": "db:\mylogger.properties" ) IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } CC "AdoScript" VIEWBOX text:(STR loggerCfg) SETL loggerCfg["logWindow"]=("MyLogger Window") SETL loggerCfg["logLevel"]:(2) SETL loggerCfg["logPopupLevel"]:(1) SETL loggerCfg["#superSecret"]=("Hidden message") CF_SAVE_CONFIG_TO_FILE configFile:(loggerCfg["#cfgFile"]) configMap:(loggerCfg) CF_EDIT_CONFIGFILE_FROM_DB_GUI filter:(".*mylogger\.properties$") configMap:(loggerCfg) ``` -------------------------------- ### INI Configuration File Example Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/merge_requests/1 An example of an INI configuration file used for image recognition services. It defines endpoints and bucket names for different services. ```ini # # active=Image Recognition OMiLAB@BOC Vienna - testing # --------------------- system properties Scene2Model faulmanngasse (lab.boc-group.eu) but testing OliveEndpoint=https://lab.boc-group.eu/micro-service-controller-rest/rest OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d #BucketAndRecognitionServiceEndpoint=https://lab.boc-group.eu/scene2model BucketAndRecognitionServiceEndpoint=http://10.0.6.40:9995 BucketEndpoint=https://bucket.boc-group.eu #BucketEndpoint=https://bucket.omilab.org DefaultBucket=s2m ``` -------------------------------- ### Logger Configuration Example (AdoScript) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/blame/52052e8c56b9cd1f980fc9068ba812ac9fe5c9bb/README_page=1 Demonstrates a practical use case for ADOxx configuration procedures, specifically for managing logger settings. It includes creating a default map, loading from a file, modifying values, saving back to the file, editing via GUI, and displaying the final state. ```AdoScript # Create an ADOxx map with default values. SETL loggerCfg:({ "logFile": "", "logWindow": "", "logLevel": 3, "logPopupLevel": 0, # We specify that the configuration is located in the ADOxx Library's DB. "#cfgFile": "db:\\mylogger.properties" }) # Load the configuration from a file if it is present. IF (loggerCfg["#cfgFile"] <> "") { CF_LOAD_CONFIG_FROM_FILE configFile:(loggerCfg["#cfgFile"]) configMap:loggerCfg } # Will most likely show the default values at first, since the file probably doesn't exist yet. CC "AdoScript" VIEWBOX text:(STR loggerCfg) # Change some of the values in the configuration SETL loggerCfg["logWindow"] tekanan:("MyLogger Window") SETL loggerCfg["logLevel"]:(2) SETL loggerCfg["logPopupLevel"]:(1) SETL loggerCfg["#superSecret"] tekanan:("Hidden message") # Update or create the configuration file from the current state of the map. CF_SAVE_CONFIG_TO_FILE configFile:(loggerCfg["#cfgFile"]) configMap:(loggerCfg) # Let the user select and edit the file. CF_EDIT_CONFIGFILE_FROM_DB_GUI filter:(".*mylogger\\.properties$") configMap:(loggerCfg) # Show the current state of the ADOxx map and configuration file. SETL loggerCfgString tekanan:("") CF_MAP_TO_CONFIG_STRING configMap:(loggerCfg) configString:loggerCfgString CC "AdoScript" FREAD file:(loggerCfg["#cfgFile"]) SETL loggerFileString:(text) CC "AdoScript" VIEWBOX text:(### State of the map #############################\n\n" + STR loggerCfg + "\n\n" + "### Map transformed to configuration string #####\n\n" + loggerCfgString + "\n\n" + "### Actual content of the configuration file #####\n\n" + loggerFileString) # Remove the configuration file again. CC "AdoScript" FILE_DELETE file:(loggerCfg["#cfgFile"]) ``` -------------------------------- ### Configuration File Example: Object Detection (CFG) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/a284f7cd76bec8b8cfbdf61d1048ded80e2c87f6_action=show&controller=projects%2Fcommit&id=a284f7cd76b_59105a_ded80e2c87f6&namespace_id=resources%2Fadoxx-modules&project_id=adoscript-configuration-files&w=1 This is an example of a CFG-style configuration file for object detection, likely used in an OMiLAB testing environment. It specifies endpoints and microservice identifiers for various services, including Olive and bucket services, and defines default buckets. This version appears to be a simplified or alternative structure compared to the INI example. ```cfg active=Image Recognition OMiLAB@BOC Vienna - testing # --------------------- system properties Scene2Model faulmanngasse (lab.boc-group.eu) but testing OliveEndpoint=https://lab.boc-group.eu/micro-service-controller-rest/rest OliveMicroservice=90b2aee0-ef96-44ce-bc3c-21476f3ba82d #BucketAndRecognitionServiceEndpoint=https://lab.boc-group.eu/scene2model BucketAndRecognitionServiceEndpoint=http://10.0.6.40:9995 BucketEndpoint=https://bucket.boc-group.eu #BucketEndpoint=https://bucket.omilab.org DefaultBucket=s2m ``` -------------------------------- ### Configuration File Example (without Groups) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/7b811e9f9e53e6e60252002ca4badcbc5213ccb9_view=parallel&w=1 A basic example of an ADOxx configuration file without property groups, showing simple key-value pairs and comments. ```INI # Comments are lines starting with an exclamation mark (!) or a hash sign (#). # Any whitespace before or after a key, value or comment is irrelevant. key1=value1 key2=value2 # inline comment ! another comment line key3 = value 3 with spaces ``` -------------------------------- ### Initialization Script Example (property_test.asc) Source: https://code.omilab.org/resources/adoxx-modules/adoscript-configuration-files/-/commit/7b811e9f9e53e6e60252002ca4badcbc5213ccb9 An ADOscript snippet demonstrating initialization logic for setting a base path. It checks if a variable 's_base_path' is undefined and, if so, assigns a placeholder path that needs manual adaptation. ```adoscript ################################################# #region init ################################################ # set the paths and load the procedures #check if the path is already set and if not set the one which should be manually adapted IF (type(s_base_path)="undefined") { SETL s_base_path:("") } ```