Git Product home page Git Product logo

breakfast's Introduction

Friday breakfast for CSE

This is the code to manage Friday breakfast at UW CSE. The code is deployed from /cse/web/community/breakfast.

Features

  • Sign up in a Google Sheet
  • Send reminder emails to the person who signed up
  • Calendar automatically generated (and updated) from the spreadsheet
  • Breakfast tally that shows how often one has brought breakfast

How does the magic work?

All the data is hosted in a Google Sheet at https://docs.google.com/spreadsheets/d/1ofQZCbGJSaHsGjG5v7QOjtN1ksHD_tYIrw0HC17NKP8/edit. The spreadsheet has 5 sheets.

  • SignUp: Contains the sign ups for the current quarter
  • Past (hidden): All the past data. At the end of the quarter, the person in charge has to move data from SignUp here.
  • All (hidden): Automatically generated. Union of the data for the current quarter and the past for the tally. This is done with =UNIQUE({SignUp!A1:C;Past!A1:C}).
  • Tally: Automatically generated as a SQL query that computes the top breakfast bringers. The query is =QUERY(All!A1:C,"select max(B), C, count(A) where B !='' and A < now() group by C order by count(A) desc label max(B) 'Name', count(A) 'Count'")
  • Templates (hidden): A sheet with templates for the reminder emails.

To send reminder emails and synchronize the calendar, we have a couple of Google Apps scripts.

The scripts are in a project at https://script.google.com/macros/d/M0pV2KSX5V009GYhTKLyknTqujjucHJmb/edit. A copy of the scripts are also in the scripts folder.

The functions in these scripts get run by a set of triggers.

Triggers

The send reminder script goes through the sign up sheet and sends an email either 1 or 4 days before the set date. The template for the email is defined in the spreadsheet.

The calendar synchronization adds or updates events in this calendar: https://goo.gl/BdOI7K. To keep track of the events, there is a hidden column in the sign up sheet with the event id.

breakfast's People

Contributors

domoritz avatar gussmith23 avatar jenniferrogers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.