def parse_value(v):
    v = v.strip()
    if re.search(r"^\d*\.\d+$", v):
        return float(v)
    elif re.search(r"^\d+$", v):
        return int(v)
    else:
        return v


defaults = {}
if args.add != None:
    for p in args.add:
        n, v = p.split("=", 1)
        defaults[n] = parse_value(v)
# print (defaults)
# sys.exit()

if args.output == "-":
    out = sys.stdout
else:
    out = open(args.output, "w")


data = {}
data["items"] = items = []
for i in args.input:
    with open(i) as f:
        for item in microdata.get_items(f):