Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjednac/slack-lunch-bot
A Slack bot for fetching lunch menu announcements from selected Facebook pages.
https://github.com/sjednac/slack-lunch-bot
akka bot facebook scala slack
Last synced: 26 days ago
JSON representation
A Slack bot for fetching lunch menu announcements from selected Facebook pages.
- Host: GitHub
- URL: https://github.com/sjednac/slack-lunch-bot
- Owner: sjednac
- License: other
- Created: 2015-07-15T21:31:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-16T21:07:54.000Z (almost 9 years ago)
- Last Synced: 2024-04-16T18:58:25.779Z (7 months ago)
- Topics: akka, bot, facebook, scala, slack
- Language: Scala
- Size: 27.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slack Lunch Bot [![Build Status](https://travis-ci.org/sbilinski/slack-lunch-bot.svg?branch=master)](https://travis-ci.org/sbilinski/slack-lunch-bot) [![Codacy Badge](https://www.codacy.com/project/badge/f31422f8b52241fa877cb4fa90ee8507)](https://www.codacy.com/app/sbilinski/slack-lunch-bot)
A [Slack](http://slack.com) bot for fetching lunch menu announcements from selected **Facebook** pages.
## Installation
Use the [Universal](http://www.scala-sbt.org/sbt-native-packager/formats/universal.html#tasks) plugin to build a deployable artifact (check the link for other archive formats):
sbt universal:package-bin
Copy it to a destination of your choice or `unzip` it directly as such:
unzip -d /opt/ target/universal/slack-lunch-bot-0.1-SNAPSHOT.zip
Run the bot by executing the provided script:
/opt/slack-lunch-bot-0.1-SNAPSHOT/bin/slack-lunch-bot
## Configuration
You can use the provided configuration file as a template:
cp conf/application.conf.example conf/application.conf
### Slack integration
Setup a bot user account as described [here](https://api.slack.com/bot-users). Make sure, that the bot is a member of the target channel (e.g. `#lunch` or whatever you prefer).
Set the **api token** and the **channel name** in the `slack` section of the config.
### Facebook integration
Setup a Facebook application [here](https://developers.facebook.com). It will be used for querying the Facebook pages of your choice.
Set the **app id** and the **app secret** in the `facebook` section of the config. Put relevant page IDs in the same section (for `https://www.facebook.com/SomeRestaurant` the ID is simply `SomeRestaurant`).
### Querying policy
Check the `akka.quartz` section for a relevant cron expression. Once triggered, the bot will check each page for the latest Facebook post, that was made on that day (hopefully, it should be a menu), and publish it to Slack.