LiTour is a simple python script that gets you information about the tournaments on lichess.org. You can also add any upcoming tournament in google calendar all this without leaving your beloved terminal.
Run Litour.py
with the follwoing options:
Usage:
litour.py [-f | -s | -n ]
Options:
-h, --help Show help screen.
-f, --finished Show finished tournaments
-s, --started Show started tournaments
-n, --new Show new/created tournaments
For adding the tournament to your Google calendar all you have to do is provide the id of the tournament. Id of the tournament can be obtained from the list of new tournaments.
- If you choose new tournaments then you'll have another option of adding a tournament as an event.
- If you choose to add an event to your calendar, it will look like:
-
You will need python 3
-
Run
pip install -r requirements.txt
-
Now you need access to google api. For that follow the steps:
- Visit Google's Python Quickstart page and follow the steps.
- You can skip Step 2 i.e
Install the Google Client Library
because you already installed requirements - On Step 3 i.e
Set up the sample
you'll have to make a small change in example. ChangeSCOPES = 'https://www.googleapis.com/auth/calendar.readonly'
toSCOPES = 'https://www.googleapis.com/auth/calendar'
- In step 3 we are requesting reading and writing credential for ourself instead of getting just
read-only
credentials. - After completing all the steps you'll have a credentials.json file
Note
If credentials.json file is not present in the current working directory then check for
.credentials
folder in yourhome
directoryBy now you should have a client_secret.json and a credentials.json file. If you have them then you are good to go.