cic-cli/cic/cmd/show.py

33 lines
819 B
Python
Raw Normal View History

2021-10-09 20:37:54 +02:00
# local imports
from cic import Proof
from cic.meta import Meta
from cic.attachment import Attachment
from cic.network import Network
def process_args(argparser):
argparser.add_argument('-f', '--file', type=str, help='add file')
argparser.add_argument('-d', '--directory', type=str, dest='directory', default='.', help='cic data directory')
2021-10-09 20:37:54 +02:00
def validate_args(args):
pass
def execute(config, eargs):
cp = Proof(path=eargs.directory)
cm = Meta(path=eargs.directory)
ca = Attachment(path=eargs.directory)
cn = Network(eargs.directory)
cp.load()
cm.load()
ca.load()
cn.load()
print("Version: {}\n".format(cp.version()))
print("Proof:\n{}".format(cp))
print("Meta:\n{}".format(cm))
print("Attachments:\n{}".format(ca))
print("Network:\n{}".format(cn))