added filter to decide what challenges to include
This commit is contained in:
+14
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user