Crates.io | aocleaderboard |
lib.rs | aocleaderboard |
version | 0.6.1 |
source | src |
created_at | 2020-11-10 23:32:13.347325 |
updated_at | 2022-11-25 00:22:15.284755 |
description | Merge multiple Advent of Code leaderboards |
homepage | |
repository | https://github.com/scarvalhojr/aocleaderboard/ |
max_upload_size | |
id | 311009 |
size | 1,961,785 |
Advent of Code private leaderboards are currently limited to 200 users. This web app can merge users from multiple leaderboards, recalculate their scores based on the total number of members, and present them in a single page with the same look and feel of the original Advent of Code website. It can also show an overall leaderboard with scores for all years combined.
Leaderboards are fetched in JSON format from the adventofcode.com API URL.
Leaderboard with local score:
Leaderboard with star count:
Overall leaderboard:
This app is built with Rocket web framework and, therefore, requires a nightly version of Rust.
# On Fedora, RHEL, CentOS
# sudo dnf groupinstall "Development Tools"
# On Debian, Ubuntu
# sudo apt install build-essential
# rustup update
# rustup toolchain install nightly
# git clone https://github.com/scarvalhojr/aocleaderboard.git
# cd aocleaderboard
# rustup override set nightly
# cargo build --release
settings.toml
:# cp settings_sample.toml settings.toml
settings.toml
file and provide a list of private leaderboard
IDs along with a leaderboard name and a session cookie from adventofcode.com
with access to the leaderboards.leaderboard_name = "me and my friends"
leaderboard_ids = [12345, 23456]
session_cookie = "session=<session cookie string>"
To obtain the session cookie, login to adventofcode.com and inspect the cookie stored in your browser. You must be a member of the leaderboards in order to fetch their data - check your leaderboards at https://adventofcode.com/leaderboard/private.
In settings.toml
:
leaderboard_default_order
- default leaderboard ordering, either
"local_score"
(default) or "stars"
.leaderboard_update_sec
- how often to fetch leaderboards from
adventofcode.com, in seconds.latest_event_year
- override the latest event year, which by default is
the current year or the previous year if the current date is before Dec 1st
(when first puzzle unlocks).exclude_members
- a list of member IDs to exclude from leaderboard.To change any Rocket-specific settings, e.g. path to TLS certs an keys, or
IP address and binding port, make a copy of
Rocket_sample.toml called Rocket.toml
.
Start the app:
# cargo run --release
If you are using Docker Compose:
docker-compose up
# Or, for detached
docker-compose up -d
Point your favourite browser to http://localhost:8000.
Feedback and pull requests are welcome.
Advent of Code is a free online Advent calendar of small programming puzzles created by Eric Wastl and maintained by volunteers. Please consider supporting their work.