主要内容: - 包含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>
68 lines
2.7 KiB
Python
68 lines
2.7 KiB
Python
#!/usr/bin/env python3
|
||
# -*- coding: utf-8 -*-
|
||
|
||
import json
|
||
import re
|
||
|
||
# 读取个人简历内容.json
|
||
with open('/Users/apple/Documents/cursor/教务系统/frontend/网页未导入数据/个人简历内容.json', 'r', encoding='utf-8') as f:
|
||
resume_data = json.load(f)
|
||
|
||
# 读取当前的mockData.js文件
|
||
with open('/Users/apple/Documents/cursor/教务系统/frontend/src/data/mockData.js', 'r', encoding='utf-8') as f:
|
||
mockdata_content = f.read()
|
||
|
||
# 创建岗位名称到简历内容的映射
|
||
position_map = {}
|
||
for item in resume_data:
|
||
if '❌岗位名称查询' in item and '简历内容' in item:
|
||
position_name = item['❌岗位名称查询']
|
||
resume_content = item['简历内容']
|
||
|
||
# 解析简历内容,提取项目经历、专业技能和个人总结
|
||
# 项目经历部分
|
||
project_match = re.search(r'# 一、项目经历(.*?)(?=# 二、|$)', resume_content, re.DOTALL)
|
||
project_experience = ""
|
||
if project_match:
|
||
project_text = project_match.group(1).strip()
|
||
# 清理markdown格式
|
||
project_text = project_text.replace('### ', '')
|
||
project_text = project_text.replace('# ', '')
|
||
project_experience = project_text
|
||
|
||
# 专业技能部分
|
||
skills_match = re.search(r'# 二、[专业技能|掌握技能](.*?)(?=# 三、|$)', resume_content, re.DOTALL)
|
||
skills = ""
|
||
if skills_match:
|
||
skills_text = skills_match.group(1).strip()
|
||
skills_text = skills_text.replace('### ', '')
|
||
skills_text = skills_text.replace('# ', '')
|
||
skills = skills_text
|
||
|
||
# 个人总结部分
|
||
summary_match = re.search(r'# 三、[个人总结|个人评价](.*?)$', resume_content, re.DOTALL)
|
||
summary = ""
|
||
if summary_match:
|
||
summary_text = summary_match.group(1).strip()
|
||
summary = summary_text
|
||
|
||
position_map[position_name] = {
|
||
'projectExperience': project_experience,
|
||
'skills': skills,
|
||
'personalSummary': summary
|
||
}
|
||
|
||
# 输出找到的岗位数量
|
||
print(f"找到 {len(position_map)} 个岗位的简历数据")
|
||
|
||
# 输出所有岗位名称
|
||
print("\n已处理的岗位:")
|
||
for position_name in sorted(position_map.keys()):
|
||
print(f" - {position_name}")
|
||
|
||
# 保存映射数据为JSON文件,供后续使用
|
||
with open('/Users/apple/Documents/cursor/教务系统/frontend/scripts/resume_mapping.json', 'w', encoding='utf-8') as f:
|
||
json.dump(position_map, f, ensure_ascii=False, indent=2)
|
||
|
||
print("\n简历数据映射已保存到 resume_mapping.json")
|
||
print("请运行 update_mockdata.py 来更新 mockData.js 文件") |