No description
Find a file
2026-06-26 15:20:52 +02:00
src Update 2026-06-26 15:20:52 +02:00
.gitignore Initial commit 2026-06-15 15:37:10 +02:00
install.sh Update 2026-06-26 15:20:52 +02:00
package.json Initial commit 2026-06-15 15:37:10 +02:00
README.md Update 2026-06-26 15:20:52 +02:00
tsconfig.json Initial commit 2026-06-15 15:37:10 +02:00
update.sh Update 2026-06-26 15:20:52 +02:00

scores-board-generator

Simple Typescript script to generate a leaderboard, with scores to beat

How to use

Cloning

  1. git clone https://git.greensky.tf/Greensky/scores-board-generator && cd scores-board-generator

Quick setup

Run ./install.sh and follow instructions

The external ip and user refer to the other machine informations

Setup

First, you need to setup a few files.

  1. Config folder. You need a ./config folder. Assuming you use linux : mkdir config
  2. Background. In order to use the config, you need to symlink a file to ./config/background.img. For instance : ln -sf ~/Downloads/Lite-Background.png ./config/background.img
  3. Categories name. Create a ./config/categories.json file containing every category. For instance, you can have :
[
    "Easy",
    "Hard",
    "Expert"
]
  1. You can eventually modify the ./src/parameters/params.ts file, if you want to tweak some values.

That is all for the setup, now see the scores part

Scores

To modify the scores, modify the ./config/scores.csv file. It must start like this :

nickname,category,score

Then, every row will contain : the nickname of the player, the category in wich he competed, being the index of one of the categories defined in setup, and his score. It does not need to be sorted, it will be sorted by the script

For instance, you can have something like this :

nickname,category,score
Alpha,0,180
Lorem,1,821
Beta,0,182
Gamma,0,145
Ipsum,1,432,
Greensky,2,2341
Pi,2,3141592

Then you can run the script

Run

For the first run, use yarn launch, afterwards you can run yarn start

The image will be outputed in ./out.png

Remote update

Use the ./update.sh script