Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -385,10 +385,27 @@ def format_json(inp):
|
|
385 |
new_json=[]
|
386 |
print("FORMATTING:::")
|
387 |
for i,line in enumerate(inp.split("\n")):
|
388 |
-
line = line.strip()
|
389 |
print(f'test:: {line}')
|
390 |
-
if
|
391 |
print (line)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
|
393 |
'''
|
394 |
print (f'NEW LINE:: {line}')
|
|
|
385 |
new_json=[]
|
386 |
print("FORMATTING:::")
|
387 |
for i,line in enumerate(inp.split("\n")):
|
388 |
+
#line = line.strip()
|
389 |
print(f'test:: {line}')
|
390 |
+
if "keywords" in line and ":" in line:
|
391 |
print (line)
|
392 |
+
if "title" in line and ":" in line:
|
393 |
+
print (line)
|
394 |
+
if "description" in line and ":" in line:
|
395 |
+
print (line)
|
396 |
+
if "content" in line and ":" in line:
|
397 |
+
print (line)
|
398 |
+
if "url" in line and ":" in line:
|
399 |
+
print (line)
|
400 |
+
if "{" in line:
|
401 |
+
print (line)
|
402 |
+
if "}" in line:
|
403 |
+
print (line)
|
404 |
+
|
405 |
+
|
406 |
+
|
407 |
+
#if line.startswith(("keywords","title","description","content","url","{","}")):
|
408 |
+
# print (line)
|
409 |
|
410 |
'''
|
411 |
print (f'NEW LINE:: {line}')
|