Closed joeyh closed 12 years ago
glacier archive upload <vault> --name=<name> -
already works. I'm happy to document this and consider any future regressions in this behaviour a bug. Currently if you don't specify --name
it will use the name <stdin>
, but I'd prefer not to be pinned down on this point and you'll probably want to specify a name anyway.
I'll need to write the functionality for glacier archive retrieve -o- <vault> <name>
and check that nothing else will get written to stdout, but I am happy to guarantee this behaviour.
It'd be very useful to be able to pipe data into glacier-cli to upload it, as well as allow it to download data and output it to stdout. I'd suggest using - as the filename to enable these modes.
One reason I'd like to be able to do this is because git-annex is encrypting files before sending them. Which means it has to write the encrypted file to a temp file right now, which is a waste of disk space and IO.
The other reason I'd like this is that I want to display progress when uploading & downloading, and if I can pipe data, it's easy to update my progress bar as I send/receive data.
Note: Some of this may already work, but I hesitate to use it unless it's documented. Especially because -o- might send a file to stdout, but for all I know, glacier-cli could write other messages to stdout and corrupt the file.