19 """Handle command line arguments and call meta_diff"""
21 parser = argparse.ArgumentParser(
22 description=
"Compare the metadata content of two files"
29 help=
"The names of two files to compare",
36 help=
"print detailed output on screen",
43 help=
"When comparing lists, check the element order too.",
50 help=
"Allows filtering by regex instead of by plain string",
57 help=
"Show only the keys and not the difference",
66 help=
"Keys to drop from metadata retrieved from file. Separe nested dictionary keys using '.'. An '*' matches any key.",
75 choices=[
"tiny",
"lite",
"full",
"peeker"],
77 This flag provides the user capability to select the amount of
78 metadata retrieved. There are four options:
79 tiny (only those values used in PyJobTransforms),
82 and full ( all available data found)
92 choices=[
"POOL",
"BS"],
94 The file type of the input filename. By default, it tries to
95 determine itself the file type of the input.
106 help=
"Expression to select specific metadata fields to retrieve.",
114 choices=[
"simple",
"diff"],
115 help=
"Switch between 'simple' or 'diff' style differences ",
122 help=
"Force promotion or not of the metadata keys ",
128 help=
"Ignore trigger metadata",
131 args = parser.parse_args()
133 if len(args.files) != 2:
134 print(
"you must supply two files to compare")
137 for file_name
in args.files:
138 if not os.path.exists(file_name):
139 print(
"File does not exists: {}".
format(file_name))
145 verbose=args.verbose,
146 ordered=args.ordered,
149 meta_key_filter=args.filter,
151 promote=args.promote,
152 diff_format=args.diff_format,
154 key_only=args.key_only,
155 ignore_trigger=args.ignoreTrigger,