"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."