Example #1
0
def main():
	"Display the skeinforge dialog."
	parser = OptionParser()
	parser.add_option("-p", "--prefdir", help="set path to preference directory",
		action="store", type="string", dest="preferencesDirectory")
	parser.add_option("-s", "--start", help="set start file to use",
		action="store", type="string", dest="startFile")
	parser.add_option("-e", "--end", help="set end file to use",
		action="store", type="string", dest="endFile")
	parser.add_option("-o", "--option", 
		help='set an individual option in the format "module:preference=value"',
		action="append", type="string", dest="preferences")

	(options, args) = parser.parse_args()
	defaultStart = 'start.txt'
	defaultEnd = 'end.txt'
	if options.preferencesDirectory:
		pdir = options.preferencesDirectory;
		archive.setSettingsPath(pdir)
	if options.preferences:
		for prefSpec in options.preferences:
			(moduleName,prefSpec) = prefSpec.split(":",1)
			(prefName,valueName) = prefSpec.split("=",1)
			settings.addPreferenceOverride(moduleName,prefName,valueName)

	sys.argv = [sys.argv[0]] + args
	if len( args ) > 0:
		writeOutput( ' '.join(args) )
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #2
0
def main():
	'Display the skeinforge dialog.'
	parser = OptionParser()
	parser.add_option(
		'-p', '--prefdir', help='set path to preference directory', action='store', type='string', dest='preferencesDirectory')
	parser.add_option(
		'-s', '--start', help='set start file to use', action='store', type='string', dest='startFile')
	parser.add_option(
		'-e', '--end', help='set end file to use',	action='store', type='string', dest='endFile')
	parser.add_option(
		'-o', '--option', help='set an individual option in the format "module:preference=value"',
		action='append', type='string', dest='preferences')
	(options, args) = parser.parse_args()
	if options.preferencesDirectory:
		archive.globalTemporarySettingsPath = options.preferencesDirectory
	if options.preferences:
		for prefSpec in options.preferences:
			(moduleName, prefSpec) = prefSpec.split(':', 1)
			(prefName, valueName) = prefSpec.split('=', 1)
			settings.addPreferenceOverride(moduleName, prefName, valueName)
	sys.argv = [sys.argv[0]] + args
	if len( args ) > 0:
		writeOutput( ' '.join(args) )
	else:
		settings.startMainLoopFromConstructor(getNewRepository())
Example #3
0
def forwardDeclartions():
	"Force some functions to be dynamic"
	mockRepository = settings.Repository()
	settings.addListsToRepository(None, None, mockRepository)
	settings.cancelRepository(mockRepository)
	settings.getDisplayedDialogFromConstructor(mockRepository)
	settings.getProfileBaseName(mockRepository)
	settings.getReadRepository(mockRepository)
	settings.readSettingsFromText(mockRepository, '')
	settings.saveRepository(mockRepository)
	settings.startMainLoopFromConstructor(mockRepository)
	settings.writeSettings(mockRepository)
	settings.writeSettingsPrintMessage(mockRepository)
	settings.StringSetting().getFromValue('', mockRepository, '')
	settings.StringSetting().getFromValueOnly('', mockRepository, '')
	settings.StringSetting().getFromValueOnlyAddToRepository('', mockRepository, '')
	settings.FileNameInput().getFromFileName([('','')], '', mockRepository, '')
	settings.GridVertical(0, 0).setExecutablesRepository(mockRepository)
	settings.HelpPage().setToNameRepository('', mockRepository)
	settings.HelpPage().getFromNameAfterWWW('', '', mockRepository)
	settings.HelpPage().getFromNameAfterHTTP('', '', mockRepository)
	settings.HelpPage().getFromNameSubName('', mockRepository, '')
	settings.HelpPageRepository.__init__(settings.HelpPageRepository(), mockRepository)
	settings.LabelDisplay().getFromName('', mockRepository)
	settings.LabelSeparator().getFromRepository(mockRepository)
	settings.MenuButtonDisplay().getFromName('', mockRepository)
	settings.Radio().getFromRadio(None, '', mockRepository, False)
	settings.WindowPosition().getFromValue(mockRepository, '')
	settings.RepositoryDialog(mockRepository, None).addButtons(mockRepository, None)
	settings.RepositoryDialog.__init__(RepositoryDialog(), mockRepository, None)
	gcodec.Plugins.add(settings.Plugin())
	Tkinter.Button.__init__(None, {})
Example #4
0
def main():
    "Display the export dialog."
    if len(sys.argv) > 1:
        ExtrusionPlugin().writeOutput(' '.join(sys.argv[1:]))
    else:
        settings.startMainLoopFromConstructor(
            ExtrusionPlugin().getNewRepository())
