23 lines
694 B
Python
23 lines
694 B
Python
# example: .\run.py path\Part1
|
|
import os
|
|
import sys
|
|
import pathlib
|
|
import subprocess
|
|
from rich.progress import track
|
|
|
|
# folder input
|
|
if(sys.argv[1]):
|
|
pass
|
|
|
|
|
|
|
|
files = sys.argv[1:] # take files given in input
|
|
currentPath = str(pathlib.Path().resolve())
|
|
|
|
for i in track(files, description="Exporting...", total=len(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)
|