Giter Site home page Giter Site logo

bscan / adventofcodeslackslash Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 131 KB

Slack Slash command for Advent of Code leaderboard and competitions, including custom start times for people who don't want to compete at midnight EST.

License: MIT License

Python 100.00%

adventofcodeslackslash's Introduction

Advent of Code Leaderboard Slash Command

This repository contains the code for a script that will run a Slash Command for a Private Advent of Code Leaderboard on Slack. This repo was originally forked from https://github.com/tomswartz07/AdventOfCodeLeaderboard and then expanded to be a slash command

Example

Custom Start Times

For me, midnight EST is not a good time to attempt the challenges, so I've added /advent start as a way for users to mark their start time which results in a custom leaderboard. This of course requires participants not to cheat and peak at solutions.

Example

Commands

  • leaderboard: display the overall leaderboard ranked by stars
  • today: display today's ranking ranked by how long each partipant took. Either from midnight EST, or when they used /advent start
  • start: mark your custom start time
  • details: dump the json used for informational purposes

Setup

Prerequisites:

  • Python 3
  • AWS Lambda
  • AWS S3

Process:

  1. Create a new Slack Slash Command and connect to AWS Lambda I followed this tutorial https://codeburst.io/building-a-slack-slash-bot-with-aws-lambda-python-d0d4a400de37
  2. Log in to Advent of Code and obtain two things: the Private Leaderboard ID Number and a Session Cookie. See Session Cookie section for details.
  3. Dump that info into a secrets.py file.
  1. Configure AWS S3 storage to keep track of custom start times. You could also use a database or any other storage solution you prefer.
  2. Add AWS configuration parameters to secrets.py
  3. Deploy and try /advent start

adventofcodeslackslash's People

Contributors

amayer5125 avatar bscan avatar dependabot[bot] avatar tomswartz07 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.