主要更新: - 更新所有12个产业的教务系统数据和功能 - 删除所有 node_modules 文件夹(节省3.7GB) - 删除所有 .yoyo 缓存文件夹(节省1.2GB) - 删除所有 dist 构建文件(节省55MB) 项目优化: - 项目大小从 8.1GB 减少到 3.2GB(节省60%空间) - 保留完整的源代码和配置文件 - .gitignore 已配置,防止再次提交大文件 启动脚本: - start-industry.sh/bat/ps1 脚本会自动检测并安装依赖 - 首次启动时自动运行 npm install - 支持单个或批量启动产业系统 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
70 lines
2.5 KiB
JavaScript
70 lines
2.5 KiB
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
// 读取日历课程数据
|
|
const calendarPath = path.join(__dirname, 'src/data/calendarCourses.json');
|
|
const calendarData = JSON.parse(fs.readFileSync(calendarPath, 'utf-8'));
|
|
|
|
// 提取所有课程名称
|
|
const allCourses = new Set();
|
|
const coursesByType = {
|
|
'复合技能阶段': new Set(),
|
|
'垂直方向阶段(方向二:商业活动策划)': new Set(),
|
|
'公开课': new Set()
|
|
};
|
|
|
|
calendarData.forEach(day => {
|
|
// 复合技能阶段课程
|
|
if (day['复合技能阶段'] && day['复合技能阶段'].trim()) {
|
|
const course = day['复合技能阶段'].trim();
|
|
allCourses.add(course);
|
|
coursesByType['复合技能阶段'].add(course);
|
|
}
|
|
|
|
// 垂直方向课程
|
|
if (day['垂直方向阶段(方向二:商业活动策划)'] && day['垂直方向阶段(方向二:商业活动策划)'].trim()) {
|
|
const course = day['垂直方向阶段(方向二:商业活动策划)'].trim();
|
|
allCourses.add(course);
|
|
coursesByType['垂直方向阶段(方向二:商业活动策划)'].add(course);
|
|
}
|
|
|
|
// 公开课
|
|
if (day['公开课'] && day['公开课'].trim()) {
|
|
const course = day['公开课'].trim();
|
|
allCourses.add(course);
|
|
coursesByType['公开课'].add(course);
|
|
}
|
|
});
|
|
|
|
console.log('===== 日历课程数据统计 =====');
|
|
console.log('日历总天数:', calendarData.length);
|
|
console.log('所有唯一课程数:', allCourses.size);
|
|
|
|
console.log('\n===== 各类型课程数 =====');
|
|
Object.entries(coursesByType).forEach(([type, courses]) => {
|
|
console.log(`${type}: ${courses.size}个课程`);
|
|
});
|
|
|
|
console.log('\n===== 复合技能阶段课程列表 =====');
|
|
const compound = [...coursesByType['复合技能阶段']].sort();
|
|
compound.forEach((course, index) => {
|
|
console.log(` ${index + 1}. ${course}`);
|
|
});
|
|
|
|
console.log('\n===== 垂直方向课程列表 =====');
|
|
const vertical = [...coursesByType['垂直方向阶段(方向二:商业活动策划)']].sort();
|
|
vertical.forEach((course, index) => {
|
|
console.log(` ${index + 1}. ${course}`);
|
|
});
|
|
|
|
// 保存所有课程到文件
|
|
const outputPath = path.join(__dirname, 'calendar_courses_list.json');
|
|
fs.writeFileSync(outputPath, JSON.stringify({
|
|
all: [...allCourses],
|
|
compound: [...coursesByType['复合技能阶段']],
|
|
vertical: [...coursesByType['垂直方向阶段(方向二:商业活动策划)']],
|
|
openCourse: [...coursesByType['公开课']]
|
|
}, null, 2), 'utf-8');
|
|
|
|
console.log(`\n课程列表已保存到: ${outputPath}`);
|