# 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]}')