jodeci / slunch

SLUNCH is a slackbot that will remind you that it's lunch time, and randomly pick out recommendations based on your own list. Handy for teams that tend to loose track of time when busy coding, and have no idea where to eat when they do get hungry.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

SLUNCH is a slackbot that will remind you that it's lunch time, and randomly pick out recommendations based on your own list. Handy for teams that tend to loose track of time when busy coding, and have no idea where to eat when they do get hungry.

System Requirements

  • Ruby 2+
  • Rails 4+

Installation

Starts like any another Rails app:

$ git clone git@github.com:jodeci/slunch.git  
$ bundle install  
$ cp config/application.yml.example config/application.yml  
$ rake db:create
$ rake db:migrate

Preparing Lunch List

Import list by YAML file

you need to build your lunch list. I haven't bothered to build the UI (yet), so in the meantime just edit:

lib/tasks/lunch.yml

and import away:

$ rake import_data:lunch

and you're done!

Web UI

Start up server

$ rails server

Go to localhost:3000/lunches to maintain your own list.

Preparing Slackbot

Slack Settings

You will of course need a slackbot and API token. I'll leave that to the Slack documentations. Once you're done with that, fill in the information in:

config/slack_setting.yml

Don't know your channel id? We've got you covered:

$ rake slackbot:channels

Customizing Schedule

The default timer is set to 12:30 from Monday to Friday. Tune it to your likings at:

config/schedule.rb

Don't like the default message? Make your own!

lib/tasks/slackbot.rake

...and start it up!

Gotta keep the timer kicking!

$ whenever -i

Docker Usage

We also provide Docker Image. Pull the Image first.

$ docker pull lch82327/slunch

You can send message by

$ docker run \
  -e SLACK_TOKEN='...' \
  -e CHANNEL_TOKEN='...' \
  -t lch82327/slunch /bin/bash -l -c 'cd /slunch && RAILS_ENV=development bundle exec rake slackbot:lunch --silent >> /dev/null 2>&1' --rm

About

SLUNCH is a slackbot that will remind you that it's lunch time, and randomly pick out recommendations based on your own list. Handy for teams that tend to loose track of time when busy coding, and have no idea where to eat when they do get hungry.


Languages

Language:Ruby 78.2%Language:HTML 18.5%Language:JavaScript 3.1%Language:CSS 0.2%