feat(core): 初步完成六星公招通知
This commit is contained in:
@@ -466,7 +466,7 @@ class AppConfig:
|
||||
cur.close()
|
||||
db.close()
|
||||
|
||||
def save_maa_log(self, log_path: Path, logs: list, maa_result: str) -> None:
|
||||
def save_maa_log(self, log_path: Path, logs: list, maa_result: str) -> bool:
|
||||
"""保存MAA日志"""
|
||||
|
||||
data: Dict[str, Union[str, Dict[str, Union[int, dict]]]] = {
|
||||
@@ -475,6 +475,8 @@ class AppConfig:
|
||||
"maa_result": maa_result,
|
||||
}
|
||||
|
||||
if_six_star = False
|
||||
|
||||
# 公招统计(仅统计招募到的)
|
||||
confirmed_recruit = False
|
||||
current_star_level = None
|
||||
@@ -490,6 +492,8 @@ class AppConfig:
|
||||
star_match = re.search(r"(\d+)\s*★ Tags", logs[i])
|
||||
if star_match:
|
||||
current_star_level = f"{star_match.group(1)}★"
|
||||
if current_star_level == "6★":
|
||||
if_six_star = True
|
||||
|
||||
if "已确认招募" in logs[i]: # 只有确认招募后才统计
|
||||
confirmed_recruit = True
|
||||
@@ -553,6 +557,8 @@ class AppConfig:
|
||||
|
||||
self.merge_maa_logs("所有项", log_path.parent)
|
||||
|
||||
return if_six_star
|
||||
|
||||
def merge_maa_logs(self, mode: str, logs_path: Union[Path, List[Path]]) -> dict:
|
||||
"""合并指定数据统计信息文件"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user