chiark / gitweb /
Support loading a profile ini file from the commandline.
authordaid <daid303@gmail.com>
Wed, 16 May 2012 11:52:42 +0000 (13:52 +0200)
committerdaid <daid303@gmail.com>
Wed, 16 May 2012 11:52:42 +0000 (13:52 +0200)
Cura/cura.py

index 14dc53b1e5cb6ef968a08bb2228d077c569bea73..8e86f7bcca4e845507f6b48e0a716544b9e35e21 100644 (file)
@@ -45,12 +45,15 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp
 
 def main():
        parser = OptionParser(usage="usage: %prog [options] <filename>.stl")
-       parser.add_option("-p", "--profile", action="store", type="string", dest="profile", help="Use these profile settings instead of loading current_profile.ini")
+       parser.add_option("-i", "--ini", action="store", type="string", dest="profileini", help="Load settings from a profile ini file")
        parser.add_option("-P", "--project", action="store_true", dest="openprojectplanner", help="Open the project planner")
        parser.add_option("-r", "--print", action="store", type="string", dest="printfile", help="Open the printing interface, instead of the normal cura interface.")
+       parser.add_option("-p", "--profile", action="store", type="string", dest="profile", help="Internal option, do not use!")
        (options, args) = parser.parse_args()
        if options.profile != None:
                profile.loadGlobalProfileFromString(options.profile)
+       if options.profileini != None:
+               profile.loadGlobalProfile(options.profileini)
        if options.openprojectplanner != None:
                from gui import projectPlanner
                projectPlanner.main()