mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 18:12:28 +00:00
make ifcpatch callable from command line (#1317)
This commit is contained in:
@@ -30,7 +30,7 @@ def execute(args, is_library=None):
|
|||||||
ifc_file.write(args["output"])
|
ifc_file.write(args["output"])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Patches IFC files to fix badly formatted data")
|
parser = argparse.ArgumentParser(description="Patches IFC files to fix badly formatted data")
|
||||||
parser.add_argument("-i", "--input", type=str, required=True, help="The IFC file to patch")
|
parser.add_argument("-i", "--input", type=str, required=True, help="The IFC file to patch")
|
||||||
parser.add_argument("-o", "--output", type=str, help="The output file to save the patched IFC")
|
parser.add_argument("-o", "--output", type=str, help="The output file to save the patched IFC")
|
||||||
@@ -42,3 +42,7 @@ if __name__ == "__main__":
|
|||||||
execute(args)
|
execute(args)
|
||||||
|
|
||||||
print("# All tasks are complete :-)")
|
print("# All tasks are complete :-)")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import ifcpatch
|
||||||
|
|
||||||
|
ifcpatch.main()
|
||||||
Reference in New Issue
Block a user