Skip to content

Commit bb31585

Browse files
committed
releases:v1.0.2.1-beta
1 parent ea0cea5 commit bb31585

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1603
-1093
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: 生成 SHA256 的表格信息
7373
run: |
7474
cd release
75-
echo "SHA256 校验值-**请核对下载的文件的SHA256值是否正确**" >> ../CHANGELOG.md
75+
echo "**请核对下载的文件的SHA256值是否正确**" >> ../CHANGELOG.md
7676
echo "| 文件名 | SHA256 值 |" >> ../CHANGELOG.md
7777
echo "| --- | --- |" >> ../CHANGELOG.md
7878
while read -r line; do

.idea/SecRandom.iml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/icon.svg

Lines changed: 233 additions & 0 deletions
Loading

CHANGELOG.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
### 🚀 新增功能与优化
2-
- **【更多设置】新增可设置三个页面的窗口大小(重启生效)**
3-
- **【抽单人/抽多人/抽小组 设置】可以设置每个抽取功能的字体大小(部分重启生效)**
4-
- 【历史记录】修复了历史记录无法查看的问题
2+
- **【名单设置】TODO: 可开启仅启用学号抽取功能**
3+
- **【基础设置】TODO: 浮窗透明度设置**
4+
- **【关于界面】TODO: 关于界面添加软件信息及其作者信息**
5+
- 【历史记录】fix:显示的抽取次数没有正确补全‘0’的问题
6+
- 【软件信息】fix:软件版本显示错误问题
7+
- 【开机自启】fix:更换了启动方式,使用创建快捷方式来启动软件
58

6-
### 🎉 软件仓库日志
9+
### 🎉 软件仓库日志-仅显示最近5条
10+
- **SecRandom v1.0.2.1-beta 发布 - 2025-04-20 - 处于 1.1-dev测试版本**
711
- **SecRandom v1.0.2.0-beta 发布 - 2025-04-13 - 处于 1.1-dev测试版本**
812
- **SecRandom v1.0.1.0 发布 - 2025-04-13**
913
- **SecRandom v1.0.0.4 发布 - 2025-04-05**
1014

