From 2054fd43cef8446a35c1365c744716c0459f0746 Mon Sep 17 00:00:00 2001 From: MKStoler1024 <158786854+MKStoler1024@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:50:48 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0README=E4=BB=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AC=E5=9C=B0=E5=90=AF=E5=8A=A8=E5=92=8C?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E9=83=A8=E7=BD=B2=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f458763..7bc1b5a 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,73 @@ ExamShowboard的轻量级实现 ## 快速使用 -填写`exam_config.json`后,确保安装Python。然后执行: +### 本地启动 + +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 -python3 -m http.server 8000 +npm install ``` -即可。 \ No newline at end of file +开发过程中可以使用以下命令启动开发服务器: + +```bash +npm start +``` + +## 贡献 + +欢迎提交Issue和Pull Request来贡献代码。 \ No newline at end of file