def removeSVGFile(svgFilePath): 'Remove svg file.' if archive.getEndsWithList(svgFilePath, [ '_bottom.svg', '_carve.svg', '_chop.svg', '_cleave.svg', '_scale.svg', '_vectorwrite.svg' ]): os.remove(svgFilePath) print('removeGeneratedFiles deleted ' + svgFilePath)
def removeGeneratedFiles(): 'Remove generated files.' gcodeFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively(['gcode']) for gcodeFilePath in gcodeFilePaths: if 'alterations' not in gcodeFilePath: os.remove(gcodeFilePath) print('removeGeneratedFiles deleted ' + gcodeFilePath) svgFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively(['svg']) for svgFilePath in svgFilePaths: if archive.getEndsWithList(svgFilePath, ['_bottom.svg', '_carve.svg', '_chop.svg', '_cleave.svg']): os.remove(svgFilePath) print('removeGeneratedFiles deleted ' + svgFilePath) xmlFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively(['xml']) for xmlFilePath in xmlFilePaths: if archive.getEndsWithList(xmlFilePath, ['_interpret.xml']): os.remove(xmlFilePath) print('removeGeneratedFiles deleted ' + xmlFilePath) archive.removeBackupFilesByTypes(['gcode', 'svg', 'xml'])
def removeGeneratedFiles(): "Remove generated files." gcodeFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively(["gcode"]) for gcodeFilePath in gcodeFilePaths: if "alterations" not in gcodeFilePath: os.remove(gcodeFilePath) print("removeGeneratedFiles deleted " + gcodeFilePath) svgFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively(["svg"]) for svgFilePath in svgFilePaths: if archive.getEndsWithList(svgFilePath, ["_bottom.svg", "_carve.svg", "_chop.svg", "_cleave.svg"]): os.remove(svgFilePath) print("removeGeneratedFiles deleted " + svgFilePath) xmlFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively(["xml"]) for xmlFilePath in xmlFilePaths: if archive.getEndsWithList(xmlFilePath, ["_interpret.xml"]): os.remove(xmlFilePath) print("removeGeneratedFiles deleted " + xmlFilePath) archive.removeBackupFilesByTypes(["gcode", "svg", "xml"])
def removeGeneratedFiles(): 'Remove generated files.' gcodeFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively( ['gcode']) for gcodeFilePath in gcodeFilePaths: if 'alterations' not in gcodeFilePath: os.remove(gcodeFilePath) print('removeGeneratedFiles deleted ' + gcodeFilePath) svgFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively( ['svg']) for svgFilePath in svgFilePaths: if archive.getEndsWithList( svgFilePath, ['_bottom.svg', '_carve.svg', '_chop.svg', '_cleave.svg']): os.remove(svgFilePath) print('removeGeneratedFiles deleted ' + svgFilePath) xmlFilePaths = archive.getFilesWithFileTypesWithoutWordsRecursively( ['xml']) for xmlFilePath in xmlFilePaths: if archive.getEndsWithList(xmlFilePath, ['_interpret.xml']): os.remove(xmlFilePath) print('removeGeneratedFiles deleted ' + xmlFilePath) archive.removeBackupFilesByTypes(['gcode', 'svg', 'xml'])
def removeXMLFile(xmlFilePath): 'Remove xml file.' if archive.getEndsWithList(xmlFilePath, ['_interpret.xml']): os.remove(xmlFilePath) print('removeGeneratedFiles deleted ' + xmlFilePath)
def removeSVGFile(svgFilePath): 'Remove svg file.' if archive.getEndsWithList(svgFilePath, ['_bottom.svg', '_carve.svg', '_chop.svg', '_cleave.svg', '_scale.svg', '_vectorwrite.svg']): os.remove(svgFilePath) print('removeGeneratedFiles deleted ' + svgFilePath)