将Google文档作为HTML获取 [英] Get Google Document as HTML
问题描述
我有一个疯狂的想法,我可以为使用Google云端硬盘文档进行备份的不熟练的用户朋友构建网站博客。我能够创建一个编译文档列表的contentService。但是,我看不到将文档转换为HTML的方法。我知道Google可以在网页中呈现文档,因此我想知道是否可以获取供我的内容服务使用的渲染版本。
这可能吗?
GAS获取文档的HTML版本,这是相当古老的增强请求,但最初描述的解决方法由Henrique Abreu工作得很好,我一直都在使用它......
唯一烦人的在授权过程中需要从脚本编辑器中调用它,这使得它在共享应用程序中使用时感到不安(使用脚本不能用户),但这只发生一次;)。
另外还有一个图书馆 a>由罗马Vialard ,使事情变得更简单,并增加了一些其他有趣的功能。
I had a wild idea that I could build a website blog for an unsophisticated user friend using Google Drive Documents to back it. I was able to create a contentService that compiles a list of documents. However, I can't see a way to convert the document to HTML. I know that Google can render documents in a web page, so I wondered if it was possible to get a rendered version for use in my content service.
Is this possible?
There is no direct method in GAS to get an HTML version of a doc and this is quite an old enhancement request but the workaround described originally by Henrique Abreu works pretty well, I use it all the time...
The only annoying thing in the authorization process that needs to be called from the script editor which makes it uneasy to use in a shared application (with "script unable" users) but this only happens once ;).
There is also a Library created by Romain Vialard that makes things (a bit) easier... and adds a few other interesting functions.
这篇关于将Google文档作为HTML获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!