mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
cleanup helptext
This commit is contained in:
5
jc/jc.py
5
jc/jc.py
@ -7,6 +7,7 @@ Main input module
|
||||
import sys
|
||||
import signal
|
||||
import json
|
||||
import textwrap
|
||||
import jc.parsers.arp
|
||||
import jc.parsers.df
|
||||
import jc.parsers.dig
|
||||
@ -71,7 +72,7 @@ Example:
|
||||
signal.signal(signal.SIGINT, ctrlc)
|
||||
|
||||
if sys.stdin.isatty():
|
||||
print('jc: missing piped data' + helptext, file=sys.stderr)
|
||||
print('jc: missing piped data' + textwrap.dedent(helptext), file=sys.stderr)
|
||||
exit()
|
||||
|
||||
data = sys.stdin.read()
|
||||
@ -143,7 +144,7 @@ Example:
|
||||
result = jc.parsers.w.parse(data)
|
||||
|
||||
else:
|
||||
print('jc: missing or incorrect arguments' + helptext, file=sys.stderr)
|
||||
print('jc: missing or incorrect arguments' + textwrap.dedent(helptext), file=sys.stderr)
|
||||
exit()
|
||||
|
||||
# output resulting dictionary as json
|
||||
|
Reference in New Issue
Block a user