Spaces:
Sleeping
Sleeping
thewellermangroup
commited on
Commit
•
c9cdfa9
1
Parent(s):
c25815f
Delete functions.py
Browse files- functions.py +0 -43
functions.py
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
f = open("FUNCTIONS.txt",'r',encoding="utf-8")
|
2 |
-
functions0 = f.read()
|
3 |
-
f.close()
|
4 |
-
|
5 |
-
|
6 |
-
functions1 = functions0.split('\nfunction ')
|
7 |
-
|
8 |
-
functions1 = functions1[1:]
|
9 |
-
|
10 |
-
# print(functions1)
|
11 |
-
|
12 |
-
BACKEND = ""
|
13 |
-
FRONTEND = ""
|
14 |
-
|
15 |
-
num = 0
|
16 |
-
|
17 |
-
for fun in functions1:
|
18 |
-
n = fun.split('{', 1)[0].strip()
|
19 |
-
f = fun.split('{', 1)[1].rsplit('}', 1)[0].strip().replace("\\","\\\\")
|
20 |
-
BACKEND += "'" + n + "': '''\n" + f + "\n''',\n"
|
21 |
-
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"
|
22 |
-
num += 1
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
# print(BACKEND)
|
27 |
-
# print(FRONTEND)
|
28 |
-
|
29 |
-
print(num)
|
30 |
-
|
31 |
-
f = open("./FUNCTIONS_BACKEND.txt",'w',encoding="utf-8")
|
32 |
-
f.write(BACKEND)
|
33 |
-
f.close()
|
34 |
-
|
35 |
-
f = open("./FUNCTIONS_FRONTEND.txt",'w',encoding="utf-8")
|
36 |
-
f.write(FRONTEND)
|
37 |
-
f.close()
|
38 |
-
|
39 |
-
|
40 |
-
f = open("FUNCTIONS_BACKEND.txt",'r',encoding="utf-8")
|
41 |
-
backendf = f.read()
|
42 |
-
f.close()
|
43 |
-
print(backendf)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|