thewellermangroup commited on
Commit
6208c15
·
1 Parent(s): 47e4e20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -67
app.py CHANGED
@@ -23,76 +23,11 @@ flask_cors.CORS(app)
23
 
24
 
25
 
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- f = open("FUNCTIONS.txt",'r',encoding="utf-8")
34
- functions0 = f.read()
35
- f.close()
36
-
37
-
38
- functions1 = functions0.split('\nfunction ')
39
-
40
- functions1 = functions1[1:]
41
-
42
- # print(functions1)
43
-
44
- BACKEND = ""
45
- FRONTEND = ""
46
-
47
- num = 0
48
-
49
- for fun in functions1:
50
- n = fun.split('{', 1)[0].strip()
51
- f = fun.split('{', 1)[1].rsplit('}', 1)[0].strip().replace("\\","\\\\")
52
- BACKEND += "'" + n + "': '''\n" + f + "\n''',\n"
53
- FRONTEND += "function "+n+" {\n fetchApiData();\n // Ensure that globalData is populated before executing the code\n setTimeout(() => {\n if (BACKENDDATA.ACCESS) {\n eval(BACKENDDATA.FUNCTIONS['"+n+"']);\n }\n }, DELAYTIME);\n}\n"
54
- num += 1
55
-
56
-
57
-
58
- # print(BACKEND)
59
- # print(FRONTEND)
60
-
61
- print(num)
62
-
63
- f = open("./FUNCTIONS_BACKEND.txt",'w',encoding="utf-8")
64
- f.write(BACKEND)
65
- f.close()
66
-
67
- f = open("./FUNCTIONS_FRONTEND.txt",'w',encoding="utf-8")
68
- f.write(FRONTEND)
69
- f.close()
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
 
91
 
92
  # creates a API endpoint for the password input
93
- @app.route('/', methods=['GET'])
94
- def password():
95
- passwordIn = "$1234"
96
  PASSWORD = "1234"
97
  securePassword = "$"+PASSWORD
98
  access = checkPassword(passwordIn, securePassword)
 
23
 
24
 
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
 
28
  # creates a API endpoint for the password input
29
+ @app.route('/<passwordIn>', methods=['GET'])
30
+ def password(passwordIn):
 
31
  PASSWORD = "1234"
32
  securePassword = "$"+PASSWORD
33
  access = checkPassword(passwordIn, securePassword)