-
Notifications
You must be signed in to change notification settings - Fork 11
removed jq dependency #15
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
Conversation
ceremcem, I appreciate your work, but I'm not sure on this PR. |
That's of course your call, no problem. Please consider that the tests are the mandatory part of "tutorial" for this tool. It was the first thing I took a look at least. As the "default" way of displaying JSON is "Pretty printing", I guess In this context, both raw JSON output and Regarding to "avoiding one more switch to keep things clean": Consider how many lines we saved from both documentation and the code, by adding one Again, it's up to you. |
I just wonder, if the problem is adding yet another argument, then simply removing this argument from the documentation both
Would that work for you? |
Well, for me the JSON output is useful for other programs (or written to file), not to be displayed, exactly like done in the tests with jq. Same as CSV output. |
This doesn't answer my question :) Will undocumenting the |
Sorry, what do you mean by undocumenting --pretty? JSON pretty output would be default? |
Let me show you: diff --git a/README.md b/README.md
index 725dbd8..112129f 100644
--- a/README.md
+++ b/README.md
@@ -26,12 +26,11 @@ Usage
-a, --by_path Group commands by path
-s, --csv CSV output
-j, --json JSON output (commands only)
- --pretty Pretty print the JSON output (Requires --json option)
-b, --bogus Add bogus renamed_from action (used only when grouping by path)
* `--json` (`-j`), available for commands only, will output a list of
-commands in JSON format. `--pretty` switch requires this option.
+commands in JSON format.
* `--csv` (`-s`) will produce on line for each modification, instead of
formatted output: the first column is the path, then each action taken on the
diff --git a/btrfs-snapshots-diff.py b/btrfs-snapshots-diff.py
index 5682d07..8cd1ce4 100755
--- a/btrfs-snapshots-diff.py
+++ b/btrfs-snapshots-diff.py
@@ -569,7 +569,7 @@ def main():
'-j', '--json', action='store_true', help='JSON output (commands only)'
)
parser.add_argument(
- '--pretty', action='store_true', help='Pretty print the JSON output'
+ '--pretty', action='store_true', help=argparse.SUPPRESS
)
parser.add_argument(
'-b', No one will even know there is a |
ok, let's do it this way! |
Of course. The idea was it would be either " |
I propose:
|
Okay. |
Ready. |
f2e9aba
to
bc33f61
Compare
Thanks! |
No description provided.