def analyzeFileGivenText(fileName, gcodeText): "Write a commented gcode file for a gcode file." skein = CommentSkein() skein.parseGcode(gcodeText) gcodec.writeFileMessageEnd('_comment.gcode', fileName, skein.output.getvalue(), 'The commented file is saved as ')
def writeStatisticFileGivenText( fileName, gcodeText, statisticPreferences ): "Write statistics for a gcode file." print( 'Statistics are being generated for the file ' + gcodec.getSummarizedFilename( fileName ) ) statisticGcode = getStatisticGcode( gcodeText ) if statisticPreferences.printStatistics.value: print( statisticGcode ) if statisticPreferences.saveStatistics.value: gcodec.writeFileMessageEnd( '.txt', fileName, statisticGcode, 'The statistics file is saved as ' )
def analyzeFileGivenText( fileName, gcodeText, repository = None ): "Write statistics for a gcode file." print( '' ) print( '' ) print( 'Statistics are being generated for the file ' + gcodec.getSummarizedFileName( fileName ) ) if repository == None: repository = settings.getReadRepository( StatisticRepository() ) skein = StatisticSkein() statisticGcode = skein.getCraftedGcode( gcodeText, repository ) if repository.printStatistics.value: print( statisticGcode ) if repository.saveStatistics.value: gcodec.writeFileMessageEnd( '.txt', fileName, statisticGcode, 'The statistics file is saved as ' )
def analyzeFileGivenText(fileName, gcodeText, repository=None): "Write statistics for a gcode file." print('') print('') print('Statistics are being generated for the file ' + gcodec.getSummarizedFileName(fileName)) if repository == None: repository = settings.getReadRepository(StatisticRepository()) skein = StatisticSkein() statisticGcode = skein.getCraftedGcode(gcodeText, repository) if repository.printStatistics.value: print(statisticGcode) if repository.saveStatistics.value: gcodec.writeFileMessageEnd('.txt', fileName, statisticGcode, 'The statistics file is saved as ')
def writeCommentFileGivenText(fileName, gcodeText): "Write a commented gcode file for a gcode file." gcodec.writeFileMessageEnd('_comment.gcode', fileName, getCommentGcode(gcodeText), 'The commented file is saved as ')
def writeCommentFileGivenText( fileName, gcodeText ): "Write a commented gcode file for a gcode file." gcodec.writeFileMessageEnd( '_comment.gcode', fileName, getCommentGcode( gcodeText ), 'The commented file is saved as ' )
def analyzeFileGivenText( fileName, gcodeText ): "Write a commented gcode file for a gcode file." skein = CommentSkein() skein.parseGcode( gcodeText ) gcodec.writeFileMessageEnd( '_comment.gcode', fileName, skein.output.getvalue(), 'The commented file is saved as ' )