1
0
Fork 0

added new field separators for DMRIds.dat-file

now the files can be separated with " ", ";", "," or "\t" that is tabulator
Format of file must be:
first field = id
second field = callsign
following fields with name, QTH etc will be ignored
main
Kim Huebel 4 years ago
parent 261f7607b5
commit da1211bbb2

@ -184,8 +184,17 @@ def main():
f = open(dmr_id_lookupfile, 'r') f = open(dmr_id_lookupfile, 'r')
lines = f.readlines() lines = f.readlines()
separator = "\t"
for line in lines: for line in lines:
tokens = line.split("\t") if line.find(" "):
separator = " "
if line.find(";"):
separator = ";"
if line.find(","):
separator = ","
if line.find("\t"):
separator = "\t"
tokens = line.split(separator)
dmrids[tokens[0]] = tokens[1] dmrids[tokens[0]] = tokens[1]
logging.info("Starting Websocketserver") logging.info("Starting Websocketserver")

Loading…
Cancel
Save