Sunday, September 23, 2018

New comment by chrsstrm in "3D engine entirely made of MS Excel formulae"

I wrote this [0] little quick and dirty snippet to enable a Google Sheet as a JSON data source via GET requests. Unfortunately Google App Scripts only accept GET and POST requests [1] so it wouldn't be semantically RESTful, but adding update and delete features in the script are trivial if you send an action param along with your POST.

Using that data source snippet I wrote a 'static' CMS that pulls the JSON data from sheets in the workbook and then compiles and deploys a Jekyll site. I've been enthusiastically replacing WordPress sites with this wherever possible when clients only need data to change and don't require actual page editing (this system is perfect for restaurants - think menu changes). The "deploy" event is a little convoluted since I wanted to control what happens and when it happens, but it is all kicked off by submitting a Google Form which is attached to the Sheet.

The script as-is returns one object per row but converting it to key/value responses is also pretty easy. If Office365 has an equivalent to Google App Scripts that can publish a script as a web app, I'd love to hear about it.

[0] https://gist.github.com/chrsstrm/3fb0ce6820acecf62c5490d220d...

[1] https://developers.google.com/apps-script/guides/web



from Hacker News - New Comments: "WordPress" https://ift.tt/2Dmt6GT
via IFTTT

No comments:

Post a Comment

Ask HN: How locked down are your work machines?

I've been working as a Software Engineer for 20+ years. Places I worked in the early years barely had an IT department at all. As a dev...