Updated to include output folder af_labels

This commit is contained in:
Jeff MacKinnon 2025-01-31 12:37:43 -04:00
parent 627c1db037
commit f8c9f20762

View file

@ -85,7 +85,7 @@ def af_label(equipment,working_distance,incident_energy,af_boundary,energy_level
with open(filename, mode="w", encoding="utf-8") as message: with open(filename, mode="w", encoding="utf-8") as message:
message.write(content) message.write(content)
def af_labels(results_csv,author="JMK Engineering Inc.",warning="warning",project="Arc Flash Warning Label",project_num="2500",DC=False,fixedElectrode = True, SI=True,project_year=2015,test=False): def af_labels(results_csv,author="JMK Engineering Inc.",warning="warning",project="Arc Flash Warning Label",project_num="2500",DC=False,fixedElectrode = True, SI=True,project_year=2015,output_folder='',test=False):
from datetime import date from datetime import date
date = date.today() date = date.today()
@ -148,9 +148,9 @@ def af_labels(results_csv,author="JMK Engineering Inc.",warning="warning",projec
#template = environment.get_template("testblock.txt") #template = environment.get_template("testblock.txt")
if test == True: if test == True:
filename = "test"+str(date) + "-"+project_num+"-label-ArcFlash.tex" filename = output_folder +"test"+str(date) + "-"+project_num+"-label-ArcFlash.tex"
else: else:
filename = str(date) + "-"+project_num+"-label-ArcFlash.tex" filename = output_folder+str(date) + "-"+project_num+"-label-ArcFlash.tex"
context = {"results":results,"project":label_info} context = {"results":results,"project":label_info}