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
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 🙂
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.
Too bad the America Cup is missing
Comment ... yaourt is not used with sudo
please fix that
regards