32 parser = argparse.ArgumentParser(description=__doc__)
34 '--path_prefix', help=
'Directory path containing the manifest entry sources', required=
True
36 parser.add_argument(
'--input', help=
'Path to original manifest', required=
True)
37 parser.add_argument(
'--output', help=
'Path to the updated json file', required=
True)
38 args = parser.parse_args()
40 with open(args.input,
'r')
as input_file:
41 contents = input_file.read().splitlines()
43 entries =
collect(args.path_prefix, contents)
48 with open(args.output,
'w')
as output_file:
49 json.dump([e._asdict()
for e
in entries],
53 separators=(
',',
': '))