ExamSchedule/README.md

76 lines
1.9 KiB
Markdown
Raw 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.

# ExamSchedule
ExamShowboard的轻量级实现
## 快速使用
### 本地启动
1. 填写 `exam_config.json` 文件,示例如下:
```json
{
"examName": "2023年期末考试",
"message": "请考生遵守考场纪律,诚信考试。",
"examInfos": [
{
"name": "数学",
"start": "2023-12-01T09:00:00",
"end": "2023-12-01T11:00:00"
},
{
"name": "英语",
"start": "2023-12-01T13:00:00",
"end": "2023-12-01T15:00:00"
}
]
}
```
2. 确保安装Python。然后执行以下命令启动本地服务器
```bash
python3 -m http.server 8000
```
3. 打开浏览器,访问 `http://localhost:8000` 即可查看考试安排。
### 在线部署
1. 将项目代码推送到GitHub仓库。
2. 在GitHub仓库中进入 `Settings` -> `Pages`。
3. 在 `Source` 部分选择 `main` 分支并保存。
4. GitHub Pages 将会自动部署项目稍后即可通过提供的URL访问。
## 功能说明
- 实时显示当前时间、当前考试科目、考试起止时间、剩余时间及考试状态。
- 支持全屏显示。
- 支持设置时间偏移和考场信息并保存到浏览器Cookie中。
## 设置说明
点击设置按钮可以打开设置窗口,进行以下配置:
- **时间偏移**:用于调整显示的时间,单位为秒。
- **考场信息**:用于显示当前考场的名称。
配置完成后点击保存按钮设置将会保存到浏览器的Cookie中并立即生效。
## 开发说明
如需对项目进行开发请确保安装Node.js和npm然后执行以下命令安装依赖
```bash
npm install
```
开发过程中可以使用以下命令启动开发服务器:
```bash
npm start
```
## 贡献
欢迎提交Issue和Pull Request来贡献代码。