def main():
	"Display the skeinforge dialog."
#	if len(sys.argv) > 1:
#		writeOutput(' '.join(sys.argv[1 :]))
	parser = OptionParser()
	parser.add_option("-p", "--prefdir", help="set path to preference directory",
		action="store", type="string", dest="preferencesDirectory")
	parser.add_option("-s", "--start", help="set start file to use",
		action="store", type="string", dest="startFile")
	parser.add_option("-e", "--end", help="set end file to use",
		action="store", type="string", dest="endFile")
	parser.add_option("--raft", action="store_true", dest="useRaft")
	parser.add_option("--no-raft", action="store_false", dest="useRaft")
	(options, args) = parser.parse_args()
	defaultStart = 'start.txt'
	defaultEnd = 'end.txt'
	if options.preferencesDirectory:
		pdir = options.preferencesDirectory;
		archive.setSettingsPath(pdir)
#	if options.startFile:
#		preferences.setStartFile(options.startFile)
#	else:
#		preferences.setStartFile(defaultStart)
#	if options.endFile:
#		preferences.setEndFile(options.endFile)
#	else:
#		preferences.setEndFile(defaultEnd)
	if options.useRaft != None:
		if options.useRaft:
#			preferences.addPreferenceOverride("Raft", "Activate Raft:", "true")
#			preferences.addPreferenceOverride("Raftless", "Activate Raftless:", "false")
			settings.addPreferenceOverride("raft.csv", "Activate Raft", "true")
		else:
#			preferences.addPreferenceOverride("Raft", "Activate Raft:", "false")
#			preferences.addPreferenceOverride("Raftless", "Activate Raftless:", "true")
			settings.addPreferenceOverride("raft.csv", "Activate Raft", "false")

	sys.argv = [sys.argv[0]] + args
	if len( args ) > 0:
		writeOutput( ' '.join(args) )
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #6
0
def main():
	"Display the statistics dialog."
	if len( sys.argv ) > 1:
		analyzeFile( ' '.join( sys.argv[ 1 : ] ) )
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #7
0
def main():
    "Display the mill dialog."
    if len(sys.argv) > 1:
        writeOutput(" ".join(sys.argv[1:]))
    else:
        settings.startMainLoopFromConstructor(MillRepository())
Example #8
0
def main():
    'Display the olddimension dialog.'
    if len(sys.argv) > 1:
        writeOutput(' '.join(sys.argv[1:]))
    else:
        settings.startMainLoopFromConstructor(getNewRepository())
Example #9
0
def main():
	"""Display the craft dialog."""
	if len(sys.argv) > 1:
		settings.startMainLoopFromWindow(writeOutput(' '.join(sys.argv[1 :])))
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #10
0
def main():
	"Display the behold dialog."
	if len( sys.argv ) > 1:
		tableau.startMainLoopFromWindow( getWindowAnalyzeFile(' '.join( sys.argv[1 :] ) ) )
	else:
		settings.startMainLoopFromConstructor( BeholdRepository() )
Example #11
0
def main():
    "Display the home dialog."
    if len(sys.argv) > 1:
        writeOutput(' '.join(sys.argv[1:]))
    else:
        settings.startMainLoopFromConstructor(getNewRepository())
Example #12
0
def writeOutput(fileName):
	'Craft a file, display dialog.'
	repository = getNewRepository()
	repository.fileNameInput.value = fileName
	repository.execute()
	settings.startMainLoopFromConstructor(repository)
def main():
	"Display the vectorwrite dialog."
	if len( sys.argv ) > 1:
		getWindowAnalyzeFile(' '.join( sys.argv[1 :] ) )
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #14
0
def main():
	"Display the meta dialog."
	settings.startMainLoopFromConstructor( MetaPlugin.getNewRepository() )
Example #15
0
File: meta.py Project: Sciumo/SFACT
def main():
	"""Display the meta dialog."""
	settings.startMainLoopFromConstructor( getNewRepository() )
Example #16
0
def main():
	"Display the file or directory dialog."
	settings.startMainLoopFromConstructor( skeinforge_polyfile.PolyfileRepository() )
Example #17
0
def main():
	"Display the behold dialog."
	if len( sys.argv ) > 1:
		tableau.startMainLoopFromWindow( getWindowAnalyzeFile(' '.join( sys.argv[1 :] ) ) )
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #18
0
def main():
	"Display the skeiniso dialog."
	if len(sys.argv) > 1:
		settings.startMainLoopFromWindow( getWindowAnalyzeFile(' '.join(sys.argv[1 :])) )
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #19
0
def main():
    """Display the dimension dialog."""
    if len(sys.argv) > 1:
        writeOutput(" ".join(sys.argv[1:]))
    else:
        settings.startMainLoopFromConstructor(getNewRepository())
