10 parser = argparse.ArgumentParser(
11 description='Read manifest on standard input and put normalized manifest on standard output.')
13 parser.add_argument('--extract', type=str, help="The file to extract from the input manifest")
14 parser.add_argument('--strip', action='store_true', help="Strip authorization tokens")
16 args = parser.parse_args()
22 cr = arvados.CollectionReader(r)
26 i = args.extract.rfind('/')
31 stream = args.extract[:i]
32 fn = args.extract[(i+1):]
33 for s in cr.all_streams():
34 if s.name() == stream:
36 sys.stdout.write(s.files()[fn].as_manifest())
38 sys.stdout.write(cr.manifest_text(args.strip))