Pumping pads as files into publishing frameworks!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
590 B

9 years ago
#!/usr/bin/env python
from __future__ import print_function
from argparse import ArgumentParser
import json, os
def main(args):
p = ArgumentParser("")
p.add_argument("input", nargs="+", help="filenames")
p.add_argument("--indent", type=int, default=2, help="indent")
args = p.parse_args(args)
inputs = args.input
inputs.sort()
ret = []
for p in inputs:
with open(p) as f:
meta = json.load(f)
ret.append(meta)
if args.indent:
print (json.dumps(ret, indent=args.indent))
else:
print (json.dumps(ret))