kislyuk / yq

Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
https://kislyuk.github.io/yq/
Apache License 2.0
2.62k stars 84 forks source link

Create __main__.py #82

Closed Hellomello13 closed 4 years ago

Hellomello13 commented 4 years ago

Resolves issue https://github.com/kislyuk/yq/issues/81 by adding a main entrypoint. This allows yq to be run via python3 -m yq.

pfalcon commented 4 years ago

I didn't look into yq source myself, but as I mentioned in #81, the solution should be simple, and indeed, it's simple, thanks @Hellomello13! I hope the maintainer will process it soon. My personal comment is that I always recommend to try to give more detailed commit messages. So, after "Resolves issue #81 by adding a main entrypoint." I would add "So, now it's possible to run yq via python -m yq." This way, even folks who didn't know about -m switch will have clear picture just from reading git log and maybe even have a chance to learn something new, instead of like "oh, that commit, I have no idea what and why it does".

Anyway, just a suggestion. Here the situation is pretty simple so hopefully it's ok like it is. Thanks again!