Adds "--strip" option to arv-normalize to strip off authorization tokens.
[arvados.git] / sdk / python / bin / arv-normalize
index 755b56507289bbf1d5601ed3e9f238523a0dae1e..0506381272c856bbc4e1b933aef6f474752d3667 100755 (executable)
@@ -14,13 +14,14 @@ parser = argparse.ArgumentParser(
     description='Read manifest on standard input and put normalized manifest on standard output.')
 
 parser.add_argument('--extract', type=str, help="The file to extract from the input manifest")
+parser.add_argument('--strip', action='store_true', help="Strip authorization tokens")
 
 args = parser.parse_args()
 
 import arvados
 
 r = sys.stdin.read()
-    
+
 cr = arvados.CollectionReader(r)
 
 if args.extract:
@@ -36,4 +37,4 @@ if args.extract:
             if fn in s.files():
                 sys.stdout.write(s.files()[fn].as_manifest())
 else:
-    sys.stdout.write(cr.manifest_text())
+    sys.stdout.write(cr.manifest_text(args.strip))