项目作者: fuglede

项目描述 :
Advent of Code announcer.
高级语言: Python
项目地址: git://github.com/fuglede/adventofcode-announcer.git
创建时间: 2019-12-10T10:51:37Z
项目社区:https://github.com/fuglede/adventofcode-announcer

开源协议:MIT License

下载


Advent of Code announcer

This script allows you to post leaderboards and new solution submissions from a collection of private leaderboards to a collection of Slack or MS Teams channels.

Example of post

Setup

Rename config.json.example to config.json and include the following information:

  • For each leaderboard:
    • The ID of the leaderboard. This is the final part of the URL you use to view the private leaderboard in a browser.
    • The URL for a Slack webhook or an MS Teams webhook where messages should be posted.
  • Your Advent of Code session ID. In Firefox or Chromium, this can be found by clicking F12, navigating to the “Network” tab, making a request to https://adventofcode.com, and clicking “Cookies” on the request.

Usage

To post the current leaderboard, run

  1. python -m aocannounce --leaderboard

and to post all puzzle solutions that have been submitted since the last run, run

  1. python -m aocannounce --newscores

You may then wish to run the script as a cronjob. Be aware that requests are only allowed every 15 minutes, so make sure not to run your script more often than that.