uskudnik / amazon-glacier-cmd-interface

Command line interface for Amazon Glacier
MIT License
375 stars 103 forks source link

"Term" output mode for small terminal windows #131

Open elonen opened 11 years ago

elonen commented 11 years ago

I have found the "print" output to be a bit hard to follow on a small (eg. 80 chars wide) terminal window when the long archive_ids break pretty print table structure. To make the program more usable for terminals, I propose a new "term" output mode as implemented in this pull request.

The new mode prints headers for each value and separates each row with an empty line. This makes it easier for a human user to spot description (file name) from the terminal output and to differentiate archive_id from hash, even if lines are wrapped. Here's an example output:

archive_id      rpf7-cSGtEtpOOJjDEgFPiMjF-TYapWk0SK_IgU7nlWtitDczJ--9F55ZeHI4OYxpkWNHqViaPIZYZCh9twYYgpkmxfIznTPO3Bu12xRgKaz4Bj8-VqWN7pf7I2UzzP3vJem_k8Hfg
hash            a3003bad34d4d9c42971aefb8c5121f9b40c04e2b5b6090e39199b40d0e6b3ae
description     20130429-photos-2006.tgz.gpg
region          eu-west-1
date            2013-04-29 16:29:31+00:00
vault           jarno-personal-backup
size            1010737218

archive_id      s3_Jh3tzVVJUFy5_ooEXS16vku1dJw-lfn3msFJJlASrRgBptwkyABXul4w1DAuqowHhpmAjnTZl7Sh5IIaPuo9gJ9hQXO16UwqIjOJdAX199CTSPJkfRNoP07kSJvk2t_LAJylHqw
hash            aec66deb80ab86bd226aa691c7b2d6ab5e397beb79677ec01c033288b75be4a
description     20130405-photos-2003.tgz.gpg
region          eu-west-1
date            2013-04-05 00:17:17+00:00
vault           jarno-personal-backup
size            382171544

....