-
Notifications
You must be signed in to change notification settings - Fork 4
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
Output formatting (JSON) #8
Comments
Makes sense, having structured output is one of the goals of the tool. The tree options would probably be: |
I can make a PR to add a command line flag that formats and outputs the data as JSON instead of human-readable text; however, I'm not any kind of authority which can determine what the schema for the JSON will be. If you come up with a standard (or just sorta accept what I can come up with, and improve upon it) I'll be happy to contribute. |
@Tunas1337 Thanks for offering your help! I'm still unsure about the details myself... The key to this task is to first figure out how to represent the values that get printed. Currently, we just parse the HTML and print them. But ideally, we'd like to have a more stuctured representation e.g currencies that have a number part (float) and a currency (enum?) Once we have an in-memory representation, the rest is simple. If the global Regarding the schema, it depends on the command that's being called. On Nothing very actionable from all I just said, just thinking out loud. |
Perhaps we should do a small PR, for one command, and have a discussion there. Happy to do one, or review it if you get to it first. @Tunas1337 |
I've been somewhat busy with work and university, but I will definitely take a look at it throughout this week; hopefully, I'll be able to make at least a preliminary PR with JSON/CSV output for one command by the end of the week. I'm thinking |
See PR #15. |
No worries. :) Thanks, I'll review the RP! |
Currently you can't specify an output format for the info returned.
It would be great if we can specify an output format for the info, e.g. JSON, XML(?), CSV etc.
Requested Usage
... --output="json"
The text was updated successfully, but these errors were encountered: