-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (24 loc) · 1.01 KB
/
main.py
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
import json
from controllercreator import create_controllers
from entitycreator import create_entities
from initializr import initialize_project
from javaconverterstyler import JavaConverterStyler
from servicecreator import create_services
from sqlgenerator import generate_sql
def get_input():
with open('input.json', 'r') as f:
return json.load(f)
def get_coder():
return JavaConverterStyler(inp.get("indentation_space_count"),
inp.get("open_curly_brackets_same_line"),
inp.get("beautify_with_spaces"),
inp.get("beautify_with_blank_lines"))
inp = get_input()
# todo: validate input
initialize_project(inp)
java_coder = get_coder()
create_entities(java_coder, inp.get("entities"), inp.get("app_name"))
create_controllers(java_coder, inp.get("entities"), inp.get("app_name"))
create_services(java_coder, inp.get("entities"), inp.get("app_name"))
# SQL Generator
generate_sql(inp.get("entities"), inp.get("app_name"))