1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-08-08 22:36:48 +02:00

clean up examples

This commit is contained in:
Kelly Brazil
2021-04-16 08:46:20 -07:00
parent 8390ae48c8
commit 3b0e2f03f3
2 changed files with 24 additions and 23 deletions

View File

@@ -320,27 +320,27 @@ def helptext():
{parsers_string}
Options:
-a about jc
-d debug - show traceback (-dd for verbose traceback)
-h help (use -h --parser_name for parser documentation)
-d debug (-dd for verbose debug)
-h help (-h --parser_name for parser documentation)
-m monochrome output
-p pretty print output
-q quiet - suppress parser warnings
-r raw JSON output
-v version info
Example:
ls -al | jc --ls -p
Examples:
Standard Syntax:
$ dig www.google.com | jc --dig -p
or using the magic syntax:
Magic Syntax:
$ jc -p dig www.google.com
jc -p ls -al
For parser documentation:
jc -h --ls
Parser Documentation:
$ jc -h --dig
'''
return textwrap.dedent(helptext_string)
def help_doc(options):
"""
Returns the parser documentation if a parser is found in the arguments, otherwise
@@ -363,6 +363,7 @@ Version {parser.info.version} by {parser.info.author} ({parser.info.author_email
return helptext()
def versiontext():
"""Return the version text"""
versiontext_string = f'''\

View File

@@ -40,7 +40,7 @@ debug - show traceback (\fB-dd\fP for verbose traceback)
.TP
.B
\fB-h\fP
help - use `-h --parser_name` for parser documentation
help (\fB-h --parser_name\fP for parser documentation)
.TP
.B
\fB-m\fP
@@ -96,21 +96,21 @@ Local plugin filenames must be valid python module names, therefore must consist
Note: The application data directory follows the XDG Base Directory Specification
.SH EXAMPLE
ls \fB-al\fP | jc \fB--ls\fP \fB-p\fP
or using the magic syntax:
jc \fB-p\fP ls \fB-al\fP
.SH EXAMPLES
Standard Syntax:
.RS
$ dig www.google.com | jc \fB--dig\fP \fB-p\fP
.RE
Magic Syntax:
.RS
$ jc \fB-p\fP dig www.google.com
.RE
For parser documentation:
jc \fB-h\fP \fB--ls\fP
.RS
$ jc \fB-h\fP \fB--dig\fP
.RE
.SH AUTHOR
{{ jc.author }} ({{ jc.author_email }})