2 # -*- coding: utf-8 -*-
7 # Copyright (C) 2007 Felix Rabe <public@felixrabe.textdriven.com>
8 # Copyright (C) 2007 Alexander Botero-Lowry
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public
12 # License as published by the Free Software Foundation; either
13 # version 2.1 of the License, or (at your option) any later version.
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Lesser General Public License for more details.
20 # You should have received a copy of the GNU Lesser General Public License
21 # along with this library; if not, write to the Free Software Foundation,
22 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 # Recommended line length or text width: 75 characters.
30 option_parser
= optparse
.OptionParser(prog
= "Systematiki Server")
32 option_parser
.add_option("-g", "--use-gtk", dest
= "use_gtk",
33 help = "configure using a GTK interface",
34 default
= False, action
= "store-true")
36 option_parser
.add_option("-d", "--database", dest
= "db_root",
37 help = "Systematiki database path",
38 default
= "Examples/todo-list/")
40 option_parser
.add_option("-p", "--port", dest
= "port", type = "int",
41 help = "port to listen on",
44 options
, args
= option_parser
.parse_args(argv
[1:])
47 from Systematiki
.Server
.UI
.GTK
import UserInterface
49 from Systematiki
.Server
.UI
.CommandLine
import UserInterface
50 UserInterface(options
, args
).run()
55 if __name__
== "__main__":
57 sys
.exit(main(sys
.argv
))