added var for static sub ric messages

This commit is contained in:
Jockel 2016-11-01 10:18:47 +01:00
parent 00730de405
commit 5e516c65a6
2 changed files with 13 additions and 0 deletions

View file

@ -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

View file

@ -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"]))