def _tasklines_from_tasks(tasks: list[dict[str, str]]) -> list[str]:
    """Parse a list of tasks into tasklines suitable for writing."""

    tasklines = []

    for task in tasks:
        meta = [m for m in task.items() if m[0] != "text"]
        meta_str = ", ".join("%s:%s" % m for m in meta)
        tasklines.append("%s | %s\n" % (task["text"], meta_str))

    return tasklines