From b3b8cef9de722dd501f4c69cf1e920b4377e00e2 Mon Sep 17 00:00:00 2001 From: Nicolas Thumann Date: Sat, 14 Dec 2024 16:46:24 +0100 Subject: [PATCH] Change: Update README --- README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f0d2ec3..d0ceb4d 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ A backend and frontend application to gather and visualize the current wait time ### Setup -1. Run `poetry install` to install the dependencies -2. Download https://github.com/n-thumann/xbox-cloud-statistics/releases/download/results/results.tar.gz and extract it to get latest results locally (optionally) +1. `cd xbox_cloud_statistics/` +2. `poetry install` to install the dependencies 3. Create an App registration at Microsoft Azure - See https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app - Use `Personal Microsoft accounts only` as `Supported account types` @@ -20,15 +20,17 @@ A backend and frontend application to gather and visualize the current wait time - The output will contain a `refresh_token` - If you authenticated with a Free-to-Play account, this this the `F2P_TOKEN` - If you authenticated with a Game Pass Ultimate account, this this the `GPU_TOKEN` +5. Setup InfluxDB (create organization, bucket and API token) ### Usage 1. Export environment variables `CLIENT_ID` and `CLIENT_SECRET` to authenticate as the App registration 2. Export environment variables `F2P_TOKEN` and `GPU_TOKEN` to authenticate as the user -3. Run `poetry run xbox-cloud-statistics`, printing a table with the results and writing them to `./results` +3. Export environment variables `INFLUXDB_URL`, `INFLUXDB_ORG`, `INFLUXDB_BUCKET` and `INFLUXDB_TOKEN` to connect to InfluxDB +4. Run `poetry run xbox-cloud-statistics`, printing a table with the results and writing them to InfluxDB ``` -➜ backend git:(main) poetry run xbox-cloud-statistics +➜ xbox_cloud_statistics git:(main) poetry run xbox-cloud-statistics | Game | Region | Subscription | Server time | Wait time (s) | |----------------------------------------------|--------------------|------------------|---------------------------|-----------------| | FORTNITE | AustraliaEast | Subscription.F2P | 2023-10-22 10:05:46+00:00 | 704 | @@ -59,16 +61,17 @@ After adding new games to the configuration, please run `poetry run toml-sort -i ### Setup -1. Run `poetry install` to install the dependencies -2. Download https://github.com/n-thumann/xbox-cloud-statistics/releases/download/results/results.tar.gz and extract it to get latest results locally -3. Run `python3 -m http.server -d dist/` to start a local HTTP server +1. `cd site_generator/` +2. Run `poetry install` to install the dependencies +3. Run `python3 -m http.server -d dist/` to start a local HTTP server (useful for development) -### Build +### Usage -Run `poetry run site-generator` to build the static page. +1. Export environment variables `INFLUXDB_URL`, `INFLUXDB_ORG`, `INFLUXDB_BUCKET` and `INFLUXDB_TOKEN` to connect to InfluxDB +2. Run `poetry run site-generator` to build the static page to `dist/` https://github.com/n-thumann/xbox-cloud-statistics/assets/46975855/05949add-87a4-4710-b908-41b47aa48b0a ## Measurement data -The measurement data is available as JSON in `results.tar.gz` of [this](https://github.com/n-thumann/xbox-cloud-statistics/releases/tag/results) release. +The measurement data is available in a private InfluxDB instance. Feel free to message me to request access.