New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: guess output format from output file extension #197
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! That's a great job! 😄
Don't forget to fix the CI (make black messages
) 🙂
I think I have addressed all of your comments. Let me know if there's anything else you see that needs fixing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Just a few changes and all will be OK for a merge 😄
guess output format based on output file extension check for empty output file default to .txt if no file extension provided change default output format back to txt add tests update man page fix default output format directly return output dumper use keys from dumpers in key error message fix man pages prevent output format from being overridden use first dumper key as default format update messages and formatting update help message for format argument specify list type in InvalidOutputFormat exception make default output format more apparent update messages
Thank you! |
It's all good for me, just caught a little bug when exporting to JSON without giving a position, but it's not related to this PR and should be fixed in a 0.10.2 version, so we can merge this! Thank you for this amazing work! 😄 |
guess output format based on output file extension
check for empty output file
default to .txt if no file extension provided
add tests
update man page
Checklist:
This PR makes it so the
--output
argument optional. If it is not given, the file extension from the output file will be used to guess the requested format.