Esempio n. 1
0
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 ')
Esempio n. 2
0
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 ' )
Esempio n. 3
0
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 ' )
Esempio n. 4
0
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 ')
Esempio n. 5
0
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 ')
Esempio n. 6
0
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 ' )
Esempio n. 7
0
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 ' )