-
Notifications
You must be signed in to change notification settings - Fork 2
Inifile
Several awb configuration files use a version of the common INIFILE format.
These files are divided into sections with each section name specified as []. Section names are currently quite flexible with alphanumeric and most punctuation marks allowed.
Within each section, values are specified as =. Names are alphanumeric with dash (-) and underscore (_). Note that everything after the equals sign (=) to the end of line (excluding leading and trailing spaces) is treated as the value. It is application dependent whether quotes are required around string values.
All lines can be extended with a backslash (\) at the end. Note, however, that whitespace is removed from the beginning of all lines…
Comments are allowed by starting a line with a pound sign (#).
Inifiles are also allowed to include other inifiles with a #include directive. Note, however, that the include operation effectively embeds the included file in the parent, so that a save of the parent file will not preserve the structure of the file.
In some INIFILEs variable substitution is supported in s in the form $() with any variable defined in the special [Vars] section.
For example:
# # Comments lines start with a pound sign # [SECTION-0] # # Option values can be numbers or strings # NUMBER_OPTION=1337 STRING_OPTION=This is a string value - note absence of quotes! [SECTION-1] # # Option names can contain dash (-) and underscore (_) # OPTION_1=1 OPTION-2=2 [SECTION-2] # # Spaces after the equal sign do not matter # OPTION-3=Option-3 and Option-4 will have the same value! OPTION-4= Option-3 and Option-4 will have the same value! OPTION-4= 555 [SECTION-3] # # A value can be quoted but the quotes are passed up to the app # QUOTED_OPTION="A quoted string" # # Section names can contain lots of punctuation marks # [A section name with lots of :;,. _ +-/ ()][ punctuation marks] OPTION5=1 # # Leading spaces are ignored, so the following is legal (but not recommended) # [A section] OPTION= 5 # # Includes are allowed, but will not be preserved across saves! # #include "child_file.ini"