Skip to content

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

Notifications You must be signed in to change notification settings

hugovk/lunchbot

Repository files navigation

lunchbot

GitHub Actions status Python: 3.8+ Code style: Black

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

Setup

python -m 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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages