MUGS (MongoDB Using Google Sheets) performs CRUD operations on a MongoDB database, using information from spreadsheets in Google Sheets.
IDEA Hacks uses MUGS to interface with the parts database. Since we run a hardware hackathon, we lend out parts for teams to use.
Run npm install
to get started.
You'll also need a Google Sheets spreadsheet you have edit access to, which the Apps Script project is bound to.
clasp
is used to update the Apps Script
project.
-
Run
clasp login
to log in with your Google Account. -
cd
to thesrc
directory, then runclasp setting <Script ID>
. Use the Script ID for the spreadsheet you'd like to edit.To find the Script ID: With the spreadsheet open, select Extensions > Apps Script; in the Apps Script page that opens, the Script ID is the alphanumeric string following ".../projects/").
For example, while in the
src
directory runclasp setting 15ImUCpyi1Jsd8yF8Z6wey_7cw793CymWTLxOqwMka3P1CzE5hQun6qiC
. -
When you're done modifying the Apps Script project (in the
src
directory), push your changes usingclasp push
.
Thanks to Kevin Zhang for writing most of the original Apps Script code.