chiark / gitweb /
Merge upstream, fixed conflicts, showing complete toolbar at bottom of preview
[cura.git] / Cura / cura.py
1 #!/usr/bin/python
2 """
3 This page is in the table of contents.
4 ==Overview==
5 ===Introduction===
6 Cura is a GPL tool chain to forge a gcode skein for a model. Based on Skeinforge.
7
8 The slicing code is the same as Skeinforge. But the UI has been revamped to be... sane.
9
10 """
11
12 from __future__ import absolute_import
13 import __init__
14
15 import sys
16 import platform
17 from optparse import OptionParser
18
19 from util import profile
20 from util import sliceRun
21
22 __author__ = 'Daid'
23 __credits__ = """
24 Enrique Perez (perez_enrique@yahoo.com)
25 Adrian Bowyer <http://forums.reprap.org/profile.php?12,13>
26 Brendan Erwin <http://forums.reprap.org/profile.php?12,217>
27 Greenarrow <http://forums.reprap.org/profile.php?12,81>
28 Ian England <http://forums.reprap.org/profile.php?12,192>
29 John Gilmore <http://forums.reprap.org/profile.php?12,364>
30 Jonwise <http://forums.reprap.org/profile.php?12,716>
31 Kyle Corbitt <http://forums.reprap.org/profile.php?12,90>
32 Michael Duffin <http://forums.reprap.org/profile.php?12,930>
33 Marius Kintel <http://reprap.soup.io/>
34 Nophead <http://www.blogger.com/profile/12801535866788103677>
35 PJR <http://forums.reprap.org/profile.php?12,757>
36 Reece.Arnott <http://forums.reprap.org/profile.php?12,152>
37 Wade <http://forums.reprap.org/profile.php?12,489>
38 Xsainnz <http://forums.reprap.org/profile.php?12,563>
39 Zach Hoeken <http://blog.zachhoeken.com/>
40
41 Organizations:
42 Art of Illusion <http://www.artofillusion.org/>"""
43
44 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
45
46 def main():
47         parser = OptionParser(usage="usage: %prog [options] <filename>.stl")
48         parser.add_option("-p", "--profile", action="store", type="string", dest="profile", help="Use these profile settings instead of loading current_profile.ini")
49         parser.add_option("-r", "--print", action="store", type="string", dest="printfile", help="Open the printing interface, instead of the normal cura interface.")
50         (options, args) = parser.parse_args()
51         if options.profile != None:
52                 profile.loadGlobalProfileFromString(options.profile)
53         if options.printfile != None:
54                 from gui import printWindow
55                 printWindow.startPrintInterface(options.printfile)
56                 return
57
58         if len( args ) > 0:
59                 sliceRun.runSlice(args)
60         else:
61                 from gui import mainWindow
62                 mainWindow.main()
63
64 if __name__ == '__main__':
65         main()
66