pis-entry #1
@ -16,16 +16,16 @@ def load(): # Programatically add a `toc` field to each entry.
|
|||||||
## reverse the stops and store that.
|
## reverse the stops and store that.
|
||||||
|
|
||||||
def parse(codeList):
|
def parse(codeList):
|
||||||
print(f"pis.parse: codeList starting length: {len(codeList)}")
|
StartLen = len(codeList)
|
||||||
|
print(f"pis.parse: codeList starting length: {StartLen}")
|
||||||
for i in codeList:
|
for i in codeList:
|
||||||
stops = i['stops']
|
stops = i['stops']
|
||||||
code = i['code']
|
code = i['code']
|
||||||
for ii in codeList:
|
for ii in codeList:
|
||||||
if stops == ii['stops'] and code != ii['code']:
|
if stops == ii['stops'] and code != ii['code']:
|
||||||
print("Identical stopping pattern found")
|
print(f"Identical stopping pattern found: {ii['code']}")
|
||||||
print(ii)
|
|
||||||
codeList.remove(ii)
|
codeList.remove(ii)
|
||||||
print(f"pis.parse: codeList finishing length: {len(codeList)}")
|
print(f"pis.parse: Removed {StartLen - len(codeList)} duplicates")
|
||||||
return codeList
|
return codeList
|
||||||
|
|
||||||
def devLoad(): # Programatically add a `toc` field to each entry.
|
def devLoad(): # Programatically add a `toc` field to each entry.
|
||||||
|
Reference in New Issue
Block a user