本文整理汇总了Python中skeinforge_tools.skeinforge_utilities.settings.getReadRepository函数的典型用法代码示例。如果您正苦于以下问题:Python getReadRepository函数的具体用法?Python getReadRepository怎么用?Python getReadRepository使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getReadRepository函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getOutput
def getOutput( gcodeText, binary16ByteRepository = None ):
"Get the exported version of a gcode file. This function, isReplaceable and if it's output is not replaceable, writeOutput are the only necessary functions in a skeinforge export plugin."
if gcodeText == '':
return ''
if binary16ByteRepository == None:
binary16ByteRepository = Binary16ByteRepository()
settings.getReadRepository( binary16ByteRepository )
return Binary16ByteSkein().getCraftedGcode( gcodeText, binary16ByteRepository )
示例2: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write the exported version of a gcode file."
binary16ByteRepository = Binary16ByteRepository()
settings.getReadRepository( binary16ByteRepository )
gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
skeinOutput = getOutput( gcodeText, binary16ByteRepository )
suffixFileName = fileName[ : fileName.rfind( '.' ) ] + '.' + binary16ByteRepository.fileExtension.value
gcodec.writeFileText( suffixFileName, skeinOutput )
print( 'The converted file is saved as ' + gcodec.getSummarizedFileName( suffixFileName ) )
示例3: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write the exported version of a gcode file."
gcodeText = gcodec.getGcodeFileText( fileName, gcodeText )
repository = GcodeStepRepository()
settings.getReadRepository( repository )
output = getOutput( gcodeText, repository )
suffixFileName = fileName[ : fileName.rfind( '.' ) ] + '_gcode_step.gcode'
gcodec.writeFileText( suffixFileName, output )
print( 'The converted file is saved as ' + gcodec.getSummarizedFileName( suffixFileName ) )
示例4: getCraftedTextFromFileName
def getCraftedTextFromFileName(fileName, repository=None):
"Chop a shape file."
carving = svg_codec.getCarving(fileName)
if carving == None:
return ""
if repository == None:
repository = ChopRepository()
settings.getReadRepository(repository)
return ChopSkein().getCarvedSVG(carving, fileName, repository)
示例5: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write statistics for a skeinforge gcode file, if 'Write Statistics File for Skeinforge Chain' is selected."
repository = settings.getReadRepository( StatisticRepository() )
if gcodeText == '':
gcodeText = gcodec.getFileText( fileName )
if repository.activateStatistic.value:
analyzeFileGivenText( fileName, gcodeText, repository )
示例6: getCraftedTextFromText
def getCraftedTextFromText( gcodeText, repository = None ):
"Inset the preface gcode text."
if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'inset' ):
return gcodeText
if repository == None:
repository = settings.getReadRepository( InsetRepository() )
return InsetSkein().getCraftedGcode( gcodeText, repository )
示例7: getCraftedTextFromText
def getCraftedTextFromText( text, prefaceRepository = None ):
"Preface and convert an svg text."
if gcodec.isProcedureDoneOrFileIsEmpty( text, 'preface' ):
return text
if prefaceRepository == None:
prefaceRepository = settings.getReadRepository( PrefaceRepository() )
return PrefaceSkein().getCraftedGcode( prefaceRepository, text )
示例8: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write scalable vector graphics for a skeinforge gcode file, if activate vectorwrite is selected."
repository = settings.getReadRepository( VectorwriteRepository() )
if not repository.activateVectorwrite.value:
return
gcodeText = gcodec.getTextIfEmpty( fileName, gcodeText )
analyzeFileGivenText( fileName, gcodeText, repository )
示例9: writeOutput
def writeOutput( fileName, gcodeText = '' ):
"Write a commented gcode file for a skeinforge gcode file, if 'Write Commented File for Skeinforge Chain' is selected."
repository = settings.getReadRepository( CommentRepository() )
if gcodeText == '':
gcodeText = gcodec.getFileText( fileName )
if repository.activateComment.value:
analyzeFileGivenText( fileName, gcodeText )
示例10: analyzeFileGivenText
def analyzeFileGivenText( fileName, gcodeText, repository = None ):
"Display a beholded gcode file for a gcode file."
if gcodeText == '':
return ''
if repository == None:
repository = settings.getReadRepository( BeholdRepository() )
skeinWindow = getWindowGivenTextRepository( fileName, gcodeText, repository )
skeinWindow.updateDeiconify()
示例11: analyzeFileGivenText
def analyzeFileGivenText( fileName, gcodeText, repository = None ):
"Display a gcode file in a skeinview window given the text."
if gcodeText == '':
return
if repository == None:
repository = settings.getReadRepository( SkeinviewRepository() )
skeinWindow = getWindowGivenTextRepository( fileName, gcodeText, repository )
skeinWindow.updateDeiconify()
示例12: getCraftedTextFromText
def getCraftedTextFromText( gcodeText, repository = None ):
"Outset the preface gcode text."
if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'outset' ):
return gcodeText
if repository == None:
repository = settings.getReadRepository( OutsetRepository() )
if not repository.activateOutset.value:
return gcodeText
return OutsetSkein().getCraftedGcode( gcodeText, repository )
示例13: getCraftedTextFromText
def getCraftedTextFromText(gcodeText, jitterRepository=None):
"Jitter a gcode linear move text."
if gcodec.isProcedureDoneOrFileIsEmpty(gcodeText, "jitter"):
return gcodeText
if jitterRepository == None:
jitterRepository = settings.getReadRepository(JitterRepository())
if not jitterRepository.activateJitter.value:
return gcodeText
return JitterSkein().getCraftedGcode(jitterRepository, gcodeText)
示例14: getCraftedTextFromText
def getCraftedTextFromText( gcodeText, exportRepository = None ):
"Export a gcode linear move text."
if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'export' ):
return gcodeText
if exportRepository == None:
exportRepository = settings.getReadRepository( ExportRepository() )
if not exportRepository.activateExport.value:
return gcodeText
return ExportSkein().getCraftedGcode( exportRepository, gcodeText )
示例15: getCraftedTextFromText
def getCraftedTextFromText( gcodeText, oozebaneRepository = None ):
"Oozebane a gcode linear move text."
if gcodec.isProcedureDoneOrFileIsEmpty( gcodeText, 'oozebane' ):
return gcodeText
if oozebaneRepository == None:
oozebaneRepository = settings.getReadRepository( OozebaneRepository() )
if not oozebaneRepository.activateOozebane.value:
return gcodeText
return OozebaneSkein().getCraftedGcode( gcodeText, oozebaneRepository )