(_args: argparse.Namespace)
| 272 | |
| 273 | |
| 274 | def cmd_status(_args: argparse.Namespace) -> int: |
| 275 | state = read_state() |
| 276 | total = 0 |
| 277 | done = 0 |
| 278 | in_progress = 0 |
| 279 | for chapter in state["chapters"]: |
| 280 | chapter["status"] = recompute_chapter_status(chapter) |
| 281 | for section in chapter["sections"]: |
| 282 | total += 1 |
| 283 | if section["status"] == "done": |
| 284 | done += 1 |
| 285 | elif section["status"] == "in_progress": |
| 286 | in_progress += 1 |
| 287 | |
| 288 | pending = total - done - in_progress |
| 289 | print(f"Total sections: {total} | done: {done} | in_progress: {in_progress} | pending: {pending}") |
| 290 | for chapter in state["chapters"]: |
| 291 | chapter_done = sum(1 for s in chapter["sections"] if s["status"] == "done") |
| 292 | print(f"- {chapter['chapter']} [{chapter['status']}] {chapter_done}/{len(chapter['sections'])} :: {chapter['theme']}") |
| 293 | return 0 |
| 294 | |
| 295 | |
| 296 | def cmd_next(args: argparse.Namespace) -> int: |
nothing calls this directly
no test coverage detected