Giter Club home page Giter Club logo

slappd's Introduction

Slappd - An Slack integration for Untappd

About

Since Untappd does not currently support callbacks or webhooks, I wrote a basic Slack integration that will relay check-ins and badges earned for specified users on your feed to a Slack channel.

Screenshot

This script is designed to be run from crontab, and issues one API call per run.

Known Issues

  • The first time you run the script, it may be a little chatty because it has not previously seen your feed before.
  • If you have a lot of Untappd friends, but are only watching a subset of them, you may miss check-ins if you don't run Slappd regularly.

Requirements

  • Docker, or the ability to create a Virtual Environment
  • = Python 3.7 and a couple of common Python modules: (configparser, Jinja2, requests)

  • A way of periodically running this script (at, cron, etc)
  • Untappd API access
  • A Slack channel full of beer lovers

Configuration

The first time you run Slappd, it will attempt to create a config file (~/.config/slappd/slappd.cfg). You should edit it to reflect your Untappd API information and friends list.

Running Slappd

GitHub Container Registry

Slappd is available on the GitHub Container Registry, so you don't have to build it if you don't want to. You can simply add this to your crontab, and after you've edited the config, you're off.

*/5 * * * * docker run --name slappd --rm -v ${HOME}/.config/slappd:/home/slappd/.config/slappd ghcr.io/kchristensen/slappd > /dev/null 2>&1

Note: The config file is not stored in the container, because it contains stateful information in between runs that would not persist otherwise.

Building a Docker Image

  • Run make docker-build to build a Slappd Docker image.
  • Build & run it from crontab: */5 * * * cd /path/to/slappd/source && make docker-run > /dev/null 2>&1

Installing to a Virtualenv

  • Install Slappd to a virtualenv via make install.
  • Run it from crontab: */5 * * * ~/.virtualenv/slappd/bin/slappd > /dev/null 2>&1

slappd's People

Contributors

decibyte avatar dependabot[bot] avatar kchristensen avatar neilstudd avatar

Stargazers

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