Files
aimsight-optimizer/sessions/WILDSTRUBEL_2026-09-24T0230_2026-10-06T1945_20261118T1119Z/tools/labels_in_range.py
T

12 lines
495 B
Python

# Prints the labels of a JSONL file touching a UTC range: id, start, end, family, description (truncated).
import json, sys
path, frm, to = sys.argv[1], sys.argv[2], sys.argv[3]
width = int(sys.argv[4]) if len(sys.argv) > 4 else 200
for line in open(path):
line = line.strip()
if not line:
continue
l = json.loads(line)
if l["start"] < to and l["end"] >= frm:
print(f'{l["id"]:>16} {l["start"][:16]} {l["end"][:16]} {l["family"]:<21} {l["description"][:width]}')