开发者

editing google doc programmatically

开发者 https://www.devze.com 2023-02-20 13:06 出处:网络
I need simple search-replace in doc file exported from google doc.开发者_JAVA技巧 and than upload it to google doc.

I need simple search-replace in doc file exported from google doc.开发者_JAVA技巧 and than upload it to google doc.

How do I do it in python ?

google doc also support pdf export. If editing pdf is easier , I will try that instead of doc.

I am using google app engine envrionment with python.

I am able to download and upload file easily. Just can't figure out how to edit the file programmatically.


You can use the Google Data APIs Python Client Library.

For example, you can write to a spreadsheet (for example) easily. "Matt Cuts" has a ticket on his blog about that : http://www.mattcutts.com/blog/write-google-spreadsheet-from-python


I think the Google Data API's will only allow you to export and upload documents. To manipulate the document itself, it will probably be easiest to export to OpenDocument format (.odt), and use a Python library for that. Search the Python Package Index for "opendocument" and you will find some. ezodf and lpod seem not too difficult at first sight.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号