openpetswithchatandmcp/website/fix7.py
OpenPets Dev 65ac83849e Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827'
git-subtree-dir: website
git-subtree-mainline: 8d3849caea
git-subtree-split: 966aea480f
2026-06-17 20:48:39 +00:00

24 lines
1.1 KiB
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',
"flow: 'native_pdf_synctex_task_enqueued' as any,",
"flow: 'native_pdf_synctex_task_enqueued' as any, status: 'ok',")
replace_file('src/pages/EditorSimplified.tsx',
"flow: 'native_pdf_synctex_task_completed_no_match' as any,",
"flow: 'native_pdf_synctex_task_completed_no_match' as any, status: 'ok',")
replace_file('src/pages/EditorSimplified.tsx',
"flow: 'native_pdf_synctex_source_focus_applied' as any,",
"flow: 'native_pdf_synctex_source_focus_applied' as any, status: 'ok',")
replace_file('src/pages/EditorSimplified.tsx',
"flow: 'native_pdf_synctex_task_enqueue_failed' as any,",
"flow: 'native_pdf_synctex_task_enqueue_failed' as any, status: 'error',")
print('Done')