A script that sends a message on Slack and/or Discord whenever a leaderboard on Advent of Code changes.
- On the first run, the script reads the current leaderboard and writes it to a new file called
old_leaderboard.json
in the current directory. - On subsequent runs, the script reads the previous leaderboard from this file and compares it with the current leaderboard. It then sends a message summarizing the leaderboard changes to the configured Slack app and/or Discord server, and updates the file's contents.
pip install -r requirements.txt
The CLI accepts input as environment variables:
AOC_SESSION
: Thesession
cookie for authenticating with the AoC API.AOC_BOARD
: The ID of the private leaderboard to monitor.AOC_SLACK_HOOK
: The Webhook URL for your Slack app. (Optional)AOC_DISCORD_HOOK
: The Webhook URL for your Discord server. (Optional)
Example usage:
AOC_SESSION=my_cookie AOC_BOARD=123456 AOC_SLACK_HOOK=my_slack_url python -m aoc-notifier