(args: argparse.Namespace)
| 294 | |
| 295 | |
| 296 | def cmd_next(args: argparse.Namespace) -> int: |
| 297 | state = read_state() |
| 298 | for chapter, section in iter_sections(state): |
| 299 | if section["status"] == "pending": |
| 300 | section["status"] = "in_progress" |
| 301 | chapter["status"] = recompute_chapter_status(chapter) |
| 302 | write_state(state) |
| 303 | |
| 304 | prompt_path = PROMPTS_DIR / f"{section['id']}.md" |
| 305 | print(f"Next section: {section['id']}") |
| 306 | print(f"Chapter: {chapter['chapter']} | Module: {section['module']} | Slug: {section['slug']}") |
| 307 | print(f"Prompt file: {prompt_path}") |
| 308 | if args.print_prompt: |
| 309 | print("\n" + prompt_path.read_text(encoding="utf-8")) |
| 310 | return 0 |
| 311 | print("No pending sections. All sections are done.") |
| 312 | return 0 |
| 313 | |
| 314 | |
| 315 | def cmd_done(args: argparse.Namespace) -> int: |
nothing calls this directly
no test coverage detected