主要内容: - 包含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>
74 lines
2.3 KiB
JavaScript
74 lines
2.3 KiB
JavaScript
const fs = require('fs');
|
|
|
|
// 读取Markdown文件
|
|
const markdownContent = fs.readFileSync('网页未导入数据/交通物流产业/学生完成的项目/自动化分拣输送线的扫码分流、气缸拨臂与卡箱监测控制.md', 'utf8');
|
|
|
|
// 解析Markdown内容并转换为sections格式
|
|
function parseMarkdownToSections(content) {
|
|
const lines = content.split('\n');
|
|
const sections = [];
|
|
let currentSection = null;
|
|
|
|
for (let i = 0; i < lines.length; i++) {
|
|
const line = lines[i];
|
|
|
|
// 检测一级标题(# 标题)- 跳过项目名称
|
|
if (line.startsWith('# ') && !line.includes('自动化分拣输送线')) {
|
|
if (currentSection) {
|
|
sections.push(currentSection);
|
|
}
|
|
currentSection = {
|
|
title: line.replace('# ', ''),
|
|
content: ''
|
|
};
|
|
}
|
|
// 检测二级标题(## 标题)
|
|
else if (line.startsWith('## ')) {
|
|
if (currentSection) {
|
|
sections.push(currentSection);
|
|
}
|
|
currentSection = {
|
|
title: line.replace('## ', ''),
|
|
content: ''
|
|
};
|
|
}
|
|
// 普通内容行
|
|
else if (currentSection && line.trim() !== '') {
|
|
if (currentSection.content) {
|
|
currentSection.content += '\n';
|
|
}
|
|
currentSection.content += line;
|
|
}
|
|
}
|
|
|
|
// 添加最后一个section
|
|
if (currentSection) {
|
|
sections.push(currentSection);
|
|
}
|
|
|
|
return sections;
|
|
}
|
|
|
|
// 生成项目数据
|
|
const sections = parseMarkdownToSections(markdownContent);
|
|
|
|
const clickableProjectData = {
|
|
id: "clickable-1",
|
|
name: "自动化分拣输送线的扫码分流、气缸拨臂与卡箱监测控制",
|
|
unitName: "智能仓储系统监测",
|
|
isClickable: true,
|
|
content: {
|
|
title: "自动化分拣输送线的扫码分流、气缸拨臂与卡箱监测控制",
|
|
description: "某电商仓分拣线包含一条主输送线与一条侧向分流线。通过条码扫描器识别包裹目的地,当识别为需分流时,驱动气缸拨臂将包裹推入侧线,实现自动化分拣控制。",
|
|
images: [],
|
|
sections: sections
|
|
}
|
|
};
|
|
|
|
console.log('转换后的可点击项目数据:');
|
|
console.log(JSON.stringify(clickableProjectData, null, 2));
|
|
|
|
console.log('\n项目sections数量:', sections.length);
|
|
sections.forEach((section, index) => {
|
|
console.log(`Section ${index + 1}: ${section.title} (${section.content.length} 字符)`);
|
|
}); |