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

fix imports and module names

This commit is contained in:
Kelly Brazil
2019-10-16 17:23:18 -07:00
parent 46ad1269cb
commit a3ee02514b

View File

@ -6,9 +6,9 @@ Main input module
import sys import sys
import json import json
from jc.parsers import ifconfig import jc.parsers.ifconfig
from jc.parsers import ls import jc.parsers.ls
from jc.parsers import netstat import jc.parsers.netstat
def main(): def main():
pretty = False pretty = False
@ -27,11 +27,11 @@ def main():
pretty = True pretty = True
if arg == '--ifconfig': if arg == '--ifconfig':
result = ifconfig.parse(data) result = jc.parsers.ifconfig.parse(data)
elif arg == '--ls': elif arg == '--ls':
result = ls.parse(data) result = jc.parsers.ls.parse(data)
elif arg == '--netstat': elif arg == '--netstat':
result = netstat.parse(data) result = jc.parsers.netstat.parse(data)
# output resulting dictionary as json # output resulting dictionary as json
if pretty: if pretty: