yoshimaru46 / capture-bot

Capture & send images to Slack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Capture Bot

Capture images from Slack

@capture-bot capture 

Raspberry Pi

  1. install Raspbian.

  2. sudo apt-get update

  3. sudo apt-get upgrade

  4. sudo apt-get install git

  5. Enable camera from raspi-config.

  6. Install Docker.

    curl -sSL https://get.docker.com | sh

  7. Give the pi user the ability to run Docker.

    sudo usermod -aG docker pi

  8. Logout and login again.

  9. Clone this repo.

  10. Create env file. env.txt

    API_TOKEN=hoge
    GOOGLE_API_KEY=hoge
    ERRORS_TO=hoge
    IMAGE_SENT_TO=hoge
    
  11. Start the Docker service. systemctl start docker.service

  12. docker build ./ -t capture-bot

  13. docker run --privileged --env-file ./env.txt capture-bot

Tips

Start on reboot

capture-bot.sh

cd capture-bot
docker build ./ -t capture-bot && docker run --privileged --env-file ./env.txt --restart=always capture-bot

crontab -e

@reboot /home/pi/capture-bot.sh

About

Capture & send images to Slack


Languages

Language:Python 95.6%Language:Dockerfile 4.4%