Created
December 14, 2011 18:10
-
-
Save fcamel/1477758 to your computer and use it in GitHub Desktop.
Get the list of Google Docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 '<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