开发环境从旧虚拟机 (DESKTOP-KGB0K5G) 迁移到新机器 (DESKTOP-D676QDA), 项目目录从 C:\NeoZQYY 变更为 C:\Project\NeoZQYY, 批量替换 126 个文件中的绝对路径引用。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
646 B
Python
17 lines
646 B
Python
path = r'c:/Project/NeoZQYY/apps/miniprogram/miniprogram/pages/performance-records/performance-records.ts'
|
|
with open(path, 'rb') as f:
|
|
content = f.read().decode('utf-8')
|
|
|
|
content = content.replace(
|
|
" totalHours: '0h',\r\n totalIncome: '\xa50',",
|
|
" totalHours: '0h',\r\n totalHoursRaw: '0h',\r\n totalIncome: '\xa50',"
|
|
)
|
|
content = content.replace(
|
|
" totalHours: '59.0h',\r\n totalIncome: '\xa54,720',",
|
|
" totalHours: '59.0h',\r\n totalHoursRaw: '60.5h',\r\n totalIncome: '\xa54,720',"
|
|
)
|
|
|
|
with open(path, 'wb') as f:
|
|
f.write(content.encode('utf-8'))
|
|
print('done')
|