1
2
3
4 import sys
5
6 from moap.command import doap, cl, ignore, bug, code, tracadmin, vcs
7
8 from moap.util import log, util, deps
9
11 c = Moap()
12 try:
13 ret = c.parse(argv)
14 except SystemError, e:
15 sys.stderr.write('moap: error: %s\n' % e.args)
16 return 255
17 except ImportError, e:
18 deps.handleImportError(e)
19 ret = -1
20
21 if ret is None:
22 return 0
23 return ret
24
25 -class Moap(util.LogCommand):
26 usage = "%prog %command"
27 description = """Moap helps you maintain projects.
28
29 Moap gives you a tree of subcommands to work with.
30 You can get help on subcommands by using the -h option to the subcommand.
31 """
32
33 subCommandClasses = [doap.Doap, cl.ChangeLog, ignore.Ignore, bug.Bug,
34 code.Code, tracadmin.TracAdmin, vcs.VCS]
35
37
38 log.init()
39
40 self.parser.add_option('-v', '--version',
41 action="store_true", dest="version",
42 help="show version information")
43
49