sanand0 / xmljson

xmlsjon converts XML into Python dictionary structures (trees, like in JSON) and vice-versa.
MIT License
122 stars 33 forks source link

Add ability to call module as CLI utility (`python -m`) #32

Closed tribals closed 5 years ago

tribals commented 5 years ago

It is very usable package, but it is also very annoying to copy-paste same simple script again and again in every project I'm working on (that uses XML) to get the ability to quickly convert some unreadable messy XML to eye-pleasant well-formatted easily understandable JSON one.

tribals commented 5 years ago

Unfortunately, there is no tests - I can not figure out how to write kinda integration test for CLI tool, at least using unittest. As for the unit tests, I think there is no need for it - the code is dead simple, it doesn't bring any changes to conversion algorithms.

sanand0 commented 5 years ago

@tribals -- I've refactored this and added test cases in the cli branch. Does this work for you?

tribals commented 5 years ago

@sanand0 I've played with it for a while - works just fine, thanks!

sanand0 commented 5 years ago

@tribals -- great, closing this and merging the cli branch into master.