Update
This commit is contained in:
@@ -6,19 +6,30 @@ class MarkdownBuilder:
|
||||
if not report.tasks:
|
||||
return "_No tasks updated._"
|
||||
|
||||
# Table header
|
||||
header = "| Category | Task | Status | Progress | Notes |\n"
|
||||
separator = "| :--- | :--- | :--- | :--- | :--- |\n"
|
||||
rows = []
|
||||
|
||||
for task in report.tasks:
|
||||
# Format status with some icons if possible, or just plain text
|
||||
status_text = task.status
|
||||
if "done" in status_text.lower() or "complete" in status_text.lower():
|
||||
status_text = f"✅ {status_text}"
|
||||
elif "progress" in status_text.lower():
|
||||
status_text = f"🔄 {status_text}"
|
||||
# Map status to professional badges
|
||||
status_clean = task.status.lower().strip()
|
||||
|
||||
row = f"| {task.category} | {task.task_name} | {status_text} | {task.progress} | {task.notes} |"
|
||||
if any(x in status_clean for x in ["done", "complete", "finished"]):
|
||||
badge = ""
|
||||
elif any(x in status_clean for x in ["progress", "doing", "active"]):
|
||||
badge = ""
|
||||
elif any(x in status_clean for x in ["planned", "todo", "waiting"]):
|
||||
badge = ""
|
||||
elif any(x in status_clean for x in ["bug", "error", "fix"]):
|
||||
badge = ""
|
||||
else:
|
||||
badge = f"`{task.status}`" # Fallback to code text
|
||||
|
||||
# Progress bar simulation using HTML/Unicode if needed,
|
||||
# but simple text "75%" is often cleaner.
|
||||
|
||||
row = f"| **{task.category}** | {task.task_name} | {badge} | `{task.progress}` | {task.notes} |"
|
||||
rows.append(row)
|
||||
|
||||
return header + separator + "\n".join(rows)
|
||||
|
||||
Reference in New Issue
Block a user