主要内容: - 包含12个产业的完整教务系统前端代码 - 智能启动脚本 (start-industry.sh) - 可视化产业导航页面 (index.html) - 项目文档 (README.md) 优化内容: - 删除所有node_modules和.yoyo文件夹,从7.5GB减少到2.7GB - 添加.gitignore文件避免上传不必要的文件 - 自动依赖管理和智能启动系统 产业列表: 1. 文旅产业 (5150) 2. 智能制造 (5151) 3. 智能开发 (5152) 4. 财经商贸 (5153) 5. 视觉设计 (5154) 6. 交通物流 (5155) 7. 大健康 (5156) 8. 土木水利 (5157) 9. 食品产业 (5158) 10. 化工产业 (5159) 11. 能源产业 (5160) 12. 环保产业 (5161) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
101 lines
3.1 KiB
Python
101 lines
3.1 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import json
|
|
|
|
# 读取清理后的数据
|
|
with open('resume_updates_cleaned.json', 'r', encoding='utf-8') as f:
|
|
updates = json.load(f)
|
|
|
|
# 读取当前文件
|
|
with open('src/mocks/resumeInterviewMock.js', 'r', encoding='utf-8') as f:
|
|
content = f.read()
|
|
|
|
# 需要更新的岗位列表
|
|
positions_to_update = [
|
|
'文创产品设计师',
|
|
'文创产品策划师',
|
|
'文创产品设计师助理',
|
|
'品牌策划运营专员',
|
|
'品牌公关',
|
|
'品牌推广专员',
|
|
'ip运营',
|
|
'ip运营总监助理',
|
|
'品牌公关管培生'
|
|
]
|
|
|
|
print("开始精确更新九个岗位的数据...")
|
|
print("-" * 50)
|
|
|
|
for position_name in positions_to_update:
|
|
# 获取该岗位的数据
|
|
position_data = next((u for u in updates if u['position'] == position_name), None)
|
|
if not position_data:
|
|
print(f"❌ 未找到 {position_name} 的数据")
|
|
continue
|
|
|
|
# 准备要替换的内容
|
|
student_info = position_data['studentInfo']
|
|
|
|
# 查找该岗位在文件中的位置
|
|
search_str = f'position: "{position_name}"'
|
|
pos = content.find(search_str)
|
|
|
|
if pos == -1:
|
|
print(f"❌ 未找到 {position_name} 的位置")
|
|
continue
|
|
|
|
# 找到该岗位的studentInfo: { ... } 部分
|
|
student_info_start = content.find('studentInfo: {', pos)
|
|
if student_info_start == -1:
|
|
print(f"❌ 未找到 {position_name} 的studentInfo")
|
|
continue
|
|
|
|
# 找到对应的结束大括号
|
|
brace_count = 0
|
|
i = student_info_start + len('studentInfo: {')
|
|
start_brace_pos = i - 1
|
|
|
|
while i < len(content):
|
|
if content[i] == '{':
|
|
brace_count += 1
|
|
elif content[i] == '}':
|
|
if brace_count == 0:
|
|
end_brace_pos = i
|
|
break
|
|
brace_count -= 1
|
|
i += 1
|
|
|
|
# 构建新的studentInfo内容
|
|
project_exp = student_info['project_experience']
|
|
|
|
# 对描述中的引号进行转义
|
|
description = project_exp['description'].replace('`', '\\`').replace('"', '\\"')
|
|
|
|
# 对个人总结中的引号进行转义
|
|
personal_summary = student_info['personal_summary'].replace('"', '\\"')
|
|
|
|
new_student_info = f'''studentInfo: {{
|
|
project_experience: {{
|
|
project_name: "{project_exp['project_name']}",
|
|
position: "{project_exp['position']}",
|
|
time_period: "{project_exp['time_period']}",
|
|
company: "{project_exp['company']}",
|
|
description: `{description}`
|
|
}},
|
|
core_skills: {json.dumps(student_info['core_skills'], ensure_ascii=False, indent=10)},
|
|
compound_skills: {json.dumps(student_info['compound_skills'], ensure_ascii=False, indent=10)},
|
|
personal_summary: "{personal_summary}"
|
|
}}'''
|
|
|
|
# 替换内容
|
|
content = content[:student_info_start] + new_student_info + content[end_brace_pos+1:]
|
|
|
|
print(f"✅ 已更新 {position_name}")
|
|
|
|
# 保存文件
|
|
with open('src/mocks/resumeInterviewMock.js', 'w', encoding='utf-8') as f:
|
|
f.write(content)
|
|
|
|
print("-" * 50)
|
|
print("✅ 所有岗位更新完成!") |