FD900's picture
Update metadata.py
36bda37 verified
raw
history blame contribute delete
542 Bytes
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