uskudnik / amazon-glacier-cmd-interface

Command line interface for Amazon Glacier
MIT License
374 stars 100 forks source link

Program return codes, based on state and on errors #5

Closed offlinehacker closed 11 years ago

offlinehacker commented 12 years ago

It would be great to set return codes based on what happened. This way user will be able to monitor execution from simple shell scripts that he would write, giving all glacier power in his hands.

martinrehfeld commented 12 years ago

It would also be a nice (additional) idea to trigger a status report to Stdout by sending SIGUSR1 or something.

offlinehacker commented 12 years ago

What do you mean by that? This application is aynchrone anyway, and I think it's the best way to keep it like this, simple.

martinrehfeld commented 12 years ago

Sorry for hijacking this ticket anyway. I was imagining a large upload (possible done through the multi-upload facility) that might run for hours/days/weeks. It would be nice to be able to introspect the current state of things without enabling verbose progress output all the time. Feel free to disregard this idea if it does not fit your model.

offlinehacker commented 12 years ago

You are not hijacking in any way. First goal is to integrate with boto, but we are still waiting for boto to have glacier in development branch. I think then there might be some other facilities, like you described, available, because they would have to be made for fuse filesystem support.

For download and upload progress, that code be made now, greate idea, thanks!

uskudnik commented 12 years ago

I just merged the latest changes from jaka to have a nice directory structure and support virtual env and env variables. As far as I'm looking at boto's glacier branch they are progressing slowly and might just be at the point where that branch is useful.

But I haven't started the rewrite to that due to lack of time.

On Aug 30, 2012, at 2:08 PM, Jaka Hudoklin wrote:

You are not hijacking in any way. First goal is to integrate with boto, but we are still waiting for boto to have glacier in development branch. I think then there might be some other facilities, like you described, available, because they would have to be made for fuse filesystem support.

— Reply to this email directly or view it on GitHub.

uskudnik commented 12 years ago

Well, I guess this could be extended by actually asking "What kind of output do we actually want?"

Something like this (similar to what we have now):

[amazon status code] [message] [table headers (if applicable)] [data]

Maybe no table headers by default?

Print with pprint (http://docs.python.org/library/pprint.html)? Use something like http://code.activestate.com/recipes/577202-render-tables-for-text-interface/?

offlinehacker commented 12 years ago

Does there exist some lib that helps format output asever user wants? On Aug 30, 2012 8:31 PM, "Urban Škudnik" notifications@github.com wrote:

Well, I guess this could be extended by actually asking "What kind of output do we actually want?"

Something like this (similar to what we have now):

[amazon status code] [message] [table headers (if applicable)] [data]

Maybe no table headers by default?

Print with pprint (http://docs.python.org/library/pprint.html)? Use something like http://code.activestate.com/recipes/577202-render-tables-for-text-interface/ ?

— Reply to this email directly or view it on GitHubhttps://github.com/uskudnik/amazon-glacier-cmd-interface/issues/5#issuecomment-8169558.

uskudnik commented 12 years ago

Not to my knowledge, though I haven't done that yet... would need to check some other clis...

offlinehacker commented 11 years ago

Well to not include too much code into our project we could use this for table printing, and this for uploading progress bar.

offlinehacker commented 11 years ago

I created new issue for pretty print here #20

wvmarle commented 11 years ago

Close issue?

offlinehacker commented 11 years ago

No SIGUSR codes are still not handled. On Oct 10, 2012 6:34 PM, "wvmarle" notifications@github.com wrote:

Close issue?

— Reply to this email directly or view it on GitHubhttps://github.com/uskudnik/amazon-glacier-cmd-interface/issues/5#issuecomment-9309973.