Metadata-Version: 2.4
Name: biathlon
Version: 1.5.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"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: license-file

# Biathlon CLI

A CLI to explore data from the IBU biathlon results API at [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 .
```

## Releases

CI runs on every push and pull request to `main`.
Publishing to PyPI and creating a GitHub release only happen when a version tag is pushed.

Create a release:

```bash
git tag v1.5.0
git push origin v1.5.0
```

Version numbers are derived dynamically from Git tags via `setuptools-scm`.

PyPI publishing uses GitHub Actions trusted publishing (`id-token: write`), so the
project must be configured as a trusted publisher on PyPI.

## 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 detailed split times for a race:

```bash
biathlon results --race BT2526SWRLCP03SMMS --detail
```

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

```bash
biathlon standings
```

Show men sprint standings for season 2425:

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

Show athlete information:

```bash
biathlon athlete info --search "boe johannes"
biathlon athlete id --search "boe"
biathlon athlete results --id BTFRA12305199301
```

Show medal standings:

```bash
biathlon ceremony
biathlon ceremony --athlete
```

Cumulate season statistics:

```bash
biathlon cumulate results
biathlon cumulate remontada --men
biathlon cumulate cleansheet
biathlon cumulate cleansheet --sort percentage
```

Shooting accuracy:

```bash
biathlon shooting
biathlon shooting --men
```

Athlete form (course time or shooting across recent races):

```bash
biathlon form
biathlon form --men --shoot
biathlon form --startlist
biathlon form --season --top 10
```

Season, event and race briefs (venue history, startlist analysis, post-race recap):

```bash
biathlon brief season
biathlon brief event
biathlon brief startlist
biathlon brief postrace
```

Run without installing:

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

## License

MIT

[biathlonresults.com]: https://biathlonresults.com
