Skip to content

A simple notifier for changes in private Advent of Code leaderboards

License

Notifications You must be signed in to change notification settings

egonny/advent-of-code-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code Notifier

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.

Setup

pip install -r requirements.txt

Example webhook

Screenshot 2021-12-01 160204

Running

The CLI accepts input as environment variables:

  • AOC_SESSION: The session 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