make ifcpatch callable from command line (#1317)

This commit is contained in:
Long
2021-02-13 06:06:15 +07:00
committed by GitHub
parent 20fe48bd6a
commit 7de3eec1b1
2 changed files with 9 additions and 1 deletions
+5 -1
View File
@@ -30,7 +30,7 @@ def execute(args, is_library=None):
ifc_file.write(args["output"])
if __name__ == "__main__":
def main():
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("-o", "--output", type=str, help="The output file to save the patched IFC")
@@ -42,3 +42,7 @@ if __name__ == "__main__":
execute(args)
print("# All tasks are complete :-)")
if __name__ == "__main__":
main()
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env python3
import ifcpatch
ifcpatch.main()