20 lines
607 B
Python
20 lines
607 B
Python
# example: .\run.py path\Part1
|
|
import os
|
|
import sys
|
|
import pathlib
|
|
import subprocess
|
|
|
|
# folder input
|
|
if(sys.argv[1]):
|
|
pass
|
|
|
|
files = sys.argv[1:] # take files given in input
|
|
currentPath = str(pathlib.Path().resolve())
|
|
|
|
for i in files:
|
|
input = str(i)
|
|
commandstep = "PowerShell -NoProfile -ExecutionPolicy Bypass -File " + currentPath + "\export-step.ps1 " + input
|
|
commandPdfDxf = "PowerShell -NoProfile -ExecutionPolicy Bypass -File " + currentPath + "\export-pdf-dxf.ps1 " + input
|
|
subprocess.run(commandstep, capture_output=True)
|
|
subprocess.run(commandPdfDxf, capture_output=True)
|