PitchHut logo
A terminal interface for live FIFA World Cup scores and match timelines.
Pitch

world-cup-tui provides a terminal-based interface for tracking live FIFA World Cup scores and match details. With automatic updates, match stats, and seamless integration with ESPN's live data, this tool enhances the experience for soccer fans without requiring an API key. Enjoy an efficient way to follow every moment of the tournament.

Description

The world-cup-tui project is a terminal-based application that offers a live scoreboard and match timeline specifically designed for the FIFA World Cup. This tool pulls data directly from ESPN's public endpoints, allowing users to experience live scores, match statuses, detailed stats, events, and commentary without the need for an API key.

Key Features

  • Live Match Information: Displays a comprehensive list of current World Cup matches, including scores, statuses, kickoff times, and venues.
  • Detailed Match Insights: Provides an in-depth detail screen showcasing scorelines, venues, team statistics, and a play-by-play commentary of matches.
  • Auto-Refreshing Interface: Features a terminal UI that refreshes automatically, with the option for manual refresh.
  • User-Friendly Keyboard Controls: Employs intuitive keyboard commands modeled after streamlined sports TUIs, enhancing user experience.
  • Direct Links to ESPN: Allows users to open the selected match page in a web browser directly from the application.

Usage Example

To get started with the application, one can utilize the default commands. Here is an example of how to run the app after installation:

npm run dev

Control Commands

Manage your navigation with simple keyboard shortcuts:

  • j / down: Move down or scroll through the match timeline.
  • k / up: Move up or scroll through the match timeline.
  • enter: Open the selected match for more details.
  • b / esc: Return to the match list.
  • r: Refresh the current scoreboard view.
  • o: Open the selected match page in your browser on ESPN.
  • q: Quit the application.

Configuration Options

Additional configuration can be set through command-line options, such as:

npm run dev -- --refresh 10

This command specifies an auto-refresh interval of 10 seconds. Other options include setting a specific date for the scoreboard or limiting the count of events displayed.

Data Sources

The application retrieves live match data from the following ESPN endpoints:

  • Scoreboard: https://site.api.espn.com/apis/site/v2/sports/soccer/fifa.world/scoreboard
  • Match Details: https://site.web.api.espn.com/apis/site/v2/sports/soccer/fifa.world/summary

These endpoints are accessed to provide live data during the FIFA World Cup, including real-time commentary for ongoing matches. Although these do not form part of a formal API contract, the adapter used in the application remains concise and well-structured to ensure functionality.

Development and Testing

For developers looking to contribute or modify the project, standard commands for type checking, testing, and building are available, ensuring a streamlined development workflow.

0 comments

No comments yet.

Sign in to be the first to comment.