mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
add -v to helptext. minor formatting
This commit is contained in:
10
jc/cli.py
10
jc/cli.py
@ -297,8 +297,8 @@ def helptext():
|
|||||||
"""Return the help text with the list of parsers"""
|
"""Return the help text with the list of parsers"""
|
||||||
parsers_string = parsers_text(indent=12, pad=17)
|
parsers_string = parsers_text(indent=12, pad=17)
|
||||||
|
|
||||||
helptext_string = f'''
|
helptext_string = f'''\
|
||||||
jc converts the output of many commands to JSON for easier parsing in scripts.
|
jc converts the output of many commands and file-types to JSON
|
||||||
|
|
||||||
Usage: COMMAND | jc PARSER [OPTIONS]
|
Usage: COMMAND | jc PARSER [OPTIONS]
|
||||||
|
|
||||||
@ -316,6 +316,7 @@ def helptext():
|
|||||||
-p pretty print output
|
-p pretty print output
|
||||||
-q quiet - suppress parser warnings
|
-q quiet - suppress parser warnings
|
||||||
-r raw JSON output
|
-r raw JSON output
|
||||||
|
-v version info
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
ls -al | jc --ls -p
|
ls -al | jc --ls -p
|
||||||
@ -329,10 +330,9 @@ def helptext():
|
|||||||
|
|
||||||
def versiontext():
|
def versiontext():
|
||||||
"""Return the version text"""
|
"""Return the version text"""
|
||||||
versiontext_string = f'''
|
versiontext_string = f'''\
|
||||||
jc version {info.version}
|
jc version {info.version}
|
||||||
© 2019-2021 Kelly Brazil
|
© 2019-2021 Kelly Brazil'''
|
||||||
'''
|
|
||||||
return textwrap.dedent(versiontext_string)
|
return textwrap.dedent(versiontext_string)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user