11 logger = logging.getLogger(os.path.basename(sys.argv[0]))
13 parser = argparse.ArgumentParser(
14 description='Read manifest on standard input and put normalized manifest on standard output.')
16 parser.add_argument('--extract', type=str, help="The file to extract from the input manifest")
18 args = parser.parse_args()
24 cr = arvados.CollectionReader(r)
27 i = args.extract.rfind('/')
32 stream = args.extract[:i]
33 fn = args.extract[(i+1):]
34 for s in cr.all_streams():
35 if s.name() == stream:
37 sys.stdout.write(s.files()[fn].as_manifest())
39 sys.stdout.write(cr.manifest_text())