diff --git a/README.md b/README.md index 3e5d1a4c..74a19546 100644 --- a/README.md +++ b/README.md @@ -185,11 +185,11 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `-a` about `jc`. Prints information about `jc` and the parsers (in JSON, of course!) - `-d` debug mode. Prints trace messages if parsing issues are encountered (use `-dd` for verbose debugging) - `-h` help. Use `jc -h --parser_name` for parser documentation -- `-l` line buffer output - `-m` monochrome JSON output - `-p` pretty format the JSON output - `-q` quiet mode. Suppresses parser warning messages - `-r` raw output. Provides a more literal JSON output, typically with string values and no additional semantic processing +- `-u` unbuffer output - `-v` version information ### Exit Codes diff --git a/jc/cli.py b/jc/cli.py index 93e5366d..580d5da4 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -331,11 +331,11 @@ def helptext(): -a about jc -d debug (-dd for verbose debug) -h help (-h --parser_name for parser documentation) - -l line buffer output -m monochrome output -p pretty print output -q quiet - suppress parser warnings -r raw JSON output + -u unbuffer output -v version info Examples: @@ -522,12 +522,12 @@ def main(): about = 'a' in options debug = 'd' in options verbose_debug = True if options.count('d') > 1 else False - linebuf = 'l' in options mono = 'm' in options help_me = 'h' in options pretty = 'p' in options quiet = 'q' in options raw = 'r' in options + unbuffer = 'u' in options version_info = 'v' in options if verbose_debug: @@ -628,7 +628,7 @@ def main(): env_colors=jc_colors, mono=mono, piped_out=piped_output()), - flush=linebuf) + flush=unbuffer) sys.exit(combined_exit_code(magic_exit_code, 0)) @@ -641,7 +641,7 @@ def main(): env_colors=jc_colors, mono=mono, piped_out=piped_output()), - flush=linebuf) + flush=unbuffer) sys.exit(combined_exit_code(magic_exit_code, 0)) diff --git a/man/jc.1 b/man/jc.1 index 74e656e7..76e5d043 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -1,4 +1,4 @@ -.TH jc 1 2021-09-13 1.17.0 "JSON CLI output utility" +.TH jc 1 2021-09-16 1.17.0 "JSON CLI output utility" .SH NAME jc \- JSONifies the output of many CLI tools and file-types .SH SYNOPSIS @@ -418,10 +418,6 @@ debug - show traceback (\fB-dd\fP for verbose traceback) help (\fB-h --parser_name\fP for parser documentation) .TP .B -\fB-l\fP -line buffer output -.TP -.B \fB-m\fP monochrome output .TP @@ -438,6 +434,10 @@ quiet - suppress warnings raw JSON output .TP .B +\fB-u\fP +unbuffer output (useful for slow streaming data with streaming parsers) +.TP +.B \fB-v\fP version information diff --git a/templates/manpage_template b/templates/manpage_template index b5ea8c37..f99ed411 100644 --- a/templates/manpage_template +++ b/templates/manpage_template @@ -43,10 +43,6 @@ debug - show traceback (\fB-dd\fP for verbose traceback) help (\fB-h --parser_name\fP for parser documentation) .TP .B -\fB-l\fP -line buffer output -.TP -.B \fB-m\fP monochrome output .TP @@ -63,6 +59,10 @@ quiet - suppress warnings raw JSON output .TP .B +\fB-u\fP +unbuffer output (useful for slow streaming data with streaming parsers) +.TP +.B \fB-v\fP version information diff --git a/templates/readme_template b/templates/readme_template index a948d222..6add6634 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -110,11 +110,11 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio - `-a` about `jc`. Prints information about `jc` and the parsers (in JSON, of course!) - `-d` debug mode. Prints trace messages if parsing issues are encountered (use `-dd` for verbose debugging) - `-h` help. Use `jc -h --parser_name` for parser documentation -- `-l` line buffer output - `-m` monochrome JSON output - `-p` pretty format the JSON output - `-q` quiet mode. Suppresses parser warning messages - `-r` raw output. Provides a more literal JSON output, typically with string values and no additional semantic processing +- `-u` unbuffer output - `-v` version information ### Exit Codes