added filter to decide what challenges to include

This commit is contained in:
2026-11-05 15:42:52 +01:00
parent 4fac6ed86d
commit 09849d0ef6
11 changed files with 214 additions and 28 deletions
+14 -1
View File
@@ -3,7 +3,7 @@ from __future__ import annotations
from collections import Counter
from .challenge import BLOCKED_ICON, STATUS_ICON, STATUS_ORDER
from .challenge import BLOCKED_ICON, SELECTIONS, STATUS_ICON, STATUS_ORDER
from .overview import Overview, icons
BOLD, DIM, RED, YEL, GRN, CYA, RST = (
@@ -52,6 +52,17 @@ def print_terminal(ov: Overview, c: bool) -> None:
print(f" {cat:<10}" + "".join(f"{x or '·'}{' ' * (13 - (2 * len(x) if x else 1))}"
for x in cells))
if ov.excluded:
print(f"\n{col(BOLD)}=== not in this CTF ({len(ov.excluded)}) ==={col(RST)}")
for ch in ov.excluded:
print(f" {ch.title[:34]:<35}{col(DIM)}{SELECTIONS[ch.selection]}{col(RST)}")
if ov.undecided:
print(f"\n{col(BOLD)}{col(YEL)}=== not in challenges.yml: not tracked or deployed "
f"({len(ov.undecided)}) ==={col(RST)}")
for ch in ov.undecided:
print(f" {ch.title[:34]:<35}{col(DIM)}{ch.repo.path}{col(RST)}")
print(f"\n{col(BOLD)}=== needs attention ==={col(RST)}")
for ch in sorted(ov.challenges, key=lambda c: c.repo.path.lower()):
if ch.problems:
@@ -60,4 +71,6 @@ def print_terminal(ov: Overview, c: bool) -> None:
for ch in ov.blank:
why = "no README" if ch.repo.readme is None else "README is still the blank template"
print(f" {col(RED)}{ch.repo.path:<32}{col(RST)} {col(DIM)}{why}{col(RST)}")
for path in ov.unknown:
print(f" {col(RED)}{path:<32}{col(RST)} {col(DIM)}in challenges.yml, but no such repo{col(RST)}")
print()