Add writers to core processors from export cli cmd
This commit is contained in:
@@ -52,9 +52,9 @@ def execute(config, eargs):
|
||||
writers = init_writers_from_config(config)
|
||||
|
||||
ct = Token(path=eargs.directory)
|
||||
cm = Meta(path=eargs.directory, writer=writers['meta'])
|
||||
ca = Attachment(path=eargs.directory, writer=writers['attachment'])
|
||||
cp = Proof(path=eargs.directory, attachments=ca, writer=writers['proof'])
|
||||
cm = Meta(path=eargs.directory, writer=writers['meta'](path=eargs.output_directory))
|
||||
ca = Attachment(path=eargs.directory, writer=writers['attachment'](path=eargs.output_directory))
|
||||
cp = Proof(path=eargs.directory, attachments=ca, writer=writers['proof'](path=eargs.output_directory))
|
||||
cn = Network(path=eargs.directory)
|
||||
|
||||
ct.load()
|
||||
@@ -77,9 +77,8 @@ def execute(config, eargs):
|
||||
ref = cn.resource(eargs.target)
|
||||
chain_spec = cn.chain_spec(eargs.target)
|
||||
logg.debug('found reference {} chain spec {} for target {}'.format(ref['contents'], chain_spec, eargs.target))
|
||||
c = getattr(cmd_mod, 'new')(chain_spec, ref['contents'], cp, signer_hint=signer, rpc=rpc)
|
||||
c = getattr(cmd_mod, 'new')(chain_spec, ref['contents'], cp, signer_hint=signer, rpc=rpc, outputs_writer=writers['ext'](path=eargs.output_directory))
|
||||
c.apply_token(ct)
|
||||
|
||||
p = Processor(proof=cp, attachment=ca, metadata=cm, extensions=[eargs.target])
|
||||
|
||||
c.process(writer=writers['ext'](path=eargs.output_directory))
|
||||
p = Processor(proof=cp, attachment=ca, metadata=cm, extensions=[c])
|
||||
p.process()
|
||||
|
||||
Reference in New Issue
Block a user