Skip to main content

reeln-cli plugin that bridges game init to OBS scoreboard text files

Project description

reeln-plugin-streamn-scoreboard

A reeln-cli plugin that bridges game initialization to the streamn-scoreboard OBS plugin.

When reeln game init runs, this plugin writes initial game state to the scoreboard's 22 text output files — setting team names, clock time, scores, shots, faceoffs, fouls, period labels, penalty durations, sport, and clearing penalties. It also clears any stale timestamps.txt from a previous session.

When reeln game finish runs, the plugin copies timestamps.txt (written by OBS during the game) to chapters.txt in the game directory and populates context.shared["game_events"] for downstream plugins (e.g. Google plugin YouTube chapter insertion).

Install

reeln plugin install streamn-scoreboard

Or for development:

git clone https://github.com/StreamnDad/reeln-plugin-streamn-scoreboard
cd reeln-plugin-streamn-scoreboard
make dev-install

Configuration

Add the scoreboard plugin settings to your reeln-cli config:

{
  "plugins": {
    "settings": {
      "streamn-scoreboard": {
        "output_directory": "/path/to/scoreboard/output"
      }
    }
  }
}

Options

Key Required Description
output_directory Yes Path to the scoreboard text file output directory

Output Files

File Content at game init
clock.txt Formatted period length (e.g., 20:00)
period.txt 1
home_name.txt Home team name
away_name.txt Away team name
home_score.txt 0
away_score.txt 0
home_shots.txt 0
away_shots.txt 0
home_faceoffs.txt 0
away_faceoffs.txt 0
home_fouls.txt 0
away_fouls.txt 0
home_fouls2.txt 0
away_fouls2.txt 0
home_penalty_numbers.txt (empty)
home_penalty_times.txt (empty)
away_penalty_numbers.txt (empty)
away_penalty_times.txt (empty)
default_penalty_duration.txt Minor penalty seconds (e.g., 120 for hockey)
default_major_penalty_duration.txt Major penalty seconds (e.g., 300 for hockey)
sport.txt Sport name (e.g., hockey)
period_labels.txt Sport-specific labels (e.g., 1\n2\n3\nOT\nOT2\nOT3\nOT4\n for hockey)

Usage

Once installed and configured, the plugin activates automatically. Run:

reeln game init Eagles Hawks --sport hockey --level bantam

The plugin writes initial scoreboard state to the configured output directory. The OBS scoreboard's 100ms write loop takes over once the game is running.

After the game, run:

reeln game finish

The plugin copies event timestamps from the scoreboard output to chapters.txt in the game directory for downstream use (YouTube chapter descriptions, ffmpeg chapter injection).

Clock Resolution

The clock value is resolved with the following priority:

  1. game_info.period_length — set via --period-length CLI flag or interactive prompt
  2. home_profile.period_length — from the team profile when --level is used
  3. Sport-based default — fallback from the table below

Supported Sports

Sport Default Clock Notes
hockey 20:00 20 min periods, count down
basketball 12:00 12 min quarters
soccer 45:00 45 min halves
football 30:00 30 min halves
lacrosse 12:00 12 min quarters
rugby 40:00 40 min halves
baseball 0:00 No clock
generic 0:00 No default duration

Development

make dev-install    # editable install with dev deps
make test           # pytest with 100% coverage
make lint           # ruff check
make format         # ruff format
make check          # lint + type check + test

License

AGPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reeln_plugin_streamn_scoreboard-0.5.4.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file reeln_plugin_streamn_scoreboard-0.5.4.tar.gz.

File metadata

File hashes

Hashes for reeln_plugin_streamn_scoreboard-0.5.4.tar.gz
Algorithm Hash digest
SHA256 8ea6c59da2998941f3c01ec564380996bb5fda76d294b19987c96ac6ede01ff6
MD5 009e07d4e6dee2519c994e22823fcf97
BLAKE2b-256 cf85887fcb5c9e4d75c3ebc9d0cc84ab7d32dd97266e6bfce2669d08d5631c6f

See more details on using hashes here.

File details

Details for the file reeln_plugin_streamn_scoreboard-0.5.4-py3-none-any.whl.

File metadata

File hashes

Hashes for reeln_plugin_streamn_scoreboard-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b4c021eb38a39f41eb62fc14c0772d0d132b073305755b93d3489b2a610b8aba
MD5 a973dcbb63a2fd96ec523e5c0a9389e1
BLAKE2b-256 beebfddf3545d7392c51b2bc6ae2b3e380f76b9eb041ec09cc6d0163708a2b04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page