Initial commit: unified dashboard suite state with Khira and Image Manipulator 3-file setup
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import re
|
||||
|
||||
with open('app.js', 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
for func in ['renderSidebar', 'renderMain', 'renderResponse']:
|
||||
match = re.search(fr'{func}\(\)\s*\{{', content)
|
||||
if match:
|
||||
start = match.start()
|
||||
brace_count = 0
|
||||
started = False
|
||||
for i in range(start, len(content)):
|
||||
if content[i] == '{':
|
||||
brace_count += 1
|
||||
started = True
|
||||
elif content[i] == '}':
|
||||
brace_count -= 1
|
||||
if started and brace_count == 0:
|
||||
end = i + 1
|
||||
break
|
||||
with open(f'{func}.txt', 'w') as out:
|
||||
out.write(content[start:end])
|
||||
Reference in New Issue
Block a user