Files
aimsight-optimizer/sessions/SNCF01_2026-10-14T0645_2026-10-22T1030_20261118T1350Z/tools/labels_in_range.py
T

9 lines
355 B
Python

# Print the labels of a JSONL file touching [FROM, TO): id, start, end, family, description. Args: file FROM TO
import json, sys
f, a, b = sys.argv[1:4]
for line in open(f):
if not line.strip(): continue
l = json.loads(line)
if l["start"] < b and l["end"] >= a:
print(l["id"], l["start"], l["end"], l["family"], "|", l["description"])