hungneox / lunchbot

Check what's for lunch at local restaurants and post to Slack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lunchbot

Build Status Python: 3.6+ Code style: black

Check what's for lunch at local restaurants and post to Slack

Setup

pip install --upgrade -r requirements.txt

To post to Slack, get a token and save it in the LUNCHBOT_TOKEN environment variable.

Usage

# Just print out but don't post
python lunchbot.py --dry-run

# Post to #lunch channel
python lunchbot.py

# For testing, post to some username instead of the #lunch channel
python lunchbot.py --user username

Cron

For regular posting, you can use something like cron. For example, create /path/to/lunchbot.sh:

!/bin/bash

export PATH=/usr/local/bin:$PATH
export LUNCHBOT_TOKEN="TODO_ENTER_YOURS"

python /path/to/lunchbot.py >> /tmp/lunchbot.log 2>&1

And then run crontab -e and add this to post at 11:30am every workday (days 1-5):

30 11 * * 1-5 /path/to/lunchbot.sh

About

Check what's for lunch at local restaurants and post to Slack


Languages

Language:Python 100.0%