1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

move info class to top

This commit is contained in:
Kelly Brazil
2020-02-05 22:26:47 -08:00
parent 77d334f7f3
commit 3a1cbc4d50

View File

@ -9,6 +9,16 @@ import signal
import json
import jc.utils
class info():
version = '1.7.1'
description = 'jc cli output JSON conversion tool'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
__version__ = info.version
parsers = [
'arp',
'crontab',
@ -50,6 +60,10 @@ parsers = [
]
def ctrlc(signum, frame):
sys.exit(1)
def parser_shortname(parser_argument):
"""short name of the parser with dashes and no -- prefix"""
return parser_argument[2:]
@ -71,20 +85,6 @@ def parser_module(parser):
return getattr(jc.parsers, parser_mod_shortname(parser))
class info():
version = '1.7.1'
description = 'jc cli output JSON conversion tool'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
__version__ = info.version
def ctrlc(signum, frame):
sys.exit(1)
def parsers_text(indent=0, pad=0):
ptext = ''
for parser in parsers: