Skip to content

Instantly share code, notes, and snippets.

@fcamel
Created December 14, 2011 18:10
Show Gist options
  • Save fcamel/1477758 to your computer and use it in GitHub Desktop.
Save fcamel/1477758 to your computer and use it in GitHub Desktop.
Get the list of Google Docs
#!/usr/bin/env python
# -*- encoding: utf8 -*-
import getpass
import gdata
import gdata.docs.service
user = raw_input('username: ')
passwd = getpass.getpass('password: ')
client = gdata.docs.service.DocsService()
client.ClientLogin(user, passwd)
documents_feed = client.GetDocumentListFeed()
print
print '<div><ul>'
for document_entry in documents_feed.entry:
title = document_entry .title.text
url = document_entry .GetHtmlLink().href
print '<li><a href="%s">%s</a></li>' % (url, title)
print '</ul></div>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment