32 lines
637 B
Python
32 lines
637 B
Python
#output_tags = False
|
|
#tag = "Untagged"
|
|
output_tags = True
|
|
tag = "RepeaterBook"
|
|
|
|
d = []
|
|
f = open('repeaters.csv')
|
|
for line in f.readlines():
|
|
a = line.split('\t')
|
|
d.append([a[0], a[3]])
|
|
|
|
lines = len(d)
|
|
print("# Total entries:", lines)
|
|
|
|
last = d[0]
|
|
i = 1
|
|
while i < len(d):
|
|
if last[0] == d[i][0]:
|
|
d[i][1] += last[1]
|
|
d.remove(last)
|
|
last = d[i-1]
|
|
else:
|
|
last = d[i]
|
|
i += 1
|
|
|
|
print("# Overlapping entries:", lines - len(d))
|
|
if output_tags:
|
|
print(tag, "; #c0c0c0\n")
|
|
for freq, name in d:
|
|
freq = int(float(freq) * 1000000)
|
|
print(freq, ';', name, ";\tNarrow FM ;\t10000 ;\t", tag)
|