Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Google Docs, Sheets, Presentations etc #1

Open
timani opened this issue May 2, 2017 · 5 comments
Open

Support for Google Docs, Sheets, Presentations etc #1

timani opened this issue May 2, 2017 · 5 comments

Comments

@timani
Copy link

timani commented May 2, 2017

First off thanks for the resource. I noticed google_drive_concourse_resource_common.py#L176 there is a note that only binaries are supported.

What are the current limitations/challenges and are there any potential solutions discussed?

Could a PR do the trick that uses files.export and export_media when the docType is type of Google Drive file.

The docType would need to be added as a parameter to get_file and use .txt as a default:

    # Google Docs
    if(docType == 'doc')
        # Open Office doc Mimetype
        request = drive_service.files().export_media(
           fileId=fileID,
           mimeType='application/vnd.oasis.opendocument.text'
        )

    # Google Sheets
    if(docType == 'spreadsheet')
        # MS Excel Mimetype
        request = drive_service.files().export_media(
            fileId=fileID, 
            mimeType='application/vnd.ms-excel'
        )

The various mimeTypes that export_media supports for each document type (Docs, Sheets, Drawings, Presentations, etc.) are on the API doc page.

@jpatel-pivotal
Copy link
Collaborator

jpatel-pivotal commented May 3, 2017 via email

@timani
Copy link
Author

timani commented May 6, 2017

Cheers @jpatel-pivotal, the note makes sense to me. I'll fork and see if I can work on a PR in the next couple of weeks.

@emcniece
Copy link

@timani did you ever build this out?

@karlbaker02
Copy link

Also interested if support for anything more than txt and tar went further?

@timani
Copy link
Author

timani commented May 24, 2020

Hey there, unfortunately I never got time to do build this out but it would be a handy resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants