/
zeus
executable file
·46 lines (38 loc) · 1.2 KB
/
zeus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
"""Zeus Project."""
import sys
from zeusproject import commands
def main():
"""docstring for main."""
args = commands.get_arguments()
if args.debug:
commands.logger.setLevel(commands.logging.DEBUG)
commands.logger.debug("Debug ON")
if args.project != "":
project = commands.Project(args.project, args.author,
args.domain)
try:
project.generate()
except Exception as e:
print(e)
sys.exit(1)
elif args.module is not None and len(args.module) == 2:
module = commands.Module(args.module[1].strip(),
args.author, args.domain)
try:
module.ger_custom(args.module[0].strip())
except Exception as e:
print(e)
sys.exit(1)
elif args.template is not None and len(args.template) == 2:
template = commands.Template(
args.template[1], args.author, args.domain)
try:
template.ger_custom(args.template[0].strip())
except Exception as e:
print(e)
sys.exit(1)
else:
pass
if __name__ == '__main__':
main()