conda-incubator / conda-tree

conda dependency tree helper
MIT License
152 stars 12 forks source link

Print json instead of python repr #21

Closed indigoviolet closed 1 year ago

indigoviolet commented 1 year ago

Thank you for this tool, it is super helpful.

The output of conda tree leaves looks like JSON, but is actually a stringified version of a Python list, and annoying to parse. I suggest either adding a --json option or even better just printing valid JSON.

rvalieris commented 1 year ago

yes, thats a good point. the print(list) is something I added very early on but haven't changed since but it should have been something simpler like one package per line. we could also add --json option too.

rvalieris commented 1 year ago

new version now prints one package per line, and a --json option prints proper json.