docs: 修改文档

This commit is contained in:
2026-04-24 15:38:10 +08:00
parent 5b7b4ba443
commit f0b63fdeb6
8 changed files with 65 additions and 43 deletions

View File

@@ -1,5 +1,7 @@
from time import sleep, perf_counter
# import gc
# gc.set_threshold(100, 1, 1)
print("欢迎使用基本用户界面!")
print("加载配置与上下文... ", end="", flush=True)
_start_all = perf_counter()

View File

@@ -62,7 +62,7 @@ API 版本代号: `{version.codename.capitalize()}`
以 AGPL-3.0 开放源代码, 这直接意味着任何个体直接基于此代码对外或内部提供的应用和服务, 无论本地或网络, 必须向所有用户公开完整修改后的源代码, 且继续沿用 AGPL-3.0 协议.
您正使用的 TUI 用户界面是 python 版本程序库自带的基本用户界面, 以作为基本的全功能前端实现与程序库测试, 位于程序库根目录中的 interface 文件夹.
您正使用的 TUI 用户界面是 python 版本程序库自带的基本用户界面, 以作为第一个全功能前端实现与程序库测试套件, 位于程序库根目录中的 interface 文件夹.
您可在项目主页 https://ams.pluv27.top 获取用户指南, 开发文档与软件更新.
@@ -154,7 +154,7 @@ Textual 框架版本: {textual_version}
import distro
return f"{distro.name()} {distro.version()}"
except ImportError, AttributeError:
except (ImportError, AttributeError):
return platform.platform()
else:
return platform.platform()

View File

@@ -82,7 +82,7 @@ class DashboardScreen(Screen):
a = Attic("ana", {"totaltime": 0, "openpuzzles": 0, "puzzles_err": 0})
yield Label(f"版本 {version.ver} {version.stage.capitalize()}") # 版本信息
yield Label(
f"{round(a.data['totaltime'], 2)} 秒内处理了 {a.data['openpuzzles']} 个谜题, 正确率{'无法求解' if not a.data['openpuzzles'] else ' ' + str(round(100 * (1 - a.data['puzzles_err']/a.data['openpuzzles']), 2)) + '%'}, 平均速度{'无法求解' if not a.data['totaltime'] else ' ' + str(round(a.data['openpuzzles']/a.data['totaltime'], 2)) + '个/s'}",
f"{round(a.data['totaltime'], 2)} 秒内处理了 {a.data['openpuzzles']} 个谜题, 正确率{'无法求解' if not a.data['openpuzzles'] else ' ' + str(round(100 * (1 - a.data['puzzles_err']/a.data['openpuzzles']), 2)) + '%'}, 平均速度{'无法求解' if not a.data['totaltime'] else ' ' + str(round(a.data['openpuzzles']/a.data['totaltime'], 2)) + ' 个每秒'}",
id="analysis",
) # 版本信息
yield Footer()

View File

@@ -209,6 +209,8 @@ class MemScreen(Screen):
logger.debug(f"Quality: {quality}")
self.atom_reporter(quality)
if quality <= 3:
from heurams.services.attic import Attic
a = Attic("ana", {"puzzles_err": 0})
a.data["puzzles_err"] += 1
self.procession.append()