Files
ALL-teach_sys/frontend_智能制造/verify_cleaned_answers.py
KQL 38350dca36 更新12个教务系统并优化项目大小
主要更新:
- 更新所有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>
2025-10-17 14:36:25 +08:00

60 lines
1.7 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
验证清理后的答案
"""
import re
print("=== 验证清理后的答案 ===\n")
# 读取文件
with open('src/mocks/resumeInterviewMock.js', 'r', encoding='utf-8') as f:
content = f.read()
# 统计总答案数
total_answers = len(re.findall(r'"answer":\s*"[^"]*"', content))
print(f"总答案数: {total_answers}")
# 检查是否还有选项格式
option_patterns = [
(r'"answer":\s*"[^"]*[A-D][\.、][^"]*"', "包含 A. B. C. D. 格式"),
(r'"answer":\s*"选项[:][^"]*"', "'选项:'开头"),
(r'"answer":\s*"[A-D]\s+[^"]*"', "以单个字母开头"),
]
print("\n检查剩余的选项格式:")
has_options = False
for pattern, description in option_patterns:
matches = re.findall(pattern, content)
if matches:
print(f"\n{description}: {len(matches)}")
for match in matches[:3]: # 显示前3个示例
# 提取答案内容
answer_text = re.search(r'"answer":\s*"([^"]*)"', match)
if answer_text:
print(f" - {answer_text.group(1)[:80]}...")
has_options = True
if not has_options:
print("✅ 没有发现明显的选项格式")
# 显示一些成功清理的例子
print("\n\n成功清理的示例:")
examples = [
"示教器操作时,必须佩戴",
"机器人运行时,人员应",
"安全围栏的作用是",
"工具标定不准确会导致",
"每日交接班必须做的是"
]
for question in examples:
pattern = f'"question":\s*"{question}",\s*\n\s*"answer":\s*"([^"]*)"'
match = re.search(pattern, content)
if match:
print(f"问题: {question}")
print(f"答案: {match.group(1)}")
print("-" * 40)
print("\n✅ 验证完成!")