diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2af66..d1efabf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### __[v2.5.1]__ - unreleased ##### Added - Plugin requirements: Added requirements.txt for all plugins requiring extra python packages so the install will be easier +- DescriptionList POC: add new description parameter for Sub-RICs without a main RIC definition. parameter 'onlysubric'. [#449](https://github.com/Schrolli91/BOSWatch/pull/449) ##### Changed ##### Deprecated ##### Removed diff --git a/config/config.template.ini b/config/config.template.ini index 358fd18..af5da01 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -103,6 +103,11 @@ filter_range_end = 9999999 # descriptions are loaded from csv/poc.csv idDescribed = 0 +# change between Main-RIC with Sub-RIC (0 - off) +# or only the Sub-RIC (1 - on) +# descriptions are loaded from csv/poc.csv +onlysubric = 0 + # Static Massages for Subrics. rica = Feuer ricb = TH diff --git a/csv/poc.template.csv b/csv/poc.template.csv index 9dfe7d4..8cba8c2 100644 --- a/csv/poc.template.csv +++ b/csv/poc.template.csv @@ -5,12 +5,18 @@ ric,description # For each RIC-Address you could set a description-text # Use the structure: ric,"Description-Text" # +# main RIC with subric: # You can even define specific subrics, therefore you # 1. need to specify a main RIC: 1234567, "Unit One" # 2. specify a certain subric: 1234567B, "Subunit Bravo" # The result for 1234567B will be "Unit One Subunit Bravo" # - Be sure having defined the main RIC (step one)! - # +# Only subric: +# Specify only the subric: 123457B, "Subunit Bravo" +# The result for 1234567B will be "Subunit Bravo" +# - main RIC is not required - +# # !!! DO NOT delete the first line !!! # 1234567,"POCSAG testdata äöüß" diff --git a/includes/descriptionList.py b/includes/descriptionList.py index 11281fd..b8d528b 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -110,8 +110,11 @@ def getDescription(typ, data): elif typ == "ZVEI": resultStr = zveiDescribtionList[data] elif typ == "POC": - resultStr = ricDescribtionList[data[:-1]] # MainRIC - resultStr += " " + ricDescribtionList[data] # SubRIC + if globalVars.config.getint("POC", "onlysubric"): + resultStr = ricDescribtionList[data] # only SubRIC + else: + resultStr = ricDescribtionList[data[:-1]] # MainRIC + resultStr += " " + ricDescribtionList[data] # SubRIC else: logging.warning("Invalid Typ: %s", typ)