15 lines
496 B
Python
Executable file
15 lines
496 B
Python
Executable file
import os
|
|
ui_dir = os.path.join('C:\\\\', 'ScriptoriumAI', 'scriptoriumai-ui')
|
|
def replace_file(file_path, old_text, new_text):
|
|
full_path = os.path.join(ui_dir, file_path)
|
|
with open(full_path, 'r', encoding='utf-8') as f:
|
|
content = f.read()
|
|
content = content.replace(old_text, new_text)
|
|
with open(full_path, 'w', encoding='utf-8') as f:
|
|
f.write(content)
|
|
|
|
replace_file('src/pages/EditorSimplified.tsx',
|
|
"status: 'ok',",
|
|
"status: 'success',")
|
|
|
|
print('Done')
|