Integrate Google Docs into web site for content creation

三世轮回 提交于 2019-12-02 20:40:13

Yes, this is possible.

You can fetch Google Docs file content, and upload new content with the Google Documents List API.

You will currently have to perform the sync manually yourself if you edit it outside Google Docs, in which case you would reupload the file content.

New Approach to doing this w/o Google APIs. (www.cloudward.com) - A snippet, using a language called EASE can do this prograitacally (using docs and sheets more like a database then docs).

A statement to publish your google doc in EASE (you would embed this statement in your web page) would look like:

 <# include processed google doc "My Book"; #>

Every time your user updates the doc, it is published automatically. Snippets can be cached, so it is also faster then using the Google Publish option (and the docs look better then when Google Published)

What is good about this approach is there is programatic control you could put around this. For example, you could build a list of published books in a Google sheet: (Columns: Book Title, Author, Google Doc Name, Published (yes, no)

<body>
<!-- Open and start a query from a named Google Sheet -->
<# start list for googlesheet "Published Books"; 
    include when published is "yes";
#>

<!-- header of our list -->
<# start header #>
    <table>
        <th>Book</th>
        <th>Author</th>
        <th></th>
    </tr>
<# end header #>

<!-- For each row in the sheet list a line in our table with contents of 
     the sheet and link to a new page to duplay the actual book - passing 
     the book name as a param -->
<# start row #>
    <tr>
        <td><# Book Title #></td>
        <td><# Author #></td>
        <td><a href='<# snippet "Read Book" #>&bookname=<# Google Doc Name #>'>Open Book</a></td>
    </td>
<# end row #>

<!-- Close out our list -->
<# start footer #>
   </table>
<# end footer #>

<# end list #>              
</body> 

This would call a second page to actually display the book:

<body>
   <!-- bookname is a URL param passed and use as a variable -->
   <# include processed google doc "<#[url.bookname]#>"; #>
</body>

Yes This can be done by including APIs & SDK of Google.. If you are using languages like c# (ASP .net) / Java (JSP /HTML) you need to import/include the reference after installing .dll of Google in your Project.

Note: For using any Google's Product (Email,Map,Calender,...) you need Key Code which can be obtained by logging with some google email and generate API key. you will get encrypted code acts as key to your application / Project to run.

using Google.GData.Client;
using Google.GData.Documents;

namespace MyDocumentsListIntegration
{
  class Program {
    static void Main(string[] args)
    {

      // Application code here

    }
  }
}

Please Refer Following Linkes:

API Reference: Click Here

Detailed Reference: Click Here

Yes, this is possible.

You can fetch Google Docs file content, and upload new content with the Google.GData.Client and Google.GData.Documents nuget packages

you can find full information with example with this link here

Jon Wise

If you are intending to write in Python, I found gspread useful.

We use Google Docs as the CMS for our website with an application called Feed.Us. Our site is in Php, but Feed.us works with other scripting languages.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!