mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
change from line buffer output to unbuffer output
This commit is contained in:
@ -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
|
||||
|
@ -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))
|
||||
|
||||
|
10
man/jc.1
10
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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user