Example #20
0
def main():
	"Display the analyze dialog."
	if len( sys.argv ) > 1:
		writeOutput(' '.join( sys.argv[1 :] ), 'gcode' )
	else:
		settings.startMainLoopFromConstructor( AnalyzePlugin().getNewRepository() )
Example #21
0
def main():
    "Display the file or directory dialog."
    settings.startMainLoopFromConstructor(getNewRepository())
Example #22
0
def main():
	"Display the profile dialog."
	settings.startMainLoopFromConstructor( skeinforge_profile.getNewRepository() )
Example #23
0
def main():
	"Display the temperature dialog."
	if len( sys.argv ) > 1:
		writeOutput(' '.join( sys.argv[1 :] ) )
	else:
		settings.startMainLoopFromConstructor( TemperatureRepository() )
Example #24
0
def main():
	"Display the skeinview dialog."
	if len( sys.argv ) > 1:
		analyzeFile( ' '.join( sys.argv[ 1 : ] ) )
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #25
0
def writeOutput(fileName):
	"Analyze a gcode file."
	repository = getNewRepository()
	repository.fileNameInput.value = fileName
	repository.execute()
	settings.startMainLoopFromConstructor(repository)
Example #26
0
def writeOutput(fileName):
	'Craft a file, display dialog.'
	repository = getNewRepository()
	repository.fileNameInput.value = fileName
	repository.execute()
	settings.startMainLoopFromConstructor(repository)
Example #27
0
def main():
	"Display the interpret dialog."
	if len(sys.argv) > 1:
		fabmetheus_interpret.getWindowAnalyzeFile(' '.join(sys.argv[1 :]))
	else:
		settings.startMainLoopFromConstructor(getNewRepository())
Example #28
0
def main():
	'Display the photograph dialog.'
	if len(sys.argv) > 1:
		writeOutput(' '.join(sys.argv[1 :]))
	else:
		settings.startMainLoopFromConstructor(getNewRepository())
Example #29
0
def main():
	"""Display the vectorwrite dialog."""
	if len(sys.argv) > 1:
		getWindowAnalyzeFile(' '.join(sys.argv[1 :]))
	else:
		settings.startMainLoopFromConstructor( getNewRepository() )
Example #30
0
def main():
	"Display the interpret dialog."
	if len(sys.argv) > 1:
		fabmetheus_interpret.getWindowAnalyzeFile(' '.join(sys.argv[1 :]))
	else:
		settings.startMainLoopFromConstructor(getNewRepository())
Example #31
0
def main():
	'Display the clairvoyance dialog.'
	if len(sys.argv) > 1:
		getWindowAnalyzeFile(' '.join(sys.argv[1 :]))
	else:
		settings.startMainLoopFromConstructor(getNewRepository())
Example #32
0
def main():
	"Display the carve dialog."
	if len( sys.argv ) > 1:
		CarvePlugin().writeOutput(' '.join( sys.argv[1 :] ) )
	else:
		settings.startMainLoopFromConstructor( CarvePlugin().CarveRepository() )
Example #33
0
def main():
	"Display the file or directory dialog."
	settings.startMainLoopFromConstructor( getNewRepository() )
Example #34
0
def writeOutput(fileName):
    "Analyze a gcode file."
    repository = getNewRepository()
    repository.fileNameInput.value = fileName
    repository.execute()
    settings.startMainLoopFromConstructor(repository)
Example #35
0
def main():
    "Display the comment dialog."
    if len(sys.argv) > 1:
        getWindowAnalyzeFile(" ".join(sys.argv[1:]))
    else:
        settings.startMainLoopFromConstructor(getNewRepository())
Example #36
0
def main():
    'Display the synopsis dialog.'
    if len(sys.argv) > 1:
        getWindowAnalyzeFile(' '.join(sys.argv[1:]))
    else:
        settings.startMainLoopFromConstructor(getNewRepository())
Example #37
0
def main():
	"Display the scale dialog."
	if len(sys.argv) > 1:
		writeOutput(' '.join(sys.argv[1 :]))
	else:
		settings.startMainLoopFromConstructor(getNewRepository())
Example #38
0
def main():
	"Display the help dialog."
	settings.startMainLoopFromConstructor( HelpPlugin.getNewRepository() )