Commit b542a36c07
Verified · cmc
Layout: unified · split
README.md +58 −18
| @@ -1,15 +1,18 @@ | |||
| 1 | # NBA | 1 | # NBA |
| 2 | 2 | ||
| 3 | NBA is a simple Python package that provides you with a quick and easy | 3 |  |
| 4 | command-line interface to current NBA scores and standings. | ||
| 5 | 4 | ||
| 6 | See the [Installation](#installation) & [Usage](#usage) sections below | 5 | NBA is a Python package that provides a command-line interface to current NBA |
| 7 | for more information. | 6 | scores, standings, statistical leaders, playoff picture, and live box scores. |
| 7 | It supports both a static one-shot mode and an interactive TUI with | ||
| 8 | auto-refresh. | ||
| 8 | 9 | ||
| 9 | # Table of Contents | 10 | # Table of Contents |
| 10 | 11 | ||
| 11 | - [Installation](#installation) | 12 | - [Installation](#installation) |
| 12 | - [Usage](#usage) | 13 | - [Usage](#usage) |
| 14 | - [Interactive TUI](#interactive-tui) | ||
| 15 | - [Static output](#static-output) | ||
| 13 | - [Contributing](#contributing) | 16 | - [Contributing](#contributing) |
| 14 | 17 | ||
| 15 | # Installation | 18 | # Installation |
| @@ -24,33 +27,70 @@ pipx install nba-scores | |||
| 24 | 27 | ||
| 25 | ## Manual | 28 | ## Manual |
| 26 | 29 | ||
| 27 | To run the script locally, run the following commands: | ||
| 28 | |||
| 29 | ```shell | 30 | ```shell |
| 30 | git clone https://git.cleberg.net/nba-scores.git | 31 | git clone https://git.cleberg.net/nba-scores.git |
| 31 | cd nba-scores | 32 | cd nba-scores |
| 32 | pipx install . | 33 | uv sync |
| 33 | ``` | 34 | ``` |
| 34 | 35 | ||
| 35 |  | ||
| 36 | |||
| 37 | # Usage | 36 | # Usage |
| 38 | 37 | ||
| 39 | [Back to top](#table-of-contents) | 38 | [Back to top](#table-of-contents) |
| 40 | 39 | ||
| 41 | All commands can be passed to the program with the following template: | 40 | ## Interactive TUI |
| 42 | `nba <ARGUMENT>` | 41 | |
| 42 | Launch the full interactive terminal UI: | ||
| 43 | |||
| 44 | ```shell | ||
| 45 | nba --tui | ||
| 46 | ``` | ||
| 47 | |||
| 48 | Optional flags: | ||
| 49 | |||
| 50 | | Flag | Description | | ||
| 51 | |--------------------|--------------------------------------------------------| | ||
| 52 | | `--tui` | Launch the interactive TUI | | ||
| 53 | | `--scores` | Open TUI on the Scores tab (default) | | ||
| 54 | | `--standings` | Open TUI on the Standings tab | | ||
| 55 | | `--refresh N` | Auto-refresh interval in seconds (default: 60, min: 10)| | ||
| 56 | |||
| 57 | ### TUI tabs | ||
| 58 | |||
| 59 | | Tab | Key | Description | | ||
| 60 | |-----------------|-----|----------------------------------------------------------| | ||
| 61 | | Scores | `s` | Today's games with live scores and status | | ||
| 62 | | Standings | `t` | East / West conference standings, side by side | | ||
| 63 | | Leaders | `l` | Top 25 players by stat category | | ||
| 64 | | Playoff Picture | `p` | Conference seeding with clinch and elimination status | | ||
| 65 | | Box Score | `b` | Per-player live stats for a selected game | | ||
| 66 | |||
| 67 | ### TUI key bindings | ||
| 68 | |||
| 69 | | Key | Action | | ||
| 70 | |---------|------------------------------------------------| | ||
| 71 | | `1`–`9` | Load box score for game N from the Scores tab | | ||
| 72 | | `,` | Cycle to the previous leaders stat category | | ||
| 73 | | `.` | Cycle to the next leaders stat category | | ||
| 74 | | `r` | Refresh all data immediately | | ||
| 75 | | `q` | Quit | | ||
| 76 | |||
| 77 | ### Leaders stat categories | ||
| 78 | |||
| 79 | Cycles through: Points, Rebounds, Assists, Steals, Blocks, Efficiency, FG%, FT%, 3P% | ||
| 80 | |||
| 81 | ## Static output | ||
| 82 | |||
| 83 | Print scores or standings directly to the terminal without launching the TUI: | ||
| 43 | 84 | ||
| 44 | | Argument | Shortcut | Description | | 85 | | Argument | Shortcut | Description | |
| 45 | |---------------|----------|-----------------------------------| | 86 | |---------------|----------|-----------------------------------| |
| 46 | | `--scores` | `-sc` | Show today's scoreboard | | 87 | | `--scores` | `-sc` | Print today's scoreboard | |
| 47 | | `--standings` | `-st` | Show current conference standings | | 88 | | `--standings` | `-st` | Print current conference standings| |
| 48 | |||
| 49 | Scores: | ||
| 50 |  | ||
| 51 | 89 | ||
| 52 | Standings: | 90 | ```shell |
| 53 |  | 91 | nba --scores |
| 92 | nba --standings | ||
| 93 | ``` | ||
| 54 | 94 | ||
| 55 | # Contributing | 95 | # Contributing |
| 56 | 96 | ||
screenshots/preview.png added
Binary file not shown.