<commit_before>[options]
subscriptions = licht/+/+, schalter/+/+
osc_port = 9001
osc_receiver =
mqtt_broker = localhost:1883
verbose = 0

; defaults for conversion rules sections below
[DEFAULT]
; plain string or regular expression matching MQTT topic or OSC address
match = ^/?(.*) ; everything after optional slash prefix is group 1

; OSC address, a plain string or a re.sub substitution string
; for the matched MQTT topic regular expression
; default value below adds slash prefix to MQTT topic,
; if there wasn't one already
address = /\1

; MQTT topic, a plain string or a re.sub substitution string
; for the matched OSC address regular expression
; default value below removes slash prefix from OSC address
topic = \1

; MQTT payload encoding type.
; One of: array, json, string, struct
type = struct
; MQTT payload encoding format.
;
; When type = struct, must be a struct.unpack() format string, e.g.:
# format = B ; one unsigned byte
# format = <ffhh ; two floats and two shorts (two-bytes), little-endian
;
; When type = array, must be an array element type char, e.g.
# format = d ; double
;
; When type = json or string, must be the string encoding (default: utf-8)
# format = ascii
format = B

; Comma-separated list of conversion functions to apply to values decoded
; from the MQTT message payload.
; Available functions (available abbreviations in parentheses):
;     int (i), float(f), bool(b), str(s)
; Any other function name or empty string will leave the value as is.
; Leaving this option empty also applies no conversion to all values.
; Example:
# from_mqtt = int, float, , int
from_mqtt =

; Comma-separated list of conversion functions to apply to arguments decoded
; from the OSC message. Same format as the from_mqtt option.
from_osc =

; List of OSC type tags as a string with no separator,
; This is only necessary if the internal Python type representation
; of the values can not be converted into OSC types automatically.
; See the conversion table in the pyliblo documentation for details
osctags =

; conversion rules sections
; section names MUST start with a colon ":"
[:light]
match = ^/?(licht/.*)
osctags = f
from_osc = int

[:schalter]
match = ^/?(schalter/.*)
osctags = T<commit_msg>Add config example with several values and topic<->address re-writing<commit_after>[options]
subscriptions = licht/+/+, schalter/+/+, +/xy/+
osc_port = 9001
osc_receiver =
mqtt_broker = localhost:1883
verbose = 0

; Defaults for conversion rules sections below
[DEFAULT]
; plain string or regular expression matching MQTT topic or OSC address
match = ^/?(.*) ; everything after optional slash prefix is group 1

; OSC address, a plain string or a re.sub substitution string
; for the matched MQTT topic regular expression
; default value below adds slash prefix to MQTT topic,
; if there wasn't one already
address = /\1

; MQTT topic, a plain string or a re.sub substitution string
; for the matched OSC address regular expression
; Default value below removes slash prefix from OSC address
topic = \1

; MQTT payload encoding type.
; One of: array, json, string, struct
type = struct
; MQTT payload encoding format.
;
; When type = struct, must be a struct.unpack() format string, e.g.:
# format = B ; one unsigned byte
# format = <ffhh ; two floats and two shorts (two-bytes), little-endian
;
; When type = array, must be an array element type char, e.g.
# format = d ; double
;
; When type = json or string, must be the string encoding (default: utf-8)
# format = ascii
format = B

; Comma-separated list of conversion functions to apply to values decoded
; from the MQTT message payload.
; Available functions (available abbreviations in parentheses):
;     int (i), float(f), bool(b), str(s)
; Any other function name or empty string will leave the value as is.
; Leaving this option empty also applies no conversion to all values.
; Example:
# from_mqtt = int, float, , int
from_mqtt =

; Comma-separated list of conversion functions to apply to arguments decoded
; from the OSC message. Same format as the from_mqtt option.
from_osc =

; List of OSC type tags as a string with no separator,
; This is only necessary if the internal Python type representation
; of the values can not be converted into OSC types automatically.
; See the conversion table in the pyliblo documentation for details
osctags =

; Conversion rules sections
; section names MUST start with a colon ":"
; Conversion rules are matched in the order defined here, so put likely
; matches first for better performance
[:light]
match = ^/?(licht/.*)
from_mqtt = float
from_osc = int

[:schalter]
match = ^/?(schalter/.*)
osctags = T

[:xypad]
match = ^/?(\d+)/xy/?(\d+)
topic = \1/xy/\2
address = /\1/xy\2
format = >ff
{'fraction_non_alphanumeric': 0.08596231208977345, 'fraction_numerical': 0.0063518949820029645, 'mean_word_length': 4.1459694989106755, 'pattern_counts': {'":': 2, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4458417', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1334, 'n_words': 656}