diff --git a/.forgejo/workflows/update.yaml b/.forgejo/workflows/update.yaml index 84756f1..79207fb 100644 --- a/.forgejo/workflows/update.yaml +++ b/.forgejo/workflows/update.yaml @@ -24,8 +24,9 @@ jobs: python3 $file elif [[ $extension == "ifc" ]] then - echo "exec ifc file" - python3 $file + echo "ifc file" + echo "exec extract $file" + python3 extract.py $file else echo $extension fi diff --git a/python/extract.py b/python/extract.py index bb91c95..52e05cd 100644 --- a/python/extract.py +++ b/python/extract.py @@ -118,13 +118,18 @@ if len(sys.argv) == 1: filename = "duplex" p = "/home/fordj/SOURCES/FORDJ/fordjx/hackathon-zurich/ifc/" + filename + ".ifc" compute_server(filename,p) -# Local +# Local or Server (extract filename) elif len(sys.argv) > 1: + use_local = False filename = sys.argv[1] print(f">> filename:{filename}") - p = "../ifc/" + filename + ".ifc" if os.path.exists(p): - compute_local(filename,p) + if use_local: + p = "../ifc/" + filename + ".ifc" + compute_local(filename,p) + else: + p = "/home/fordj/SOURCES/FORDJ/fordjx/hackathon-zurich/ifc/" + filename + ".ifc" + compute_server(filename,p) else: print(os.listdir("../ifc")) else: