@@ -56,7 +56,8 @@ def bomToCsv(bomData, filename):
5656 writer .writerow ([value , "," .join (refChunk ), footprint , lcsc ])
5757
5858def exportJlcpcb (board , outputdir , assembly , schematic , ignore , field ,
59- corrections , correctionpatterns , missingerror , nametemplate , drc ):
59+ corrections , correctionpatterns , missingerror , nametemplate , drc ,
60+ autoname ):
6061 """
6162 Prepare fabrication files for JLCPCB including their assembly service
6263 """
@@ -74,7 +75,11 @@ def exportJlcpcb(board, outputdir, assembly, schematic, ignore, field,
7475 shutil .rmtree (gerberdir , ignore_errors = True )
7576 gerberImpl (board , gerberdir )
7677
77- archiveName = expandNameTemplate (nametemplate , "gerbers" , loadedBoard )
78+ if autoname :
79+ boardName = os .path .basename (board .replace (".kicad_pcb" , "" ))
80+ archiveName = expandNameTemplate (nametemplate , boardName + "-gerbers" , loadedBoard )
81+ else :
82+ archiveName = expandNameTemplate (nametemplate , "gerbers" , loadedBoard )
7883 shutil .make_archive (os .path .join (outputdir , archiveName ), "zip" , outputdir , "gerber" )
7984
8085 if not assembly :
0 commit comments