Files
douyin_guaji-main/version.py
T
Your Name 26df350755 feat: Implement 30-minute timeout protection and unify path configurations
- Introduced a 30-minute timeout mechanism to prevent the script from getting stuck in invalid states, with configurable timeout settings.
- Unified path configurations across the project to enhance maintainability and avoid hardcoded paths.
- Updated documentation and flowcharts to reflect the new timeout feature and improved path management.
- Fixed issues with template and screenshot path configurations to ensure consistency across the project.
2025-12-28 14:47:31 +08:00

32 lines
895 B
Python
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.
"""版本信息(统一入口)。
说明:
- APP_VERSION: 语义化版本号(含前缀 V)
- APP_BUILD_DATE: 构建/发布日期(YYYY-MM-DD)
运行前打印版本号的入口统一用 print_version_banner()。
"""
from typing import Optional
APP_NAME = "douyin_guaji"
APP_VERSION = "V3.3.3"
APP_BUILD_DATE = "2025-12-28"
# 兼容旧代码与测试:提供 VERSION / RELEASE_DATE 别名
# tests 期望: from version import VERSION, RELEASE_DATE, print_version_banner
# VERSION 应该是纯数字的 x.y.z 形式,这里去掉前缀 V
VERSION = APP_VERSION.lstrip("Vv")
RELEASE_DATE = APP_BUILD_DATE
def get_version_string() -> str:
return f"{APP_VERSION} ({APP_BUILD_DATE})"
def print_version_banner(app_name: Optional[str] = None) -> str:
name = (app_name or APP_NAME).strip() or APP_NAME
s = f"{name} 版本:{get_version_string()}"
print(s)
return s