Posted By

hemanthhm on 01/11/09


Tagged

google python cli


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

mustapha
icecreamboyy


Google Document list


 / Published in: Python
 

Here's a short program to print a list of all of the documents in your Google Documents account

  1. import gdata.docs.service
  2.  
  3. # Create a client class which will make HTTP requests with Google Docs server.
  4. client = gdata.docs.service.DocsService()
  5. # Authenticate using your Google Docs email address and password.
  6. client.ClientLogin('[email protected]', 'password')
  7.  
  8. # Query the server for an Atom feed containing a list of your documents.
  9. documents_feed = client.GetDocumentListFeed()
  10. # Loop through the feed and extract each document entry.
  11. for document_entry in documents_feed.entry:
  12. # Display the title of the document on the command line.
  13. print document_entry.title.text

Report this snippet  

You need to login to post a comment.