Google Apps Script Liberation – publishing your stuff

Usually on this blog and the associated site I cover topics to do with getting data in an out of Excel. Lately though, I’ve been playing around with using Google Apps Script as a proxy and publishing data out of Google Apps Scripts.

I’ve brought many of those concepts together to create a single publisher to expose your scripts, scriptdb data and other public content in a variety of formats such as standalone web page, a js function that returns the html code for a page, as json data and as jsonp data. I’ve also included a code prettifier and json beautifier in the code.
The main purpose of this is to be able to publish your code snippets or scriptdb data as dynamic content in iFrames in other web sites, or to get the content as Json data. However, same domain restrictions on iFrames and jSon make this hard to achieve. The js and jsonp options mitigate these issues allowing you to embed source code in a variety of hosts. Here is how it fits together.
And here is an example of embedding some source code (in this case the library code to do this) in this blog using an iFrame with this code.
<iframe height="400"  src="https://storage.googleapis.com/toasty/p/gaspubcontainer.html?library=mcpher&module=gasPub" width="100%"></iframe>

For how to do this for your projects, and for step by step instructions, see the ramblings site.

About brucemcp 225 Articles
I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time. The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it. I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.