11-
Full Changelog: [v1.0.1.0...v1.0.2.0-beta](https://github.com/SecRandom/SecRandom/compare/v1.0.1.0...v1.0.2.0-beta)
15+
Full Changelog: [v1.0.2.0-beta...v1.0.2.1-beta](https://github.com/SecRandom/SecRandom/compare/v1.0.2.0-beta...v1.0.2.1-beta)
1216

1317
**国内 下载链接**
1418
| 平台/打包方式 | 支持架构 | 完整版 |
@@ -18,9 +22,9 @@ Full Changelog: [v1.0.1.0...v1.0.2.0-beta](https://github.com/SecRandom/SecRando
1822
**Github 镜像 下载链接**
1923
| 镜像源 | 平台/打包方式 | 支持架构 | 完整版 |
2024
| --- | --- | --- | --- |
21-
| ghfast.top | Windows | x86 | [下载](https://ghfast.top/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.0-beta/SecRandom-Windows-x86.zip) |
22-
| ghfast.top | Windows | x64 | [下载](https://ghfast.top/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.0-beta/SecRandom-Windows-x64.zip) |
23-
| gh-proxy.com | Windows | x86 | [下载](https://gh-proxy.com/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.0-beta/SecRandom-Windows-x86.zip) |
24-
| gh-proxy.com | Windows | x64 | [下载](https://gh-proxy.com/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.0-beta/SecRandom-Windows-x64.zip) |
25+
| ghfast.top | Windows | x86 | [下载](https://ghfast.top/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.1-beta/SecRandom-Windows-x86.zip) |
26+
| ghfast.top | Windows | x64 | [下载](https://ghfast.top/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.1-beta/SecRandom-Windows-x64.zip) |
27+
| gh-proxy.com | Windows | x86 | [下载](https://gh-proxy.com/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.1-beta/SecRandom-Windows-x86.zip) |
28+
| gh-proxy.com | Windows | x64 | [下载](https://gh-proxy.com/https://github.com/SecRandom/SecRandom/releases/download/v1.0.2.1-beta/SecRandom-Windows-x64.zip) |
2529

26-
SHA256 校验值-**请核对下载的文件的SHA256值是否正确**
30+
SHA256 校验值-

README.md

Lines changed: 52 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,65 +14,74 @@
1414

1515
该软件能以多种方式进行随机抽取 学号/姓名/小组...
1616

17-
| [Github 下载](https://github.com/SecRandom/SecRandom/releases) | [123云盘 下载](https://www.123684.com/s/9529jv-U4Fxh) |
17+
| [Github(镜像) 下载](https://github.com/SecRandom/SecRandom/releases) | [123云盘 下载-暂未上传](https://www.123684.com/s/9529jv-U4Fxh) |
1818

1919
</div>
2020

21-
> [!important]
22-
> **如果您有任何建议或意见,欢迎提交 [Issue](https://github.com/SecRandom/SecRandom/issues)**
21+
## 💻适配系统
22+
- ✅ Windows 7 及以上版本操作系统
23+
- ✅ 32 位、64 位
2324

24-
## 功能
25+
## 🎉 功能
2526

26-
- **抽单人/抽多人/抽小组 等抽取方式**
27-
- **有着结果语音提示的功能**
28-
- **可开关的历史记录功能**
29-
- **历史记录还可以查看每个人被抽取的时间、方式**
30-
- **甚至还可以设置与切换多个班级的名单**
31-
- **抽取界面与设置界面的隔离**
32-
- **方便快捷的悬浮窗设计**
33-
- **有着开机自启动的便捷**
34-
- **有设置界面的密码功能(请期待后续更新)**
35-
- **现两种不同本质的权重方式(请期待后续更新)**
36-
- **现代化的设计界面**
27+
- **抽单人/抽多人/抽小组 等抽取方式**
28+
- **有着结果语音提示的功能**
29+
- **可开关的历史记录功能**
30+
- **历史记录还可以查看每个人被抽取的时间、方式**
31+
- **甚至还可以设置与切换多个班级的名单**
32+
- **抽取界面与设置界面的隔离**
33+
- **方便快捷的悬浮窗设计**
34+
- **有着开机自启动的便捷**
35+
- **有设置界面的密码功能(请期待后续更新)**
36+
- **现两种不同本质的权重方式(请期待后续更新)**
37+
- **现代化的设计界面**
3738

38-
<!-- SCREENSHOTS -->
39-
## 软件截图
39+
# ⭐️ 快速开始
40+
41+
## 📥 下载与安装
42+
43+
1. 下载对应版本的软件压缩包
44+
2. 解压软件压缩包
45+
3.`SecRandom` 文件夹移动到 合适的目录下(例:'D:\')
46+
4. 双击 `SecRandom.exe` 运行软件
47+
5. 长按/单击 SecRandom 托盘图标 对软件进行设置操作
48+
6. 使用软件
49+
50+
## 🔧 软件设置
51+
52+
### 名单设置
53+
54+
1. 点击软件托盘图标 打开软件设置界面
55+
2. 点击 `名单设置` 侧边栏按钮,进入 `名单设置` 页面
56+
3. 点击 `设置班级` 按钮,添加一个新班级
57+
4. 选择对应的班级,点击 `设置班级名单` 按钮,设置/添加 班级名单
58+
5. 可根据实际情况进行设置小组
59+
60+
### 抽取设置
61+
62+
1. 点击软件托盘图标 打开软件设置界面
63+
2. 点击 `全局设置` 侧边栏按钮,进入 `全局设置` 页面
64+
3. 选择 `抽取方式` 进行设置抽取方式
65+
4. 选择 `语音播放` 进行设置抽取结果提示
66+
5. 选择 `动画模式` 进行设置结果的显示方式
67+
68+
**更多设置请自行探索,如需帮助加入[QQ 群](https://qm.qq.com/q/yJkTpkiW5i) - 1038111867**
69+
70+
## 📌 软件截图
4071

4172
### **浅色-抽单人**
73+
4274
![SecRandom/抽单人](ScreenSots/抽单人_浅色.png)
4375
### **浅色-抽多人**
4476
![SecRandom/抽多人](ScreenSots/抽多人_浅色.png)
4577

46-
<!-- CONTACT -->
47-
## 联系
78+
## 📮 联系
4879

4980
* [E-mail](mailto:lzy.12@foxmail.com) - lzy.12@foxmail.com
5081
* [QQ 群](https://qm.qq.com/q/yJkTpkiW5i) - 1038111867
5182
* [Billibili](https://space.bilibili.com/520571577) - 黎泽懿
5283

53-
<!-- ACKNOWLEDGMENTS -->
54-
## 引用
55-
56-
* [PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets) 强大且方便的 UI 库
57-
* [Loguru](https://github.com/Delgan/loguru) A library which aims to bring enjoyable logging in Python
58-
* [PyQt5](https://www.riverbankcomputing.com/static/Docs/PyQt5/introduction.html#PyQt5-components) The official Python module
59-
60-
61-
## 贡献
62-
63-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
64-
<!-- prettier-ignore-start -->
65-
<!-- markdownlint-disable -->
66-
<!-- <a href="#data-dubi906w" title="Data">🔣</a> <a href="#doc-dubi906w" title="Documentation">📖</a> -->
67-
<table>
68-
<tbody>
69-
<tr>
70-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lzy98276"><img src="https://avatars.githubusercontent.com/u/139693537?v=4?s=100" width="100px;" alt="lzy98276"/><br /><sub><b>lzy98276</b></sub></a><br/><a href="#content-lzy98276" title="Content">🖋</a> <a href="#maintenance-dubi906w" title="Maintenance">🚧</a> <a href="#ideas-lzy98276" title="Ideas, Planning, & Feedback">🤔</a></td>
71-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Awesome-Iwb/Awesome-Iwb"><img src="https://avatars.githubusercontent.com/u/184760810?v=4?s=100" width="100px;" alt="Awesome-Iwb"/><br /><sub><b>Awesome-Iwb</b></sub></a><br/></td>
72-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Jursin"><img src="https://avatars.githubusercontent.com/u/127487914?v=4?s=100" width="100px;" alt="Jursin"/><br /><sub><b>Jursin</b></sub></a><br /></td>
73-
</tbody>
74-
</table>
75-
84+
## ✨ Star History
7685

7786
<picture>
7887
<source
@@ -98,4 +107,4 @@
98107
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flzy98276%2FSecRandom.svg?type=shield&issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2Flzy98276%2FSecRandom?ref=badge_shield&issueType=security) -->
99108
<!-- [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flzy98276%2FSecRandom.svg?type=shield&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Flzy98276%2FSecRandom?ref=badge_shield&issueType=license) -->
100109

101-
**Copyright © 2025 lzy98276.**
110+
**Copyright © 2025 lzy98276**

app/common/Changeable_history_settings.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@
99

1010
from app.common.config import load_custom_font
1111

12-
# 配置日志记录
13-
log_dir = "logs"
14-
if not os.path.exists(log_dir):
15-
os.makedirs(log_dir)
16-
17-
logger.add(
18-
os.path.join(log_dir, "SecRandom_{time:YYYY-MM-DD}.log"),
19-
rotation="1 MB",
20-
encoding="utf-8",
21-
retention="30 days",
22-
format="{time:YYYY-MM-DD HH:mm:ss:SSS} | {level} | {name}:{function}:{line} - {message}"
23-
)
24-
2512
class history_SettinsCard(GroupHeaderCardWidget):
2613
def __init__(self, parent=None):
2714
super().__init__(parent)
@@ -96,8 +83,24 @@ def refresh_class_list(self):
9683
def load_students(self):
9784
class_name = self.class_comboBox.currentText()
9885
try:
99-
if os.path.exists(f"app/resource/students/{class_name}.ini"):
100-
with open(f"app/resource/students/{class_name}.ini", 'r', encoding='utf-8') as f:
86+
try:
87+
with open('app/Settings/Settings.json', 'r', encoding='utf-8') as f:
88+
settings = json.load(f)
89+
list_strings_set = settings.get('list_strings', {})
90+
list_strings_settings = list_strings_set.get('use_lists', False)
91+
if not list_strings_settings:
92+
student_file = f"app/resource/students/{class_name}.ini"
93+
else:
94+
student_file = f"app/resource/students/people_{class_name}.ini"
95+
except FileNotFoundError as e:
96+
logger.error(f"加载设置时出错: {e}, 使用默认显示仅学号显示")
97+
student_file = f"app/resource/students/people_{class_name}.ini"
98+
except KeyError:
99+
logger.error(f"设置文件中缺少foundation键, 使用默认仅学号显示")
100+
student_file = f"app/resource/students/people_{class_name}.ini"
101+
102+
if os.path.exists(student_file):
103+
with open(student_file, 'r', encoding='utf-8') as f:
101104
students = [line.strip() for line in f.read().split('\n') if line.strip()]
102105
self.student_comboBox.clear()
103106
students = ['全班同学'] + students
@@ -146,15 +149,14 @@ def clear_history(self):
146149
def load_settings(self):
147150
try:
148151
if os.path.exists(self.settings_file):
149-
logger.info(f"加载设置文件: {self.settings_file}") # 打印日志信息
150152
with open(self.settings_file, 'r', encoding='utf-8') as f:
151153
settings = json.load(f)
152154
history_settings = settings.get("history", {})
153155

154156
history_enabled = history_settings.get("history_enabled", self.default_settings["history_enabled"])
155157

156158
self.history_switch.setChecked(history_enabled)
157-
logger.info(f"加载设置完成: dhistory_enabled={history_enabled}")
159+
logger.info(f"加载历史记录设置完成")
158160
else:
159161
logger.warning(f"设置文件不存在: {self.settings_file}")
160162
self.history_switch.setChecked(self.default_settings["history_enabled"])

app/common/about.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from qfluentwidgets import *
2+
from qfluentwidgets import FluentIcon as FIF
3+
4+
from app.common.config import YEAR, MONTH, AUTHOR, VERSION, APPLY_NAME, GITHUB_WEB, BILIBILI_WEB
5+
6+
class aboutCard(GroupHeaderCardWidget):
7+
def __init__(self, parent=None):
8+
super().__init__(parent)
9+
self.setTitle("关于 SecRandom")
10+
self.setBorderRadius(8)
11+
12+
# 打开GitHub按钮
13+
self.about_github_Button = HyperlinkButton(FIF.GITHUB, GITHUB_WEB, 'Github')
14+
15+
# 打开bilibili按钮
16+
self.about_bilibili_Button = HyperlinkButton(BILIBILI_WEB, 'Bilibili')
17+
18+
# 查看当前软件版本号
19+
self.about_version_label = BodyLabel(f"当前版本: {VERSION}")
20+
21+
# 查看当前软件版权所属
22+
self.about_author_label = BodyLabel(f"Copyright © {YEAR} {APPLY_NAME}-{MONTH}-{AUTHOR}")
23+
24+
# 添加组件到分组中
25+
self.addGroup(FIF.LINK, "哔哩哔哩", "黎泽懿 - bilibili", self.about_bilibili_Button)
26+
self.addGroup(FIF.GITHUB, "Github", "SecRandom(黎泽懿-lzy98276) - github", self.about_github_Button)
27+
self.addGroup(FIF.INFO, "版本", "显示的是当前软件版本号", self.about_version_label)

app/common/config.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
from qfluentwidgets import *
2-
from PyQt5.QtGui import *
3-
4-
import os
5-
from loguru import logger
6-
7-
# 配置日志记录
8-
log_dir = "logs"
9-
if not os.path.exists(log_dir):
10-
os.makedirs(log_dir)
11-
12-
logger.add(
13-
os.path.join(log_dir, "SecRandom_{time:YYYY-MM-DD}.log"),
14-
rotation="1 MB",
15-
encoding="utf-8",
16-
retention="30 days",
17-
format="{time:YYYY-MM-DD HH:mm:ss:SSS} | {level} | {name}:{function}:{line} - {message}"
18-
)
2+
from PyQt5.QtGui import *
193

204
def load_custom_font():
215
font_path = './app/resource/font/HarmonyOS_Sans_SC_Bold.ttf'
@@ -34,9 +18,10 @@ class Config(QConfig):
3418
YEAR = 2025
3519
MONTH = 4
3620
AUTHOR = "lzy98276"
37-
VERSION = "v1.0.1.0"
21+
VERSION = "v1.0.2.1-beta"
3822
APPLY_NAME = "SecRandom"
3923
GITHUB_WEB = "https://github.com/SecRandom/SecRandom"
24+
BILIBILI_WEB = "https://space.bilibili.com/520571577"
4025

4126
cfg = Config()
4227
cfg.themeMode.value = Theme.AUTO

0 commit comments

Comments
 (0)