Update documentation

This commit is contained in:
Kiana Sheibani 2023-09-23 03:37:22 -04:00
parent dd4f0838ab
commit 5d0fbcd107
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
4 changed files with 55 additions and 5 deletions

3
DETAILS.md Normal file
View file

@ -0,0 +1,3 @@
# DETAILS
TODO

35
INSTALL.md Normal file
View file

@ -0,0 +1,35 @@
# Installation
## Step 1: Authentication Token
In order to access start.gg's API, you must first have an authentication token
linked to your account. Instructions for generating one can be found in the
[developer API docs](https://developer.start.gg/docs/authentication).
Once you have an auth token, it must be provided to StartGGElo. In order, the
program checks for a token in:
- A command-line flag `--auth`.
- An environment variable `AUTH_TOKEN`,
- A file `auth.txt` within the config directory (see the [[README]] for a list
of directories in each OS).
## Step 2: Dependencies
StartGGElo is written in Rust, so install the [Rust
compiler](https://www.rust-lang.org/tools/install).
In addition, StartGGElo needs these run-time dependencies:
- [OpenSSL](https://www.openssl.org/)
- [SQLite](https://www.sqlite.org/)
## Step 3: Compiling
Once you have all the necessary dependencies, build and install StartGGElo by
running the following command:
``` sh
cargo install --git https://github.com/kiana-S/StartGGElo
```

View file

@ -6,23 +6,35 @@ generate and maintain [Elo ratings](https://wikipedia.org/wiki/Elo_rating_system
Once Elo ratings are generated, StartGGElo can be used to generate ranking lists, predict the
probability of a player winning a match, generate seedings for future tournaments, and more.
> **Note**<br>
> **Warning**<br>
> StartGGElo is still under development; currently, it only supports generating player ratings.
## Installation
TODO
*For more information, see the [installation page](INSTALL.md).*
Build and install StartGGElo using `cargo`:
``` sh
cargo install --git https://github.com/kiana-S/StartGGElo
```
Alternatively, if you use Nix:
``` sh
nix profile install github:kiana-S/StartGGElo
```
## Configuration
StartGGElo stores its rating database in its config directory, which is located at:
StartGGElo stores its rating databases in its config directory, which is located at:
- Windows: `%APPDATA%\Roaming\ggelo`
- MacOS: `~/Library/Application Support/ggelo`
- Linux: `~/.config/ggelo`
This directory also contains StartGGElo's config file, which defines how it calculates its ratings.
There are few reasons to access this directory directory, but you can if you want to transfer your
There are few reasons to access this directory directly, but you can if you want to transfer your
data between computers.
## Elo system basics

View file

@ -17,7 +17,7 @@ pub fn get_auth_key(config_dir: &Path) -> Option<String> {
use std::env::{var, VarError};
use std::fs::read_to_string;
match var("AUTH_KEY") {
match var("AUTH_TOKEN") {
Ok(key) => Some(key),
Err(VarError::NotUnicode(_)) => panic!("Invalid authorization key"),
Err(VarError::NotPresent) => {