Metadata-Version: 2.4
Name: biathlon
Version: 1.2.0
Summary: CLI for exploring IBU biathlon results from biathlonresults.com
License-Expression: MIT
Project-URL: Homepage, https://github.com/thbtmntgn/biathlon
Project-URL: Repository, https://github.com/thbtmntgn/biathlon
Project-URL: Issues, https://github.com/thbtmntgn/biathlon/issues
Keywords: biathlon,cli,ibu,sports,results
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# Biathlon CLI

A CLI to explore data from the IBU biathlon results API at https://biathlonresults.com.

No external dependencies - pure Python standard library.

## Installation

### From PyPI

```bash
pip install biathlon
```

### From source

```bash
git clone https://github.com/thbtmntgn/biathlon.git
cd biathlon
pip install .
```

### For development

```bash
git clone https://github.com/thbtmntgn/biathlon.git
cd biathlon
pip install -e .
```

## Usage

List available seasons:

```bash
biathlon seasons
```

List World Cup events from the current season:

```bash
biathlon events
```

List World Cup events for a specific season:

```bash
biathlon events --season 2425
```

List IBU Cup events for the current season:

```bash
biathlon events --level 2
```

List events with their races for the current season World Cup:

```bash
biathlon events --races
```

List sprint races for a specific season:

```bash
biathlon events --season 2425 --races --discipline sprint
```

Show results for the most recent World Cup race:

```bash
biathlon results
```

Show results for a specific race id:

```bash
biathlon results --race BT2526SWRLCP01SWSP
```

Show ski/range/shooting time breakdowns for a race:

```bash
biathlon results ski --race BT2526SWRLCP03SMMS
biathlon results range --race BT2526SWRLCP03SMMS
biathlon results shooting --race BT2526SWRLCP03SMMS
```

Show World Cup total standings (women, current season by default):

```bash
biathlon scores
```

Show men sprint standings for season 2425:

```bash
biathlon scores --season 2425 --men --sort sprint
```

Run without installing:

```bash
python -m biathlon.cli seasons
```

## Shell Completion

Enable tab completion for bash:

```bash
eval "$(biathlon --completion bash)"
```

Or add to your `~/.bashrc`:

```bash
source <(biathlon --completion bash)
```

For zsh, add to your `~/.zshrc`:

```zsh
source <(biathlon --completion zsh)
```

## Limitations

- **Relay races are not supported.** Commands like `results`, `shooting`, and `cumulate` filter out relay events. Only individual race formats (sprint, pursuit, individual, mass start) are included in statistics and rankings.

## License

MIT
