How to view the Results of Soccer Matches from the Console

The most beautiful sport in the world undoubtedly fascinates millions of people, lovers of free software are no exception, we want to be informed every minute of the results of the Football Matches of our favorite team or league. For all King sports and Free Software fans, I present to you soccer-cli a script developed in Python that allows us to view the results of the Soccer Matches from our terminal with any of the commands it offers. soccer-cli

soccer cli

It offers us the possibility of seeing the results of a specific team up to the results of complete leagues, its creators have taken advantage of the benefits of Python and the Free Api of football-data.org, so for the use of this excellent script we need an API Key to which we access for free if we register on the Api website.

Install Soccer-Cli

To be able to use soccer cli We must have python installed that we can do as follows:

  • archlinux and its derivatives:

$ sudo yaourt -S python-pip

  • Debian / ubuntu and its derivatives:

$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo pip install --upgrade virtualenv

Once we have Python pi properly installed and configured, in addition to having our football-data API Key, we proceed to install our script.

$ sudo pip install soccer-cli

We put our API Key in the environment variable SOCCER_CLI_API_TOKEN

export SOCCER_CLI_API_TOKEN="TU API KEY"

In this simple way we already have our python script running that will allow us to see the results of soccer matches from our console. The creators of this great script have created a series of commands so that we can use all its functions, which we share below.

Use of Soccer-Cli

Get the league standings

$ soccer --standings --league = EPL # EPL is the English Premier League code

Get the results of a specific team

$ soccer --team = MUFC # MUFC is the Manchester United code
$ soccer --team = PSG -team= 10 # You can see the results of the last 10 matches of Paris Saint-Germain

Get the next matches

$ soccer -team 5-upcoming # Look for the matches of the next 5 days
$ soccer -team 5 --upcoming --use12hour # The matches of the next 5 days with 12-hour format

The results of the matches that are being played

$soccer --live

The results of the matches of a specific League

$ soccer --league = BL # BL is the Bundesliga code
$ soccer --league = FL -team= 15 # The results of the French League matches in the last 15 days

Get the information of the players of a Team

$ soccer --team = JUVE --players

Get the results of all Leagues

$ soccer -team= 10 # The results of the Leagues in the last 10 days

Export the results in CSV or JSON format

$ soccer --league EPL --standings --csv # output in csv format
$ soccer --league EPL --standings --json # output in JSON format

Export the results to a file

$ soccer --league EPL --standings --csv -o 'standings.csv' # stores the results in csv format in the `standings.csv` file

Help Commands

$soccer --help

List of supported leagues with their respective codes

  • Europe:
    • CL: Champions League
  • England:
    • EPL: Premier League
    • EL1: League One
  • France:
    • FL: Ligue 1
    • FL2: League 2
  • Germany:
    • BL: Bundesliga
    • BL2:2.Bundesliga
    • BL3: 3. League
  • Italy
    • SA: Series A
  • Holland:
    • DED: Eredivisie
  • Portugal:
    • PPL: First League
  • .
    • ARRIVE: La Liga
    • SD: Second Division

I hope it has worked for you and you start to see the football results from your console, in a fast, easy and fun way. By the way I leave you the squad of the Team with the most Champions League in History 🙂

madridPantilla


3 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   ever said

    IT'S VERY GOOD!
    Great. Too bad all of South America is missing, from what I was seeing, football-data.org itself does not collect them.

  2.   dextre said

    Too bad the America Cup is missing

  3.   Crack said

    Comment ... yaourt is not used with sudo
    please fix that
    regards