-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathversion.py
More file actions
65 lines (46 loc) · 1.37 KB
/
version.py
File metadata and controls
65 lines (46 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"""
版本信息管理模块
统一管理应用程序的版本号和相关信息
"""
__version__ = "1.1.0"
__app_name__ = "哔哩哔哩评论观察者"
__app_name_en__ = "BiliBili Comment Analyzer"
__author__ = "sansan"
__description__ = "专业的B站评论数据分析下载器"
__author_url__ = "https://github.com/sansan0"
__repository__ = "https://github.com/sansan0/biliBili-comment-analyzer"
def get_version():
"""获取版本号"""
return __version__
def get_app_name():
"""获取应用名称(中文)"""
return __app_name__
def get_app_name_en():
"""获取应用名称(英文)"""
return __app_name_en__
def get_author():
"""获取作者名称"""
return __author__
def get_author_url():
"""获取作者链接"""
return __author_url__
def get_description():
"""获取应用描述"""
return __description__
def get_repository():
"""获取仓库地址"""
return __repository__
def get_full_version_info():
"""获取完整版本信息"""
return {
"version": __version__,
"app_name": __app_name__,
"app_name_en": __app_name_en__,
"author": __author__,
"description": __description__,
"author_url": __author_url__,
"repository": __repository__,
}
def get_version_display():
"""获取用于显示的版本字符串"""
return f"v{__version__}"