diff --git a/README.md b/README.md index 1896041..5a287a6 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,34 @@ View the list of FIDE players and their ratings. The source of the data is the [ - The Datasette API is available at [https://fide-players.fly.dev/players](https://fide-players.fly.dev/players) - The HTML page is available at [https://kamicut.cc/fide-players/](https://kamicut.cc/fide-players/) - TODO: A Github Action to update the data daily + +## Run locally + +Clone the repository and install the dependencies: + +```bash +python3 -m venv venv +source venv/bin/activate +pip install -r requirements.txt +``` + +Run the script to download the data and create the database: + +```bash +curl -O http://ratings.fide.com/download/players_list_xml.zip +unzip players_list_xml.zip +mv players_list_xml_foa.xml players.xml +python players.py players.xml players.db +``` + +Run the API locally: + +```bash +datasette players.db -m metadata.json +``` + +Open the HTML page in a browser: + +```bash +open index.html +``` diff --git a/index.html b/index.html index 0c4b7b3..328f43b 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + FIDE Player Selector @@ -75,14 +75,14 @@ -