drive icon indicating copy to clipboard operation
drive copied to clipboard

It downloads only zip, pdf and images

Open pmontrasio opened this issue 10 years ago • 7 comments

Create a Google Docs document in My Drive. Call it test. Type in it test.

$ drive pull test
Resolving...
+ /test
Proceed with the changes? [Y/n]: Y
1 / 1    [================================================================================] 100.00 % 
$ ll test
ls: cannot access test: No such file or directory

The same happens to Google Sheets and Google Slides files. However drive pull recursively lists and downloads any zip, pdf, png, jpg file I have in my drive.

$ go version
go version go1.3.3 linux/amd64

pmontrasio avatar Oct 23 '14 14:10 pmontrasio

same issue here, some of the files will be listed to be pull, but not actually pulled at all

ldkingvivi avatar Nov 02 '14 20:11 ldkingvivi

On my colleague's computer on OS X, I see they have some pseudo-files for google docs, ie test.gsheet, that opens up the file in the browser. It would be great to have that too with this tool.

emmanuelgeoffray avatar Nov 04 '14 09:11 emmanuelgeoffray

I have checked this again, looks like the issue is more serious, it doesn't work well with the DOC/Spreadsheet natively created from Google Doc, and when I sync those files, it not only didn't download them, but also deleted them inside the Google Drive, I have to restore them one by one from the Google Drive GUI

ldkingvivi avatar Nov 04 '14 17:11 ldkingvivi

Thank you for raising this. I have created a PR to resolve this and look forward to your feedback when it is merged.

odeke-em avatar Nov 13 '14 18:11 odeke-em

Hey folks so here the deal is, Sheets and other Docs file types do not populate the DownloadUrl field, however, they should populate the ExportLinks field instead. You can't download the raw media of the Docs types, but could export them as PDF, csv, etc. depending on the type of the file.

odeke-em avatar Nov 14 '14 00:11 odeke-em

Exporting to the format best supported by Google would work for me (Docs to .docx, Sheets to .xlsx, etc.). Being able to override default export format in configuration would be nice too.

obilodeau avatar Dec 31 '14 19:12 obilodeau

@obilodeau implemented here: https://github.com/odeke-em/drive

odeke-em avatar Dec 31 '14 20:12 odeke-em