-
Notifications
You must be signed in to change notification settings - Fork 6
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
Comments
Current limitation is that I only needed it for text and tar files and so I
didn't bother to implement other doc types. I do know that if you try to
get a google_doc or google_sheet, etc it will fail. Hence the note.
Please fork it to your repo and PR a change would work. A test would be
awesome as well.
Thanks.
*Jemish Patel*
…On Tue, May 2, 2017 at 12:30 PM, Timani Tunduwani ***@***.***> wrote:
First off thanks for the resource. I noticed google_drive_concourse_
resource_common.py#L176
<https://github.com/jpatel-pivotal/google-drive-concourse-resource/blob/master/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
<https://developers.google.com/drive/v3/reference/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
<https://developers.google.com/drive/v3/web/manage-downloads>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEeluBBZwRQgRyBU4y8t_VTNWb5Y_n6Nks5r14RegaJpZM4NOlMF>
.
|
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. |
@timani did you ever build this out? |
Also interested if support for anything more than |
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
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 thedocType
is type of Google Drive file.The
docType
would need to be added as a parameter toget_file
and use.txt
as a default:The various
mimeTypes
thatexport_media
supports for each document type (Docs, Sheets, Drawings, Presentations, etc.) are on the API doc page.The text was updated successfully, but these errors were encountered: