diff --git a/config/config.template.ini b/config/config.template.ini index aa5f763..33a7de9 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -98,6 +98,11 @@ filter_range_end = 9999999 # descriptions loaded from csv/poc.csv idDescribed = 0 +# Static Massages for Subrics. +rica = Feuer +ricb = TH +ricc = AGT +ricd = Unwetter [Filters] # RegEX Filter Configuration @@ -181,6 +186,7 @@ zvei_url = # %RIC% = Pocsag RIC # %FUNC% = Pocsac function/Subric (1-4) # %FUNCCHAR% = Pocsac function/Subric als character (a-d) +# %FUNCTEXT% = Pocsac function/Subric static massage definded in pocsag section # %MSG% = Message of the Pocsag telegram # %BITRATE% = Bitrate of the Pocsag telegram # %DESCR% = Description from csv-file @@ -237,6 +243,7 @@ zvei_message = %DATE% %TIME%: %ZVEI% # %RIC% = Pocsag RIC # %FUNC% = Pocsac function/Subric (1-4) # %FUNCCHAR% = Pocsac function/Subric als character (a-d) +# %FUNCTEXT% = Pocsac function/Subric static massage definded in pocsag section # %MSG% = Message of the Pocsag telegram # %BITRATE% = Bitrate of the Pocsag telegram # %DESCR% = Description, if description-module is used diff --git a/includes/helper/wildcardHandler.py b/includes/helper/wildcardHandler.py index d18ebe9..3f89f27 100644 --- a/includes/helper/wildcardHandler.py +++ b/includes/helper/wildcardHandler.py @@ -12,6 +12,8 @@ for direct use in plugins to save code import logging +from includes import globalVars + from includes.helper import timeHandler @@ -53,6 +55,10 @@ def replaceWildcards(text, data, lineBrakeAllowed=False): if "ric" in data: text = text.replace("%RIC%", data["ric"]) if "function" in data: text = text.replace("%FUNC%", data["function"]) if "functionChar" in data: text = text.replace("%FUNCCHAR%", data["functionChar"]) + if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica")) + if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb")) + if data["function"] == "3": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricc")) + if data["function"] == "4": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricd")) if "msg" in data: text = text.replace("%MSG%", data["msg"]) if "bitrate" in data: text = text.replace("%BITRATE%", str(data["bitrate"])) diff --git a/plugins/README.md b/plugins/README.md index 5352b47..093e510 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -158,6 +158,7 @@ defined wildcards: - `%RIC%` = Pocsag RIC - `%FUNC%` = Pocsac function/Subric (1-4) - `%FUNCCHAR%` = Pocsac function/Subric als character (a-d) +- `%FUNCTEXT%` = Pocsac function/Subric static massage definded in pocsag section - `%MSG%` = Message of the Pocsag telegram - `%BITRATE%` = Bitrate of the Pocsag telegram