Spaces:
Sleeping
Sleeping
File size: 542 Bytes
2b2842b 36bda37 2b2842b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import json
def load_metadata(filepath="metadata.jsonl"):
"""
Load all tasks from a JSONL file and return them as a list of dictionaries.
Args:
filepath (str): Path to the metadata file (default: "metadata.jsonl")
Returns:
List[dict]: List of task dictionaries
"""
tasks = []
with open(filepath, "r", encoding="utf-8") as f:
for line in f:
task = json.loads(line.strip())
tasks.append(task)
print(f"Loaded {len(tasks)} tasks from {filepath}")
return tasks |