mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Inform about supported reporter types in IfcTester
This commit is contained in:
@@ -52,20 +52,21 @@ if args.ifc:
|
|||||||
specs.validate(ifc)
|
specs.validate(ifc)
|
||||||
print("Finished validating:", time.time() - start)
|
print("Finished validating:", time.time() - start)
|
||||||
|
|
||||||
if args.reporter == "Console":
|
reporter_types = {
|
||||||
engine = reporter.Console(specs, use_colour=not args.no_color)
|
"Console": lambda: reporter.Console(specs, use_colour=not args.no_color),
|
||||||
elif args.reporter == "Txt":
|
"Txt": lambda: reporter.Txt(specs),
|
||||||
engine = reporter.Txt(specs)
|
"Json": lambda: reporter.Json(specs),
|
||||||
elif args.reporter == "Json":
|
"Html": lambda: reporter.Html(specs),
|
||||||
engine = reporter.Json(specs)
|
"Ods": lambda: reporter.Ods(specs, excel_safe=args.excel_safe),
|
||||||
elif args.reporter == "Html":
|
"OdsSummary": lambda: reporter.OdsSummary(specs, excel_safe=args.excel_safe),
|
||||||
engine = reporter.Html(specs)
|
"Bcf": lambda: reporter.Bcf(specs),
|
||||||
elif args.reporter == "Ods":
|
}
|
||||||
engine = reporter.Ods(specs, excel_safe=args.excel_safe)
|
|
||||||
elif args.reporter == "OdsSummary":
|
engine = reporter_types.get(args.reporter)
|
||||||
engine = reporter.OdsSummary(specs, excel_safe=args.excel_safe)
|
if engine is None:
|
||||||
elif args.reporter == "Bcf":
|
raise Exception(f"Expected one one of the following values for reporter: {', '.join(reporter_types)}")
|
||||||
engine = reporter.Bcf(specs)
|
|
||||||
|
engine = engine()
|
||||||
|
|
||||||
engine.report()
|
engine.report()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user