Skip to content

Commit

Permalink
Update readme for new console commands and new leagues
Browse files Browse the repository at this point in the history
  • Loading branch information
conormag94 committed Sep 27, 2017
1 parent a8b35d5 commit c41e5be
Showing 1 changed file with 41 additions and 12 deletions.
53 changes: 41 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,86 @@ Pyscores: Football scores and data in your terminal

This is a work in progress. It was inspired by another trending repo I saw on github. I wanted to see if I could do my own implementation of it, as a learning exercise.

**Tested in Python 2.7, 3.4 and 3.5**
**Tested in Python 2.7 and >=3.3**

## Setup
**To use this you will need an api key from api.football-data.org. Without this the program will still work but will be limited to 50 requests per day.**

Once you have your key, you must set an environment variable called `PYSCORES_KEY` so the program can use it.

**To install dependencies:**
```pip install -r requirements.txt```
**To install (with pip):**
```
pip install pyscores
```

**To Verify installation:**
```
scores --help
```

## Usage
Depending on the installed version of python, it may be necessary to substitute `python` for `python3`.

**Recent results**
```
python pyscores.py --results --league=PL
scores --results --league=PL
```
```
python pyscores.py -r -l PL
scores -r -l PL
```
where ` PL ` is the league code for the Premier League

![alt text](https://github.com/conormag94/pyscores/raw/master/assets/results.png "Results Output")

**Fixtures for next matchday**
```
python pyscores.py --fixtures --league=PL
scores --fixtures --league=PL
```
```
python pyscores.py -f -l PL
scores -f -l PL
```
![alt text](https://github.com/conormag94/pyscores/raw/master/assets/fixtures.png "Fixtures Output")

**Specifying number of days for Fixtures or Results**
```
python pyscores.py --fixtures --league=PL --days=20
scores --results --league=PL --days=20
```
```
python pyscores.py -f -l PL -d 20
scores -r -l PL -d 20
```
The days argument is optional and will default to 7 if not specified.

**League standings**
```
python pyscores.py --standings --league=PL
scores --standings --league=PL
```
```
python pyscores.py -s -l PL
scores -s -l PL
```
![alt text](https://github.com/conormag94/pyscores/raw/master/assets/standings.png "Standings Output")

## League codes

| League Code | League Name |
| ----------- | ----------- |
| BSA | Campeonato Brasileiro da Série A |
| PL | Premier League |
| ELC | Championship |
| EL1 | League One |
| EL2 | League Two |
| DED | Eredivisie |
| FL1 | Ligue 1 |
| FL2 | Ligue 2 |
| BL1 | 1. Bundesliga |
| BL2 | 2. Bundesliga |
| PD | Primera Division (La Liga) |
| SA | Serie A |
| SB | Serie B |
| PPL | Primeira Liga |
| DFB | DFB-Pokal |
| CL | Champions League |
| AAL | Australian A-League |



## Dependencies
* click
Expand Down

0 comments on commit c41e5be

Please sign in to comment.