google / skicka

Command-line utility for working with Google Drive. Join the mailing list at https://groups.google.com/forum/#!forum/skicka-users.
Apache License 2.0
1.3k stars 118 forks source link

be able to 'cat' to Drive file from stdin #49

Closed mmp closed 9 years ago

mmp commented 9 years ago

It would be nice to be able to do something like

% ls | skicka cat - /file.txt

And create the corresponding file on Drive with the contents from stdin.

mmp commented 9 years ago

One challenge with supporting this is that if the upload fails partway through (e.g. due to a network connection issue), Drive doesn't save partial uploads. Thus, we need to either buffer the entire input in memory or on disk locally, which makes this less compelling to support versus just requiring the user to do same.

mmp commented 9 years ago

Closing this out as probably not a good idea after all given the issue of losing things with partial uploads. I have confirmed that named pipes work fine as a source for skicka to upload from; that seems to cover the use case where one is willing to risk losing the contents in exchange for not having it land on local disk.

(*) Work, except for the progress bar, which gets a bit confused since more data ends up being uploaded than originally expected, but this is just a cosmetic issue.