Update app.py
Browse files
app.py
CHANGED
@@ -66,16 +66,24 @@ def sort_doc(in_list,steps_in=0,control=None):
|
|
66 |
|
67 |
|
68 |
step_cont_box=[]
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
#print (step_cont_box)
|
73 |
mod=0
|
74 |
pos=len(step_cont_box)-1
|
75 |
|
76 |
if go:
|
77 |
for i, ea in enumerate(in_list):
|
78 |
-
|
|
|
79 |
if cnt > char_len-1:
|
80 |
#print(step_cont_box)
|
81 |
go1=True
|
@@ -96,6 +104,7 @@ def sort_doc(in_list,steps_in=0,control=None):
|
|
96 |
print(j)
|
97 |
out_js = out_js+control_char[j]
|
98 |
sen_obj=in_list[i]
|
|
|
99 |
json_out[out_js]=sen_obj
|
100 |
print ("#################")
|
101 |
print (out_js)
|
@@ -206,8 +215,8 @@ def sitemap(url,level):
|
|
206 |
######## Save Database ########
|
207 |
uid=uuid.uuid4()
|
208 |
for ea in list(uri_key.keys()):
|
209 |
-
if not uri_key[ea] in list(lod.values()):
|
210 |
-
|
211 |
|
212 |
with open(f'{uid}.json', 'w') as f:
|
213 |
json_hist=json.dumps(uri_key, indent=4)
|
|
|
66 |
|
67 |
|
68 |
step_cont_box=[]
|
69 |
+
if lod:
|
70 |
+
last_key=list(lod.keys())[:-1]
|
71 |
+
print(last_key)
|
72 |
+
for ea_dig in last_key:
|
73 |
+
print(f'{ea_dig} :: {control_json["control"][ea_dig]}')
|
74 |
+
step_cont_box.append(control_json["control"][ea_dig])
|
75 |
+
else:
|
76 |
+
for ii in range(steps):
|
77 |
+
print(ii)
|
78 |
+
step_cont_box.append(0)
|
79 |
#print (step_cont_box)
|
80 |
mod=0
|
81 |
pos=len(step_cont_box)-1
|
82 |
|
83 |
if go:
|
84 |
for i, ea in enumerate(in_list):
|
85 |
+
|
86 |
+
if go and if ea not in list(lod.values()):
|
87 |
if cnt > char_len-1:
|
88 |
#print(step_cont_box)
|
89 |
go1=True
|
|
|
104 |
print(j)
|
105 |
out_js = out_js+control_char[j]
|
106 |
sen_obj=in_list[i]
|
107 |
+
|
108 |
json_out[out_js]=sen_obj
|
109 |
print ("#################")
|
110 |
print (out_js)
|
|
|
215 |
######## Save Database ########
|
216 |
uid=uuid.uuid4()
|
217 |
for ea in list(uri_key.keys()):
|
218 |
+
#if not uri_key[ea] in list(lod.values()):
|
219 |
+
lod[ea]=uri_key[ea]
|
220 |
|
221 |
with open(f'{uid}.json', 'w') as f:
|
222 |
json_hist=json.dumps(uri_key, indent=4)
|