Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fuglede/adventofcode-announcer
Advent of Code announcer.
https://github.com/fuglede/adventofcode-announcer
advent-of-code slack slack-bot slack-webhook teams-bot teams-connector
Last synced: 3 days ago
JSON representation
Advent of Code announcer.
- Host: GitHub
- URL: https://github.com/fuglede/adventofcode-announcer
- Owner: fuglede
- License: mit
- Created: 2019-12-10T10:51:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-04T08:09:38.000Z (about 1 month ago)
- Last Synced: 2024-12-04T09:21:27.008Z (about 1 month ago)
- Topics: advent-of-code, slack, slack-bot, slack-webhook, teams-bot, teams-connector
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](post-example.png)
## 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](https://api.slack.com/messaging/webhooks) or an [MS Teams webhook](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-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
python -m aocannounce --leaderboard
and to post all puzzle solutions that have been submitted since the last run, run
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.