Files
examination/README.md
T

79 lines
2.1 KiB
Markdown
Raw Normal View History

2026-09-02 18:22:20 +08:00
# 🎯 CS 知识应试强化系统
2026-09-02 17:34:15 +08:00
2026-09-02 18:22:20 +08:00
基于纯 HTML + CSS + JS 的计算机科学知识应试训练平台。
## 快速开始
```bash
cd /home/wonder/code/examination
python3 -m http.server 8080
# 浏览器打开 http://localhost:8080
```
## 项目结构
```
├── index.html # 前端入口(单文件 SPA)
├── topics/ # 题目数据
│ ├── index.json # 主题索引
│ └── {topic-slug}/
│ ├── meta.json # 主题元信息
│ ├── fill_blank.json # 填空题
│ └── single_choice.json # 单选题
├── schema/ # JSON Schema 与模板
│ ├── question.schema.json # 题目校验 Schema
│ ├── prompt-template.md # LLM 生成提示词模板
│ └── templates/ # 各题型示例模板
└── .ref/ # 参考数据(不提交 git)
```
## 数据格式
每个主题是一个独立目录,包含:
- **meta.json** — 主题描述、标签、统计数据
- **{题型}.json** — 按题型拆分的题目文件
题目文件顶层结构:
```json
{
"topic": "gc-jvm",
"type": "fill_blank",
"schema_version": "1.0.0",
"questions": [...]
}
```
详见 [schema/question.schema.json](schema/question.schema.json)。
## 支持的题型
| 题型 | 代码 | 说明 |
|------|------|------|
| 单选题 | sc | 4 选 1 |
| 多选题 | mc | 多选多 |
| 判断题 | tf | 对/错 |
| 填空题 | fb | 填写空白 |
| 简答题 | sa | 开放式回答 |
| 代码阅读 | cr | 阅读代码回答问题 |
| 场景分析 | sn | 分析技术场景 |
## 添加新题目
1. 在 `topics/` 下创建 `{topic-slug}/` 目录
2. 创建 `meta.json`(参考已有主题)
3. 按题型创建 JSON 文件(参考 `schema/templates/`)
4. 更新 `topics/index.json`
5. 刷新页面即可
## 使用 LLM 批量生成题目
参考 [schema/prompt-template.md](schema/prompt-template.md) 中的提示词模板。
## 自定义导入
在页面侧边栏点击"📥 导入题目",可粘贴 JSON 或上传文件临时导入。
## License
MIT