-
- import gdata.docs.data
- import gdata.docs.client
- import gdata.docs.service
- import gdata.spreadsheet.service
- import getpass
-
- user = raw_input('Please enter your username: ')
- pw = getpass.getpass()
- source = ' '
- gd_client = gdata.docs.service.DocsService()
- gd_client.ClientLogin(user, pw, source=source)
-
- #I need to get the exported html file here
- file_path = raw_input('enter path to file: ')
-
- title = raw_input('please enter name of the report: ')
- content_type = gdata.docs.service.SUPPORTED_FILETYPES['HTML']
- ms = gdata.MediaSource(file_path=file_path, content_type=content_type)
-
- entry = gd_client.Upload(ms, title)
-