主要内容: - 包含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>
85 lines
2.4 KiB
Python
85 lines
2.4 KiB
Python
#!/usr/bin/env python3
|
||
# -*- coding: utf-8 -*-
|
||
|
||
import json
|
||
|
||
def extract_batch_positions():
|
||
"""提取食品岗位简历中的岗位名称和批次信息"""
|
||
|
||
# 读取食品岗位简历数据
|
||
with open('网页未导入数据/食品产业/食品岗位简历.json', 'r', encoding='utf-8') as f:
|
||
data = json.load(f)
|
||
|
||
# 按批次分组岗位
|
||
batch_positions = {
|
||
'第一批次': [],
|
||
'第二批次': [],
|
||
'第三批次': []
|
||
}
|
||
|
||
# 提取岗位名称和批次
|
||
for position_data in data:
|
||
position_name = position_data.get('岗位名称', '')
|
||
batch = position_data.get('批次', '')
|
||
|
||
if position_name and batch in batch_positions:
|
||
batch_positions[batch].append(position_name)
|
||
|
||
# 打印结果
|
||
print("食品产业岗位按批次分类:")
|
||
print("=" * 50)
|
||
|
||
for batch, positions in batch_positions.items():
|
||
print(f"\n{batch} ({len(positions)}个岗位):")
|
||
for i, position in enumerate(positions, 1):
|
||
print(f" {i}. {position}")
|
||
|
||
# 生成JavaScript代码
|
||
js_code = """const initialBatchPositions = {
|
||
batch1: [
|
||
"""
|
||
|
||
for position in batch_positions['第一批次']:
|
||
js_code += f' "{position}",\n'
|
||
|
||
js_code += """ ],
|
||
batch2: [
|
||
"""
|
||
|
||
for position in batch_positions['第二批次']:
|
||
js_code += f' "{position}",\n'
|
||
|
||
js_code += """ ],
|
||
batch3: [
|
||
"""
|
||
|
||
for position in batch_positions['第三批次']:
|
||
js_code += f' "{position}",\n'
|
||
|
||
js_code += """ ]
|
||
};"""
|
||
|
||
print(f"\n\n生成的JavaScript代码:")
|
||
print("=" * 50)
|
||
print(js_code)
|
||
|
||
# 保存到文件
|
||
with open('batch_positions_output.txt', 'w', encoding='utf-8') as f:
|
||
f.write("食品产业岗位按批次分类:\n")
|
||
f.write("=" * 50 + "\n")
|
||
|
||
for batch, positions in batch_positions.items():
|
||
f.write(f"\n{batch} ({len(positions)}个岗位):\n")
|
||
for i, position in enumerate(positions, 1):
|
||
f.write(f" {i}. {position}\n")
|
||
|
||
f.write(f"\n\n生成的JavaScript代码:\n")
|
||
f.write("=" * 50 + "\n")
|
||
f.write(js_code)
|
||
|
||
print(f"\n结果已保存到 batch_positions_output.txt")
|
||
|
||
return batch_positions, js_code
|
||
|
||
if __name__ == "__main__":
|
||
extract_batch_positions() |