Export to GitHub

googlecl - issue #133

google docs edit doesn't honor --folder when creating files


Posted on Jun 21, 2010 by Massive Ox

What steps will reproduce the problem? 1. google docs edit --folder "test" --format "txt" --editor "notepad" --title "my file"

What is the expected output? What do you see instead? I expect GoogleCL to look for a document called "my file" in a folder called "test" in Google Docs, not find it, then open notepad. When I save the temp file and close notepad, I expect GoogleCL to create a file called "my file" in a folder called "test" in Google Docs.

Instead, GoogleCL creates the file but doesn't put it in the proper folder. So next time I run the same command, it again claims it can't find the file and it creates a new copy of the file instead of editing the old one. If I remove the --folder argument, then it creates and edits the file. I just can't get it to create a new file in a folder.

What version of the product are you using? On what operating system?

GoogleCL v0.9.7 Windows XP Professional SP3

Please provide any additional information below.

Comment #1

Posted on Jun 23, 2010 by Helpful Bird

--folder doesn't appear to work for "docs upload" either.

Comment #2

Posted on Jun 25, 2010 by Happy Panda

agreed, I have same issue with docs upload not recognizing folder

Comment #3

Posted on Jun 26, 2010 by Grumpy Kangaroo

Works just fine in trunk version of googlecl.

Comment #4

Posted on Jul 2, 2010 by Massive Ox

Just tested with 0.9.8: it works for pre-existing folders. For folders that don't exist, I get this warning:

C:\dev\Google\googlecl\library.zip\googlecl\docs\service.py:532: UserWarning: No folder found that matches scratch

Where "scratch" is the name of the folder I wanted to create a document in.

I think it would be preferable to automatically create folders, or to fail completely if the folder doesn't exist.

Comment #5

Posted on Jul 9, 2010 by Helpful Cat

This issue was closed by revision r333.

Comment #6

Posted on Jul 9, 2010 by Helpful Cat

Comment deleted

Comment #7

Posted on Jul 9, 2010 by Helpful Cat

The functionality that itruett describes is made possible via the attached patch (applied to 0.9.8). If the folder does not exist, it is created. You can also create entire paths:

google docs edit --editor vim -n newfile --folder new_folder/new_subfolder

will create file newfile and place it in newly created folder new_subfolder.

Attachments

Status: Fixed

Labels:
Type-Defect Priority-Medium