football-wc2018

football-cli – World Cup football on the command line

Football is around us constantly. Even when domestic leagues have finished, there’s always a football score I want to know. Currently, it’s the biggest football tournament in the world, the Fifa World Cup 2018, hosted in Russia. Every World Cup there are some great football nations that don’t manage to qualify for the tournament. This time around the Italians and the Dutch missed out. But even in non-participating countries, it’s a rite of passage to keep track of the latest scores. I also like to keep abreast of the latest scores from the major leagues around the world without having to search different websites.

Command-Line InterfaceIf you’re a big fan of the command-line, what better way to keep track of the latest World Cup scores and standings with a small command-line utility. Let’s take a look at one of the hottest trending football utilities available. It’s goes by the name football-cli.

football-cli is not a groundbreaking app. Over the years, there’s been a raft of command line tools that let you keep you up-to-date with the latest football scores and league standings. For example, I am a heavy user of soccer-cli, a Python based tool, and App-Football, written in Perl. But I’m always looking on the look out for trending apps. And football-cli stands out from the crowd in a few ways.

football-cli is developed in JavaScript and written by Manraj Singh. It’s open source software, published under the MIT license. Installation is trivial with npm (the package manager for JavaScript), so let’s get straight into the action.

The utility offers commands that give scores of past and live fixtures, see upcoming and past fixtures of a league and team. It also displays standings of a particular league. There’s a command that lists the various supported competitions. Let’s start with the last command.

At a shell prompt.

luke@ganges:~$ football lists

football-lists

The World Cup is listed at the bottom. I missed yesterday’s games, so to catch up on the scores, I type at a shell prompt:

luke@ganges:~$ football scores

football-wc-22

Now I want to see the current World Cup group standings. That’s easy.

luke@ganges:~$ football standings -l WC

Here’s an excerpt of the output:

football-wc-table

The eagle-eyed among you may notice a bug here. Belgium is showing as the leader of Group G. But this is not correct. Belgium and England are (at the time of writing) both tied on points, goal difference, and goals scored. In this situation, the team with the better disciplinary record is ranked higher. England and Belgium have received 2 and 3 yellow cards respectively, so England top the group.

Suppose I want to find out Liverpool’s results in the Premiership going back 90 days from today.

luke@ganges:~$ football fixtures -l PL -d 90 -t “Liverpool”

football-Liverpool

I’m finding the utility really handy, displaying the scores and standings in a clear, uncluttered, and attractive way. When the European domestic games start up again, it’ll get heavy usage. (Actually, the 2018-19 Champions League is already underway)!

These few examples give a taster of the functionality available with football-cli. Read more about the utility from the developer’s GitHub page. Football + command-line = football-cli

Like similar tools, the software retrieves its football data from football-data.org. This service provide football data for all major European leagues in a machine-readable way. This includes fixtures, teams, players, results and more. All this information is provided via an easy-to-use RESTful API in JSON representation.

football-cli is written in JavaScript. Learn JavaScript with our recommended free books and free tutorials.

Ongoing series
Linux for StartersNew to Linux? Read our Linux for Starters series.
Free and Open Source SoftwareThe largest compilation of the best free and open source software in the universe. Supplied with our legendary ratings charts.
Linux ReviewsHundreds of in-depth reviews offering our unbiased and expert opinion on software.
Alternatives to GoogleAlternatives to Google's Products and Services examines your options to migrate from the Google ecosystem with open source Linux alternatives.
Linux System ToolsEssential Linux system tools looks at small, indispensable utilities, useful for system administrators as well as regular users.
Linux ProductivityLinux utilities to maximise your productivity. Small, indispensable tools, useful for anyone running a Linux machine.
Home Computer EmulatorsHome computers became commonplace in the 1980s. Emulate home computers such as the ZX81, Amstrad CPC, and ZX Spectrum.
Now and ThenNow and Then examines how promising open source software fared over the years.
Linux at HomeLinux at Home looks at a range of home activities where Linux can play its part, making the most of our time at home, keeping active and engaged.
Linux CandyLinux Candy opens up to the lighter side of Linux. Have some fun!
Best Free Android AppsBest Free Android Apps. There's a strict eligibility criteria for inclusion in this series
Programming BooksThese best free books accelerate your learning of every programming language
Programming TutorialsThese free tutorials offer the perfect tonic to the free programming books series
Stars and StripesStars and Stripes is an occasional series looking at the impact of Linux in the USA
Share this article

2 comments

  1. How do I install this on Debian or CentOS?

    # apt-get install football-cli
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package football-cli

    # yum install football-cli
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * base: mirror.rackspace.com
    * epel: fedora-epel.mirror.lstn.net
    * extras: mirrordenver.fdcservers.net
    * updates: mirrors.tummy.com
    No package football-cli available.
    Error: Nothing to do

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.