Giter Club home page Giter Club logo

linedrive's Introduction

Linedrive

A Python client for interacting with ESPN's Gamecast service. Follow gameplay events at the command line.

image

Modes of Execution

Linedrive supports two things:

  • Following real-time game play events
  • Checking league schedules for the purpose of following a specific game

To engage with this functionality, use the schedule and events command line arguments, which specify which 'mode' you would like to run the script in:

schedule: schedule mode queries ESPN's scoreboard interface to obtain the latest schedule for the provided sports league.

events: events mode accepts a league and team name, and provides real-time game play events.

Supported Leagues

In order to check schedules or to follow game play events, you need to know which leagues are supported. The following leagues are supported at the time of this writing:

  • WNBA
  • NBA
  • NCAAW
  • NCAAM
  • NHL
  • NFL

This information is also provided in the --help menu:

linedrive -h

usage: linedrive [-h] -l {wnba,nba,ncaaw,ncaam,nfl,nhl} [-t TEAM] {events,schedule}

positional arguments:
  {events,schedule}

optional arguments:
  -h, --help            show this help message and exit
  -l {wnba,nba,ncaaw,ncaam,nfl,nhl}, --league {wnba,nba,ncaaw,ncaam,nfl,nhl}
  -t TEAM, --team TEAM  Team name

Selecting a Team

I have not compiled a list of "supported teams" to choose from. I recommend that users of the script who want to follow along with game play events specify a team name without including the city name. More complete usage examples are provided below; however some examples of team names are:

  • suns
  • clippers
  • cowboys
  • jackrabbits
  • yellow jackets

Usage Examples

Schedule Mode

linedrive schedule -l ncaam


2021-03-19T16:15Z | STATUS_IN_PROGRESS | Virginia Tech Hokies at Florida Gators
2021-03-19T16:45Z | STATUS_HALFTIME    | Colgate Raiders at Arkansas Razorbacks
2021-03-19T17:15Z | STATUS_IN_PROGRESS | Drexel Dragons at Illinois Fighting Illini
2021-03-19T17:45Z | STATUS_IN_PROGRESS | Utah State Aggies at Texas Tech Red Raiders
2021-03-19T19:00Z | STATUS_SCHEDULED   | Oral Roberts Golden Eagles at Ohio State Buckeyes
2021-03-19T19:30Z | STATUS_SCHEDULED   | Hartford Hawks at Baylor Bears
2021-03-19T20:00Z | STATUS_SCHEDULED   | Georgia Tech Yellow Jackets at Loyola Chicago Ramblers

Events Mode

Continuing the example above, let's say we want to follow along with the Hokies/Gators game showing a status of STATUS_IN_PROGRESS. Below is the syntax for doing so along with example output:

linedrive events -l ncaam -t gators
    __    _____   ____________  ____  _____    ________
   / /   /  _/ | / / ____/ __ \/ __ \/  _/ |  / / ____/
  / /    / //  |/ / __/ / / / / /_/ // / | | / / __/   
 / /____/ // /|  / /___/ /_/ / _, _// /  | |/ / /___   
/_____/___/_/ |_/_____/_____/_/ |_/___/  |___/_____/   

Gators: 44  | Hokies: 46  | Period 2 9:51  | Foul on Cordell Pemsl.
Gators: 44  | Hokies: 46  | Period 2 9:51  | Colin Castleton missed Free Throw.
Gators: 44  | Hokies: 46  | Period 2 9:51  | Tyrece Radford Defensive Rebound.
Gators: 44  | Hokies: 46  | Period 2 9:34  | Foul on Anthony Duruji.
Gators: 44  | Hokies: 47  | Period 2 9:34  | Nahiem Alleyne made Free Throw.
Gators: 44  | Hokies: 48  | Period 2 9:34  | Nahiem Alleyne made Free Throw.
Gators: 46  | Hokies: 48  | Period 2 9:19  | Colin Castleton made Dunk.
Gators: 46  | Hokies: 50  | Period 2 9:01  | Tyrece Radford made Jumper.
Gators: 46  | Hokies: 50  | Period 2 8:28  | Florida  Turnover.
Gators: 46  | Hokies: 50  | Period 2 8:00  | Tyrece Radford missed Jumper.
Gators: 46  | Hokies: 50  | Period 2 8:00  | Osayi Osifo Defensive Rebound.

Installation

pip install linedrive

...or...

python setup.py install

linedrive's People

Contributors

poorbillionaire avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.