Add interactive nested menu for sports and commands#2
Merged
Conversation
- core/display.py: add select_from_menu() using Rich IntPrompt
- Each sport app: add _show_menu() + @app.callback(invoke_without_command=True)
- chess: numbered menu → tournaments/live/broadcasts/player (prompts username)
- cricket: numbered menu → live/scorecard/schedule; scorecard auto-runs live
first to show match IDs, then prompts for ID
- football: numbered menu → live/standings/fixtures; standings and fixtures
prompt for league code inline
- cli.py: root callback shows compact header + sport selector when TTY;
falls back to static welcome screen in non-TTY (CI, pipes, tests)
- All existing direct commands unchanged
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1
What changed
core/display.py: Addedselect_from_menu()using Rich'sIntPromptchess/app.py:_show_menu()+ callback — numbered command menu onsports chesswith no subcommandcricket/app.py:_show_menu()+ callback — scorecard auto-runslivefirst, then prompts for match IDfootball/app.py:_show_menu()+ callback — standings/fixtures prompt for league code inlinecli.py: Root callback shows compact header + sport selector in TTY; static welcome in non-TTY (tests/CI unaffected)Behaviour unchanged
All direct commands (
sports chess live,sports football standings pl, etc.) work exactly as before.Test plan