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

export: allow unloading to a single directory instead of each sub-directory per export #660

Closed
AtcR opened this issue Jun 1, 2016 · 5 comments · Fixed by #696
Closed
Assignees
Milestone

Comments

@AtcR
Copy link

AtcR commented Jun 1, 2016

I'm trying to pull and export some docs files to pdf (app 900) without make a lot of directories.

drive pull -force -export pdf -exports-dir /home/xxxxxx/gdrive/PDF/ -id xxxxxxx

But each export make his own folder into PDF.
How can i insert each exported file into only one directorie/folder?

I know my English is not perfect and I will really appreciate if you could give me a hand on this problem.

@odeke-em
Copy link
Owner

odeke-em commented Jun 6, 2016

Hello there @AtcR, thanks for the issue and welcome to drive.

Yes in deed, currently it creates a directory per file but that's because you can export to multiple formats(e.g pdf, txt, rtf, png etc) and also to avoid cluttering one directory. A feature request could be to allow dumping exports into a common directory.

@chevillet
Copy link

chevillet commented Jun 6, 2016

I'd love to have the ability to export files in their original directories even if it clutters them.
Also, it would be great to be able to skip the ".desktop" files when they were exported.

Of course, it shouldn't be the default behaviour and I can live without it but I'd love these options.

@odeke-em odeke-em changed the title Too many directories export: allow unloading to a single directory instead of each sub-directory per export Jul 23, 2016
@odeke-em odeke-em added this to the v0.3.8 milestone Jul 23, 2016
@odeke-em odeke-em self-assigned this Jul 23, 2016
odeke-em added a commit that referenced this issue Jul 23, 2016
Fixes #660.

Allow exporting to same directory and level, instead of:
a) Always dumping exports per exportable file in a sub-directory
called `<filename>_exports`.
This CL allows for users to request that their exports be put in the
same directory with pull flag `--same-exports-dir`.
If `--same-exports-dir` is set, it will place all exports in the same
directory and level.

* Exhibit A:
```shell
 drive pull --explicitly-export --exports-dir ~/Desktop/exp --export
pdf,txt,odt --same-exports-dir
Resolving...
+ /test-exports/few.docs
+ /test-exports/few
+ /test-exports/influx
Addition count 3
Proceed with the changes? [Y/n]:y
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/influx' to '/Users/emmanuelodeke/Desktop/exp/influx.pdf'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/influx' to '/Users/emmanuelodeke/Desktop/exp/influx.txt'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few' to '/Users/emmanuelodeke/Desktop/exp/few.pdf'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs.txt'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs.odt'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs.pdf'
```

* Exhibit B (Original case, _exports suffixed dirs used):
```shell
$ drive pull --explicitly-export --exports-dir ~/Desktop/exp --export
pdf,txt,odt
Resolving...
+ /test-exports/few.docs
+ /test-exports/few
+ /test-exports/influx
Addition count 3
Proceed with the changes? [Y/n]:y
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/influx' to '/Users/emmanuelodeke/Desktop/exp/influx_exports/influx.pdf'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/influx' to '/Users/emmanuelodeke/Desktop/exp/influx_exports/influx.txt'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few' to '/Users/emmanuelodeke/Desktop/exp/few_exports/few.pdf'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs_exports/few.docs.odt'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs_exports/few.docs.txt'
Exported '/Users/emmanuelodeke/emm.odeke@gmail.com/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs_exports/few.docs.pdf'
```
@odeke-em
Copy link
Owner

@chevillet thanks for chiming in, actually would you mind filing a separate issue about skipping the creation of *.desktop files?
Otherwise I have a CL coming up in a second to implement this request in this issue.

@chevillet
Copy link

Hi @odeke-em!
Thanks a lot for this new feature, it's really cool.
And sorry about the *.desktop request, I should have created a different issue in the first place, my bad.

@odeke-em
Copy link
Owner

No worries at all. I see you've created the issue, I am going to get started working on it as we speak 🙏🏾

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

Successfully merging a pull request may close this issue.

3 participants