grke/burp — pull request #130 by ZungBang (2012-12-23 17:17:05+00:00)
Title: Option to Format Long File List as JSON

Hi,

I've added a command line option ``-j`` to format the long file list as JSON. I plan to use it with [burpfs] [1] instead of parsing the current ``ls``-like output format.

With this new option I expect to better represent the original backup files (mostly timestamps and hardlinks) in burpfs. Parsing JSON is a one-Iiner deal in Python and probably as easy in other environments, so I can imagine this being also useful for other types of frontends.

I did not add any new dependency (it's just a bunch of fancy printf's, with a bit of logic to handle commas, braces and such), and checked that it compiles for Windows too.

Please review.
Please pull.

Thanks,
Avi

[1]: https://github.com/ZungBang/burpfs "burpfs"