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)
25 i = args.extract.rfind('/')
30 stream = args.extract[:i]
31 fn = args.extract[(i+1):]
32 for s in cr.all_streams():
33 if s.name() == stream:
35 sys.stdout.write(s.files()[fn].as_manifest())
37 sys.stdout.write(cr.manifest_text(args.strip))