New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grille

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grille

Simple CMS using Google Spreadsheets

  • 0.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-41.38%
Maintainers
1
Weekly downloads
 
Created
Source

Grille: Google Spreadsheet CMS

Why Grille? Well, they look like a grid... So does a Spreadsheet... eh.

Purpose

Retrieve application data from Google Spreadsheets and store in memory. It's sort of like a Content Management System, but if you're storing HTML or WYSIWYG content you're doing it wrong. Instead, use this for storing data which needs to be easily configured, e.g. part catalogs or application tuning data.

This does not allow for persisting data in Google Spreadsheets.

Usage

var Grille = require('grille');

var grille = new Grille('1r2SaVhOH6exvevx_syqxCJFDARg-L4N1-uNL9SZAk04');

grille.load(function(err) {
    console.log(grille.get('keyvalue', 'author'));

	// run application
});

// Whenever you want to update Grille to use the lastest data
console.log('old version', grille.version);
grille.update(function(err) {
    console.log(grille.get('keyvalue', 'author'));
    console.log('new version', grille.version);
});

Spreadsheet Configuration

Follow along with the Demo Spreadsheet

At a minimum your spreadsheet needs a meta tab.

The spreadhseet above will generate the following data:

{
    "keyvalue": {
        "author": "Thomas Hunter II",
        "hours_in_day": 24,
        "seconds_in_minute": 60,
        "title": "Simple CMS Demo"
    },
    "levels.0": [
        [ "A", "B", "C", "D" ],
        [ "E", "F", "G", "H" ],
        [ "I", "J", "K", "L" ],
        [ "M", "N", "O", "P" ],
        [ "Q", "R", "S", "T" ],
        [ "U", "V", "W", "X" ]
    ],
    "levels.1": [
        [ "A", "B", "C", "D" ],
        [ "E", "F", "G", "H" ],
        [ "I", "J", "K", "L" ],
        [ "M", "N", "O", "P" ],
        [ "Q", "R", "S", "T" ],
        [ "U", "V", "W", "X" ]
    ],
    "levels.secret": [
        [ "A", "B", "C", "D" ],
        [ "E", "F", "G", "H" ],
        [ "I", "J", "K", "L" ],
        [ "M", "N", "O", "P" ],
        [ "Q", "R", "S", "T" ],
        [ "U", "V", "W", "X" ]
    ],
    "people": {
        "1": {
            "gender": "m",
            "id": 1,
            "likesgum": true,
            "name": "Thomas Hunter II"
        },
        "2": {
            "gender": "m",
            "id": 2,
            "likesgum": false,
            "name": "Rupert Styx"
        },
        "3": {
            "gender": "f",
            "id": 3,
            "likesgum": true,
            "name": "Morticia Addams"
        },
        "4": {
            "gender": "m",
            "id": 4,
            "likesgum": false,
            "name": "Lurch"
        }
    }
}

Class Breakdown

  • Worksheet: Represents a single tab in a Google Spreadsheet
  • Spreadsheet: Represents a Google Spreadsheet
  • Grille: Persists and loads data related to a Spreadsheet

Keywords

FAQs

Package last updated on 10 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc