Code Monkey home page Code Monkey logo

afterwork-alert's Introduction

afterwork-alert

This is Untappd-Slack integration for alerting Slack-users of afterwork going on somewhere. Untappd polling periodically and if more than one friend is drinking within small enough period of time, notifies to Slack that afterwork is being held.

  • Config includes loopingTime as well as bot name and channels of multiple cities, based on venue locations
  • more to come...

Start application in prod or dev mode

Production mode will use production configs and dev will use development configs.

  • npm run prod

  • npm run dev

  • Run docker-image

    docker build -t afterwork-alert .
    docker run afterwork-alert

Backlog

Ideas, Backlog, In Progress and stuff are located at Repositorys project tab https://github.com/Jevli/afterwork-alert/projects/1

Challenges and solutions

How to parse Untappd activity feed to recognize afterwork groups

  • Sort checkins by time
  • Filter too old checkins, checkins without venue and checkins which are already used in some previous group
  • Group checkins by venue. After this, main level list elements are lists which each include one venues checkins. Run a reduce function for each venues list:
    • Loop through oldest checkin to the newest:
    • If aw-group is empty, add checkin to the aw-group
    • If aw-group is not empty and checkin is close enough (30min) to the first one in aw-group or close enough (10min) to the last in aw-group -> add checkin to the aw-group
    • If aw-group size is one and checkin not close enough, clear aw-group and add checkin to the aw-group (as first in aw-group)
    • Take next oldest checkin from venues checkin list and test it
  • At this stage, the main list includes lists of aw-groups. Each group is in different venue.
  • Last, remove groups which don't have minimum amount of checkins

afterwork-alert's People

Contributors

ozqu avatar jevli avatar bzar avatar penny-five avatar

Watchers

 avatar James Cloos 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.