Skip to content
A service for reminding people to take out the garbage bins
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Classes
.env.exemple
.gitignore
README.md
composer.json
composer.lock
config.php
contact-data-handler.php
contact-info.json
data-fetcher.php
index.php
reminder.php
responsability-handler.php
responsible.json

README.md

SopBot

A simple service for reminding people when it's their turn to take out the garbage cans. Mashup of Google Spreadsheet and 46Elks and some additional cron magic.

Installation

Server glue

  1. Clone this repo
  2. Run composer install
  3. Rename the .env.exemple to .env and add your 46 Elks credentials.
  4. Configure the message and name of bot in the config.php

Google Spreadheets

  1. Copy this spreadsheet and add the info
  2. Publish each sheet (there are two; Contact info and Schema) as csvs and add the url in the .env file; SPREADSHEET_CONTACTS and SPREADSHEET_SCHEDULE

Cron magic

There are 3 ways to call SopBot and are done by setting an action query param

  1. /?action=update_contacts will update contacts and should perhaps be update daily
  2. /?action=update_schedule will update the schedule and should also be update daily in case any one changes stuff
  3. /?action=send_reminder Will send a reminder to the household that is responsible for the current week. Only run the day the sms should go off.

Set a cronjob for each. (Most of the time, webhosts got a guide for this. Otherwise you can enjoy some of this reading.)

You can’t perform that action at this time.