A simple shell script that displays the latest football scores, fixtures and standings.
- Minimalistic output: aiming to adhere to the Unix philosophy, footy's output can easily be piped to other tools
- Portable: minimal dependencies
Since footy uses the data provided by football-data.org, an api-key is required. You can register for one here for free.
Once footy is installed, set the api-key by running footy -k <api-key>
or manually create the file $HOME/.config/footy/api-key.txt
containing only the api-key.
git clone https://github.com/fritzrehde/footy.git
cd footy
sudo make install
Note: The makefile defaults to some default paths for installed files. Adjust to your system:
INSTALL_DIR
: PATH for executables (default /usr/local/bin)
make install INSTALL_DIR=/usr/bin
OPTIONS:
-s Prints standings/table
Must be used with -c <COMPETITION>
-m <DAYS+/-> Prints upcoming ('+' suffix) or previous ('-' suffix) matches
Must be used with either -c <COMPETITION> or -t <TEAM>
-c <COMPETITION> Specifies competition (use code or id)
-t <TEAM> Specifies team (must use team's id)
-I Prints all supported competitions
-i <COMPETITION> Prints all teams in competition (use code or id)
-r Unformatted output for piping to other tools
-k <API-KEY> Saves the api-key to $HOME/.config/footy/api-key.txt
-h Prints this help message
footy -I
gives you an overview of all the supported competitions (I recommend piping the output into a pager).
footy -i BL1
or footy -i 2002
prints all teams in the Bundesliga using either the Code BL1
or the Id 2002
.
Some competitions do not have a Code and teams never have a Code, so you will have to use the Id there.
Note: Access to some of the smaller competitions/teams is paid (pricing). Therefore, the Price column shows which competitions are free.
The -r
option provides unformatted output, where the columns are seperated by commas instead of whitespaces and the match dates are in the ISO-8601 UTC format.
footy -s -c BL1 -r | cut -d ',' -f 1-6,10 | column -ts ','
This command will only display the first six and the tenth column of the standings output.
jq
: JSON processor
The MIT License © Fritz Rehde