mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
formatting
This commit is contained in:
@ -7,7 +7,7 @@ jc - JSON CLI output utility utils
|
|||||||
warning_message(message_lines)
|
warning_message(message_lines)
|
||||||
```
|
```
|
||||||
|
|
||||||
Prints warning message for non-fatal issues. The first line is appended with
|
Prints warning message for non-fatal issues. The first line is prepended with
|
||||||
'jc: Warning - ' and subsequent lines are indented. Wraps text as needed based
|
'jc: Warning - ' and subsequent lines are indented. Wraps text as needed based
|
||||||
on the terminal width.
|
on the terminal width.
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ Returns:
|
|||||||
error_message(message_lines)
|
error_message(message_lines)
|
||||||
```
|
```
|
||||||
|
|
||||||
Prints an error message for fatal issues. The first line is appended with
|
Prints an error message for fatal issues. The first line is prepended with
|
||||||
'jc: Error - ' and subsequent lines are indented. Wraps text as needed based
|
'jc: Error - ' and subsequent lines are indented. Wraps text as needed based
|
||||||
on the terminal width.
|
on the terminal width.
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ Returns:
|
|||||||
```python
|
```python
|
||||||
stream_success(output_line, ignore_exceptions)
|
stream_success(output_line, ignore_exceptions)
|
||||||
```
|
```
|
||||||
add _meta object to output line if -qq (ignore_exceptions) option is used
|
add _jc_meta object to output line if -qq (ignore_exceptions) option is used
|
||||||
|
|
||||||
## stream_error
|
## stream_error
|
||||||
```python
|
```python
|
||||||
|
@ -9,7 +9,7 @@ from textwrap import TextWrapper
|
|||||||
|
|
||||||
def warning_message(message_lines):
|
def warning_message(message_lines):
|
||||||
"""
|
"""
|
||||||
Prints warning message for non-fatal issues. The first line is appended with
|
Prints warning message for non-fatal issues. The first line is prepended with
|
||||||
'jc: Warning - ' and subsequent lines are indented. Wraps text as needed based
|
'jc: Warning - ' and subsequent lines are indented. Wraps text as needed based
|
||||||
on the terminal width.
|
on the terminal width.
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ def warning_message(message_lines):
|
|||||||
|
|
||||||
def error_message(message_lines):
|
def error_message(message_lines):
|
||||||
"""
|
"""
|
||||||
Prints an error message for fatal issues. The first line is appended with
|
Prints an error message for fatal issues. The first line is prepended with
|
||||||
'jc: Error - ' and subsequent lines are indented. Wraps text as needed based
|
'jc: Error - ' and subsequent lines are indented. Wraps text as needed based
|
||||||
on the terminal width.
|
on the terminal width.
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ def convert_to_bool(value):
|
|||||||
|
|
||||||
|
|
||||||
def stream_success(output_line, ignore_exceptions):
|
def stream_success(output_line, ignore_exceptions):
|
||||||
"""add _meta object to output line if -qq (ignore_exceptions) option is used"""
|
"""add _jc_meta object to output line if -qq (ignore_exceptions) option is used"""
|
||||||
if ignore_exceptions:
|
if ignore_exceptions:
|
||||||
output_line.update({'_jc_meta': {'success': True}})
|
output_line.update({'_jc_meta': {'success': True}})
|
||||||
|
|
||||||
|
2
man/jc.1
2
man/jc.1
@ -1,4 +1,4 @@
|
|||||||
.TH jc 1 2021-09-24 1.17.0 "JSON CLI output utility"
|
.TH jc 1 2021-09-25 1.17.0 "JSON CLI output utility"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
jc \- JSONifies the output of many CLI tools and file-types
|
jc \- JSONifies the output of many CLI tools and file-types
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
Reference in New Issue
Block a user