1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# NBA

NBA is a Python package that provides a command-line interface to current NBA
scores, standings, statistical leaders, playoff picture, and live box scores.
It supports both a static one-shot mode and an interactive TUI with
auto-refresh.
# Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Interactive TUI](#interactive-tui)
- [Static output](#static-output)
- [Contributing](#contributing)
# Installation
[Back to top](#table-of-contents)
```shell
git clone https://git.cleberg.net/nba-scores.git
cd nba-scores
pipx install .
```
# Usage
[Back to top](#table-of-contents)
## Interactive TUI
Launch the full interactive terminal UI:
```shell
nba --tui
```
Optional flags:
| Flag | Description |
|--------------------|--------------------------------------------------------|
| `--tui` | Launch the interactive TUI |
| `--scores` | Open TUI on the Scores tab (default) |
| `--standings` | Open TUI on the Standings tab |
| `--refresh N` | Auto-refresh interval in seconds (default: 60, min: 10)|
### TUI tabs
| Tab | Key | Description |
|-----------------|-----|----------------------------------------------------------|
| Scores | `s` | Today's games with live scores and status |
| Standings | `t` | East / West conference standings, side by side |
| Leaders | `l` | Top 25 players by stat category |
| Playoff Picture | `p` | Conference seeding with clinch and elimination status |
| Box Score | `b` | Per-player live stats for a selected game |
### TUI key bindings
| Key | Action |
|---------|------------------------------------------------|
| `1`–`9` | Load box score for game N from the Scores tab |
| `,` | Cycle to the previous leaders stat category |
| `.` | Cycle to the next leaders stat category |
| `r` | Refresh all data immediately |
| `q` | Quit |
### Leaders stat categories
Cycles through: Points, Rebounds, Assists, Steals, Blocks, Efficiency, FG%, FT%, 3P%
## Static output
Print scores or standings directly to the terminal without launching the TUI:
| Argument | Shortcut | Description |
|---------------|----------|-----------------------------------|
| `--scores` | `-sc` | Print today's scoreboard |
| `--standings` | `-st` | Print current conference standings|
```shell
nba --scores
nba --standings
```
# Contributing
[Back to top](#table-of-contents)
Any and all contributions are welcome. Feel free to fork the project,
add features, and submit a pull request.
|