20 lines
637 B
Python
20 lines
637 B
Python
import csv
|
|
import re
|
|
|
|
with open("./fs_events/FSE_Reports/All_FSEVENTS.tsv", "r") as f: # update path
|
|
reader = csv.DictReader(f, delimiter="\t")
|
|
rows = [
|
|
r["fullpath"] for r in reader
|
|
if r["fullpath"].startswith("keys/key_") and r["fullpath"].endswith(".txt")
|
|
]
|
|
|
|
rows.sort() # sort by name to ensure order
|
|
|
|
for i in range(len(rows) - 1):
|
|
current = int(re.search(r'key_(\d+)', rows[i]).group(1))
|
|
next_ = int(re.search(r'key_(\d+)', rows[i+1]).group(1))
|
|
if next_ != current + 1:
|
|
print(f"GAP: {rows[i]} -> {rows[i+1]} (expected key_{current+1:06d}, got key_{next_:06d})")
|
|
|
|
print("Done.")
|