nonebot-plugin-l4d2-server 0.6.6__py3-none-any.whl → 1.0.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nonebot_plugin_l4d2_server/__init__.py +10 -93
- nonebot_plugin_l4d2_server/__main__.py +140 -0
- nonebot_plugin_l4d2_server/config.py +35 -0
- nonebot_plugin_l4d2_server/data/font/loli.ttf +0 -0
- nonebot_plugin_l4d2_server/l4_anne/__init__.py +124 -0
- nonebot_plugin_l4d2_server/l4_anne/ranne.py +18 -0
- nonebot_plugin_l4d2_server/l4_help/Help.json +102 -0
- nonebot_plugin_l4d2_server/l4_help/__init__.py +57 -0
- nonebot_plugin_l4d2_server/l4_help/draw.py +206 -0
- nonebot_plugin_l4d2_server/l4_help/icon//344/273/213/347/273/215.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//344/273/273/345/212/241.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//344/277/241/346/201/257.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/205/254/345/221/212.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/200/345/211/221.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/207/346/215/242.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/240/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/210/267/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/215/241/347/273/204.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/223/252/351/207/214.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/234/260/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/205/245.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/207/272.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//345/275/261.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/213/274/345/233/276.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/216/242/347/264/242.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/216/250/351/200/201.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/224/266/351/233/206.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/224/273/347/225/245.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/233/264/346/226/260.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/235/220/346/226/231.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/237/245/350/257/242.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/240/241/351/252/214.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/257/217/346/234/210.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/267/261/346/270/212.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/267/273/345/212/240.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//346/270/205/351/231/244.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//347/212/266/346/200/201.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//347/255/276/345/210/260.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//347/273/221/345/256/232.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/241/250.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/241/250/346/203/205.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/247/222/350/211/262.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//350/256/260/345/275/225.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//351/205/215/347/275/256.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/icon//351/207/215/345/220/257.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/badge.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/banner.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/bg.jpg +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/button.png +0 -0
- nonebot_plugin_l4d2_server/l4_help/texture2d/icon.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/__init__.py +16 -0
- nonebot_plugin_l4d2_server/l4_image/anne_pil.py +17 -0
- nonebot_plugin_l4d2_server/l4_image/convert.py +175 -0
- nonebot_plugin_l4d2_server/{l4d2_image → l4_image}/download.py +11 -35
- nonebot_plugin_l4d2_server/l4_image/html_img.py +105 -0
- nonebot_plugin_l4d2_server/l4_image/image_tools.py +468 -0
- nonebot_plugin_l4d2_server/{data/L4D2/image/template → l4_image/img/anne}/back.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/anne/back1.jpg +0 -0
- nonebot_plugin_l4d2_server/{data/L4D2/image → l4_image/img}/head/head.png +0 -0
- nonebot_plugin_l4d2_server/{data/L4D2/image → l4_image/img}/header/logo.png +0 -0
- nonebot_plugin_l4d2_server/{data/L4D2/image → l4_image/img}/header/player1.jpg +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.html +299 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/HYPixel11pxU-2.ttf +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.html +341 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.html +355 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/Tutumianhuatang-Bold-2.ttf +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/bilibili.svg +1 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/github.svg +1 -0
- nonebot_plugin_l4d2_server/{data/L4D2/image → l4_image/img}/template/l.svg +0 -1
- nonebot_plugin_l4d2_server/l4_image/img/template/m.svg +1 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/normal.html +247 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/vac.png +0 -0
- nonebot_plugin_l4d2_server/l4_image/img/template/vac_white.png +0 -0
- nonebot_plugin_l4d2_server/{data/L4D2/image → l4_image/img}/template/w.svg +1 -1
- nonebot_plugin_l4d2_server/l4_image/model.py +15 -0
- nonebot_plugin_l4d2_server/{l4d2_image → l4_image}/vtfs.py +4 -2
- nonebot_plugin_l4d2_server/l4_request/__init__.py +143 -0
- nonebot_plugin_l4d2_server/l4_request/draw_msg.py +83 -0
- nonebot_plugin_l4d2_server/utils/api/api.py +10 -0
- nonebot_plugin_l4d2_server/utils/api/models.py +137 -0
- nonebot_plugin_l4d2_server/utils/api/request.py +337 -0
- nonebot_plugin_l4d2_server/utils/database/models.py +18 -0
- nonebot_plugin_l4d2_server/{l4d2_utils → utils}/utils.py +60 -63
- {nonebot_plugin_l4d2_server-0.6.6.dist-info → nonebot_plugin_l4d2_server-1.0.0a2.dist-info}/METADATA +57 -66
- nonebot_plugin_l4d2_server-1.0.0a2.dist-info/RECORD +96 -0
- {nonebot_plugin_l4d2_server-0.6.6.dist-info → nonebot_plugin_l4d2_server-1.0.0a2.dist-info}/WHEEL +1 -1
- nonebot_plugin_l4d2_server/data/L4D2/image/template/help.html +0 -263
- nonebot_plugin_l4d2_server/data/L4D2/image/template/help_dack.html +0 -231
- nonebot_plugin_l4d2_server/data/L4D2/image/template/m.svg +0 -1
- nonebot_plugin_l4d2_server/data/img/white.png +0 -0
- nonebot_plugin_l4d2_server/l4d2_anne/__init__.py +0 -95
- nonebot_plugin_l4d2_server/l4d2_anne/analysis.py +0 -54
- nonebot_plugin_l4d2_server/l4d2_anne/anne_telecom.py +0 -79
- nonebot_plugin_l4d2_server/l4d2_anne/server.py +0 -47
- nonebot_plugin_l4d2_server/l4d2_anne/startand.py +0 -17
- nonebot_plugin_l4d2_server/l4d2_anne/utils.py +0 -294
- nonebot_plugin_l4d2_server/l4d2_data/__init__.py +0 -105
- nonebot_plugin_l4d2_server/l4d2_data/config.py +0 -18
- nonebot_plugin_l4d2_server/l4d2_data/players.py +0 -100
- nonebot_plugin_l4d2_server/l4d2_data/serverip.py +0 -40
- nonebot_plugin_l4d2_server/l4d2_file/__init__.py +0 -222
- nonebot_plugin_l4d2_server/l4d2_file/ayromote.py +0 -64
- nonebot_plugin_l4d2_server/l4d2_file/input_json.py +0 -77
- nonebot_plugin_l4d2_server/l4d2_file/remote.py +0 -86
- nonebot_plugin_l4d2_server/l4d2_file/utils.py +0 -104
- nonebot_plugin_l4d2_server/l4d2_image/__init__.py +0 -125
- nonebot_plugin_l4d2_server/l4d2_image/htmlimg.py +0 -18
- nonebot_plugin_l4d2_server/l4d2_image/images.py +0 -92
- nonebot_plugin_l4d2_server/l4d2_image/one.py +0 -44
- nonebot_plugin_l4d2_server/l4d2_image/send_image_tool.py +0 -32
- nonebot_plugin_l4d2_server/l4d2_image/steam.py +0 -63
- nonebot_plugin_l4d2_server/l4d2_push/__init__.py +0 -225
- nonebot_plugin_l4d2_server/l4d2_queries/__init__.py +0 -326
- nonebot_plugin_l4d2_server/l4d2_queries/himi.py +0 -113
- nonebot_plugin_l4d2_server/l4d2_queries/local_ip.py +0 -41
- nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py +0 -370
- nonebot_plugin_l4d2_server/l4d2_queries/send_msg.py +0 -131
- nonebot_plugin_l4d2_server/l4d2_queries/utils.py +0 -212
- nonebot_plugin_l4d2_server/l4d2_server/__init__.py +0 -118
- nonebot_plugin_l4d2_server/l4d2_server/index.py +0 -0
- nonebot_plugin_l4d2_server/l4d2_server/rcon.py +0 -53
- nonebot_plugin_l4d2_server/l4d2_server/workshop.py +0 -82
- nonebot_plugin_l4d2_server/l4d2_update/__init__.py +0 -137
- nonebot_plugin_l4d2_server/l4d2_update/draw_update_log.py +0 -45
- nonebot_plugin_l4d2_server/l4d2_update/restart.py +0 -69
- nonebot_plugin_l4d2_server/l4d2_update/update.py +0 -53
- nonebot_plugin_l4d2_server/l4d2_utils/classcal.py +0 -53
- nonebot_plugin_l4d2_server/l4d2_utils/command.py +0 -23
- nonebot_plugin_l4d2_server/l4d2_utils/config.py +0 -201
- nonebot_plugin_l4d2_server/l4d2_utils/message.py +0 -59
- nonebot_plugin_l4d2_server/l4d2_utils/rule.py +0 -35
- nonebot_plugin_l4d2_server/l4d2_utils/seach.py +0 -43
- nonebot_plugin_l4d2_server/l4d2_utils/txt_to_img.py +0 -32
- nonebot_plugin_l4d2_server/l4d2_web/web.py +0 -277
- nonebot_plugin_l4d2_server/l4d2_web/webUI.py +0 -506
- nonebot_plugin_l4d2_server/l4d2_web/webUI_s.py +0 -94
- nonebot_plugin_l4d2_server-0.6.6.dist-info/RECORD +0 -70
- /nonebot_plugin_l4d2_server/{data/L4D2/image/template → l4_image/img/anne}/anne.html +0 -0
- /nonebot_plugin_l4d2_server/{data/L4D2/image/template → l4_image/img/anne}/group_ip.html +0 -0
- /nonebot_plugin_l4d2_server/{data/L4D2/image/template → l4_image/img/anne}/ip.html +0 -0
- /nonebot_plugin_l4d2_server/{data/L4D2/image → l4_image/img}/template/fingerprint.svg +0 -0
- /nonebot_plugin_l4d2_server/{data/L4D2/image → l4_image/img}/template/vue.css +0 -0
- /nonebot_plugin_l4d2_server/{l4d2_data/database.py → l4_request/utils.py} +0 -0
- {nonebot_plugin_l4d2_server-0.6.6.dist-info → nonebot_plugin_l4d2_server-1.0.0a2.dist-info}/licenses/LICENSE +0 -0
@@ -1,231 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<style>
|
4
|
-
body {
|
5
|
-
margin: 0px;
|
6
|
-
zoom: 150%;
|
7
|
-
background-color: #0D1117;
|
8
|
-
}
|
9
|
-
.image {
|
10
|
-
display: flex;
|
11
|
-
flex-direction: column;
|
12
|
-
overflow: scroll;
|
13
|
-
width: max-content;
|
14
|
-
padding: 20px;
|
15
|
-
}
|
16
|
-
.head {
|
17
|
-
display: flex;
|
18
|
-
flex-direction: row;
|
19
|
-
align-items: center;
|
20
|
-
justify-content: space-between;
|
21
|
-
background-color: #161B22;
|
22
|
-
padding-left: 20px;
|
23
|
-
padding-right: 20px;
|
24
|
-
padding-top: 10px;
|
25
|
-
padding-bottom: 10px;
|
26
|
-
border: 2px solid;
|
27
|
-
border-radius: 50px;
|
28
|
-
border-color: #1a1a1a;
|
29
|
-
font-size: 16px;
|
30
|
-
margin-bottom: 20px;
|
31
|
-
}
|
32
|
-
|
33
|
-
.plugins {
|
34
|
-
display: grid;
|
35
|
-
grid-template-columns: auto auto auto;
|
36
|
-
row-gap: 20px;
|
37
|
-
column-gap: 20px;
|
38
|
-
margin-bottom: 20px;
|
39
|
-
}
|
40
|
-
.plugin {
|
41
|
-
display: flex;
|
42
|
-
padding: 5px;
|
43
|
-
border: 1px solid;
|
44
|
-
border-radius: 5px;
|
45
|
-
border-color: #161B22;
|
46
|
-
box-shadow: 0px 2px 6px 1px rgba(0, 0, 0, 0.2);
|
47
|
-
background-color: #1a1a1a;
|
48
|
-
}
|
49
|
-
.plugin_meta {
|
50
|
-
display: flex;
|
51
|
-
flex-direction: column;
|
52
|
-
padding: 5px;
|
53
|
-
width: 250px;
|
54
|
-
justify-content: space-between;
|
55
|
-
}
|
56
|
-
.plugin_name {
|
57
|
-
font-size: 20px;
|
58
|
-
}
|
59
|
-
.plugin_description {
|
60
|
-
font-size: 15px;
|
61
|
-
color: gray;
|
62
|
-
margin-top: 5px;
|
63
|
-
margin-bottom: 5px;
|
64
|
-
}
|
65
|
-
.plugin_meta_line1 {
|
66
|
-
display: flex;
|
67
|
-
flex-direction: row;
|
68
|
-
align-items: center;
|
69
|
-
justify-content: space-between;
|
70
|
-
}
|
71
|
-
.plugin_meta_line3 {
|
72
|
-
display: flex;
|
73
|
-
flex-direction: row;
|
74
|
-
align-items: center;
|
75
|
-
}
|
76
|
-
.package_name_label {
|
77
|
-
background-image: url(./fingerprint.svg);
|
78
|
-
width: 13px;
|
79
|
-
height: 13px;
|
80
|
-
margin-right: 8px;
|
81
|
-
}
|
82
|
-
.package_name {
|
83
|
-
font-size: 13px;
|
84
|
-
color: gray;
|
85
|
-
}
|
86
|
-
.switch {
|
87
|
-
position: relative;
|
88
|
-
display: inline-block;
|
89
|
-
width: 40px;
|
90
|
-
height: 24px;
|
91
|
-
}
|
92
|
-
.slider {
|
93
|
-
position: absolute;
|
94
|
-
cursor: pointer;
|
95
|
-
top: 0;
|
96
|
-
left: 0;
|
97
|
-
right: 0;
|
98
|
-
bottom: 0;
|
99
|
-
background-color: #ccc;
|
100
|
-
}
|
101
|
-
.slider:before {
|
102
|
-
position: absolute;
|
103
|
-
content: "";
|
104
|
-
height: 16px;
|
105
|
-
width: 16px;
|
106
|
-
left: 4px;
|
107
|
-
bottom: 4px;
|
108
|
-
background-color: white;
|
109
|
-
}
|
110
|
-
.switch input {
|
111
|
-
display: none;
|
112
|
-
}
|
113
|
-
.switch input:checked + .slider {
|
114
|
-
background-color: rgba(46, 160, 67);
|
115
|
-
}
|
116
|
-
.switch input:checked + .slider:before {
|
117
|
-
-webkit-transform: translateX(16px);
|
118
|
-
-ms-transform: translateX(16px);
|
119
|
-
transform: translateX(16px);
|
120
|
-
}
|
121
|
-
.slider.round {
|
122
|
-
border-radius: 24px;
|
123
|
-
}
|
124
|
-
.slider.round:before {
|
125
|
-
border-radius: 50%;
|
126
|
-
}
|
127
|
-
.checkbox {
|
128
|
-
visibility: hidden;
|
129
|
-
}
|
130
|
-
.slider.locked {
|
131
|
-
opacity: 0.5;
|
132
|
-
}
|
133
|
-
.switch input + span .lock {
|
134
|
-
width: 8px;
|
135
|
-
height: 7px;
|
136
|
-
background: #99a3ba;
|
137
|
-
position: absolute;
|
138
|
-
left: 8px;
|
139
|
-
bottom: 7px;
|
140
|
-
border-radius: 2px;
|
141
|
-
display: block;
|
142
|
-
z-index: 1;
|
143
|
-
transition: all 0.45s ease;
|
144
|
-
}
|
145
|
-
.switch input + span .lock:before {
|
146
|
-
content: "";
|
147
|
-
width: 2px;
|
148
|
-
height: 2px;
|
149
|
-
border-radius: 1px;
|
150
|
-
background: #fff;
|
151
|
-
position: absolute;
|
152
|
-
display: block;
|
153
|
-
left: 50%;
|
154
|
-
top: 50%;
|
155
|
-
margin: -1px 0 0 -1px;
|
156
|
-
}
|
157
|
-
.switch input + span .lock:after {
|
158
|
-
content: "";
|
159
|
-
border-top-left-radius: 4px;
|
160
|
-
border-top-right-radius: 4px;
|
161
|
-
border: 1px solid #99a3ba;
|
162
|
-
border-bottom: 0;
|
163
|
-
width: 4px;
|
164
|
-
height: 4px;
|
165
|
-
left: 1px;
|
166
|
-
bottom: 6px;
|
167
|
-
position: absolute;
|
168
|
-
z-index: 1;
|
169
|
-
-webkit-transform-origin: 0 100%;
|
170
|
-
transform-origin: 0 100%;
|
171
|
-
transition: all 0.45s ease;
|
172
|
-
}
|
173
|
-
.switch input:checked + span .lock {
|
174
|
-
background: #5628ee;
|
175
|
-
-webkit-transform: translateX(16px);
|
176
|
-
-ms-transform: translateX(16px);
|
177
|
-
transform: translateX(16px);
|
178
|
-
}
|
179
|
-
.lock {
|
180
|
-
visibility: hidden;
|
181
|
-
}
|
182
|
-
.lock.locked {
|
183
|
-
visibility: inherit;
|
184
|
-
}
|
185
|
-
</style>
|
186
|
-
</head>
|
187
|
-
<body>
|
188
|
-
<div class="image">
|
189
|
-
<div class="head">
|
190
|
-
<span><b><font color="Silver">已加载服务器</font></b></span>
|
191
|
-
<span><font color="Silver">发送“<b>服务器昵称/序号</b>”查看详情</font></span>
|
192
|
-
</div>
|
193
|
-
<div class="plugins">
|
194
|
-
{% for plugin in plugins %}
|
195
|
-
<div class="plugin">
|
196
|
-
<div class="plugin_meta">
|
197
|
-
<div class="plugin_meta_line1">
|
198
|
-
<div class="plugin_name"><font color="DeepSkyBlue">{{ plugin.number }}:{{ plugin.name }}</font></div>
|
199
|
-
<div class="plugin_status">
|
200
|
-
<label class="switch">
|
201
|
-
<input class="checkbox" type="checkbox" {% if plugin.enabled %} checked {% endif %} />
|
202
|
-
<span class="slider round {% if plugin.locked %} locked {% endif %}">
|
203
|
-
<span class="lock {% if plugin.locked %} locked {% endif %}"></span>
|
204
|
-
</span>
|
205
|
-
</label>
|
206
|
-
</div>
|
207
|
-
</div>
|
208
|
-
<div class="plugin_meta_line2">
|
209
|
-
<font color="LightSkyBlue">{{ plugin.map_ }}</font><br>
|
210
|
-
{% for Player in plugin.Players %}
|
211
|
-
<font color="LightGray">{{ Player }}</font><br>
|
212
|
-
{% endfor %}
|
213
|
-
</div>
|
214
|
-
<div class="plugin_meta_line3">
|
215
|
-
<div class="package_name_label"></div>
|
216
|
-
<div class="package_name"><font color="LightGray">{{ plugin.max_players }}</font></div>
|
217
|
-
</div>
|
218
|
-
</div>
|
219
|
-
</div>
|
220
|
-
{% endfor %}
|
221
|
-
</div>
|
222
|
-
<div class="head">
|
223
|
-
<span><b><font color="Silver">©爱丽数码</font></b></span>
|
224
|
-
<span><font color="Silver">github*Agnes4m</font></span>
|
225
|
-
</div>
|
226
|
-
</div>
|
227
|
-
</body>
|
228
|
-
</html>
|
229
|
-
|
230
|
-
|
231
|
-
/*暗黑风格-ArcPav*/
|
@@ -1 +0,0 @@
|
|
1
|
-
<?xml version="1.0"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="150px" height="150px"> <path d="M 2.0996094 6.9609375 L 2.0996094 42.939453 L 27.550781 42.939453 L 29.679688 42.939453 L 48 42.939453 L 48 6.9609375 L 29.039062 6.9609375 L 26.599609 6.9609375 L 2.0996094 6.9609375 z M 27.679688 8.9609375 L 46 8.9609375 L 46 40.939453 L 29.009766 40.939453 C 28.739766 39.989453 28.540391 39.020781 28.400391 38.050781 C 28.290391 37.280781 28.229453 36.530547 28.189453 35.810547 L 28.189453 35.800781 C 28.197008 35.799475 28.20345 35.796383 28.210938 35.794922 C 28.213204 35.858583 28.208154 35.916455 28.210938 35.980469 C 28.870937 35.940469 29.529453 35.890547 30.189453 35.810547 C 33.709453 35.400547 37.179688 34.469062 40.429688 33.039062 L 39.630859 31.210938 C 36.640859 32.520937 33.450937 33.389063 30.210938 33.789062 C 29.550938 33.869062 28.880938 33.940469 28.210938 33.980469 C 28.21 34.000469 28.211816 34.02291 28.210938 34.042969 C 28.207058 34.04213 28.203118 34.041812 28.199219 34.041016 C 28.199457 34.034135 28.198978 34.026406 28.199219 34.019531 C 28.199219 33.999531 28.200937 33.990469 28.210938 33.980469 C 28.200937 33.910469 28.210938 33.849063 28.210938 33.789062 C 28.300938 32.099063 28.580156 30.600313 28.910156 29.320312 C 28.960156 29.130312 29.010547 28.949297 29.060547 28.779297 C 29.070547 28.769297 29.070078 28.750469 29.080078 28.730469 C 29.210078 28.270469 29.36 27.839453 29.5 27.439453 L 29.990234 26.099609 L 29.966797 26.099609 L 21.25 26.099609 C 21.83 22.079609 22.980156 18.180469 24.660156 14.480469 C 25.530156 12.570469 26.529688 10.720937 27.679688 8.9609375 z M 11.910156 13.972656 L 13.947266 13.972656 C 13.948266 15.658656 13.950172 17.34425 13.951172 19.03125 C 13.267172 19.02625 12.582437 19.021625 11.898438 19.015625 C 11.901438 17.334625 11.906156 15.653656 11.910156 13.972656 z M 34.009766 14.009766 L 34.009766 18.980469 L 35.875 18.980469 L 35.875 14.009766 L 34.009766 14.009766 z M 10.365234 31.150391 C 14.376234 32.920391 18.626281 33.889297 22.988281 34.029297 C 24.051281 34.059297 25.115734 34.050469 26.177734 33.980469 C 26.147734 34.620469 26.147734 35.290469 26.177734 35.980469 C 25.465734 36.030469 24.74225 36.050781 24.03125 36.050781 C 23.66025 36.050781 23.300687 36.039297 22.929688 36.029297 C 18.307688 35.879297 13.804734 34.860469 9.5527344 32.980469 L 10.365234 31.150391 z"/></svg>
|
Binary file
|
@@ -1,95 +0,0 @@
|
|
1
|
-
from nonebot import on_command
|
2
|
-
from nonebot.adapters.onebot.v11 import Message, MessageEvent
|
3
|
-
from nonebot.matcher import Matcher
|
4
|
-
from nonebot.params import CommandArg
|
5
|
-
from nonebot_plugin_saa import Image, MessageFactory
|
6
|
-
|
7
|
-
# from .l4d2_file.input_json import *
|
8
|
-
from ..l4d2_utils.config import MASTER
|
9
|
-
from ..l4d2_utils.utils import at_to_usrid, get_message_at
|
10
|
-
from .server import updata_anne_server
|
11
|
-
from .utils import bind_steam, name_exist, search_anne
|
12
|
-
|
13
|
-
# anne
|
14
|
-
anne_player = on_command("Ranne", aliases={"求生anne"}, priority=25, block=True)
|
15
|
-
anne_bind = on_command(
|
16
|
-
"Rbind",
|
17
|
-
aliases={"steam绑定", "求生绑定", "anne绑定"},
|
18
|
-
priority=20,
|
19
|
-
block=True,
|
20
|
-
)
|
21
|
-
del_bind = on_command(
|
22
|
-
"del_bind",
|
23
|
-
aliases={"steam解绑", "求生解绑", "anne解绑"},
|
24
|
-
priority=20,
|
25
|
-
block=True,
|
26
|
-
)
|
27
|
-
updata = on_command(
|
28
|
-
"updata_anne",
|
29
|
-
aliases={"求生更新anne"},
|
30
|
-
priority=20,
|
31
|
-
block=True,
|
32
|
-
permission=MASTER,
|
33
|
-
)
|
34
|
-
|
35
|
-
|
36
|
-
@anne_player.handle()
|
37
|
-
async def _(matcher: Matcher, event: MessageEvent, args: Message = CommandArg()):
|
38
|
-
name = args.extract_plain_text()
|
39
|
-
name = name.strip()
|
40
|
-
at = await get_message_at(event.json())
|
41
|
-
usr_id = at_to_usrid(at)
|
42
|
-
if not usr_id:
|
43
|
-
usr_id = event.user_id
|
44
|
-
# 没有参数则从db里找数据
|
45
|
-
msg = await search_anne(name, str(usr_id))
|
46
|
-
if isinstance(msg, str):
|
47
|
-
await matcher.finish(msg)
|
48
|
-
elif isinstance(msg, bytes):
|
49
|
-
await MessageFactory([Image(msg)]).finish()
|
50
|
-
|
51
|
-
|
52
|
-
@anne_bind.handle()
|
53
|
-
async def _(matcher: Matcher, event: MessageEvent, args: Message = CommandArg()):
|
54
|
-
tag = args.extract_plain_text()
|
55
|
-
tag = tag.strip()
|
56
|
-
if tag == "" or tag.isspace():
|
57
|
-
await matcher.finish("虚空绑定?")
|
58
|
-
usr_id = str(event.user_id)
|
59
|
-
nickname = event.sender.card or event.sender.nickname
|
60
|
-
if not nickname:
|
61
|
-
nickname = "宁宁"
|
62
|
-
msg = await bind_steam(usr_id, tag, nickname)
|
63
|
-
await matcher.finish(msg)
|
64
|
-
|
65
|
-
|
66
|
-
@del_bind.handle()
|
67
|
-
async def _(matcher: Matcher, event: MessageEvent):
|
68
|
-
usr_id = event.user_id
|
69
|
-
msg = name_exist(str(usr_id))
|
70
|
-
if not msg:
|
71
|
-
return
|
72
|
-
await matcher.finish(msg)
|
73
|
-
|
74
|
-
|
75
|
-
@del_bind.handle()
|
76
|
-
async def _(matcher: Matcher, event: MessageEvent):
|
77
|
-
usr_id = event.user_id
|
78
|
-
msg = name_exist(str(usr_id))
|
79
|
-
if not msg:
|
80
|
-
return
|
81
|
-
await matcher.finish(msg)
|
82
|
-
|
83
|
-
|
84
|
-
@updata.handle()
|
85
|
-
async def _(matcher: Matcher, args: Message = CommandArg()):
|
86
|
-
"""更新"""
|
87
|
-
if args:
|
88
|
-
# 占位先,除了电信服还有再加
|
89
|
-
...
|
90
|
-
anne_ip_dict = await updata_anne_server()
|
91
|
-
if not anne_ip_dict:
|
92
|
-
await matcher.finish("网络开小差了捏")
|
93
|
-
return
|
94
|
-
server_number = len(anne_ip_dict["云"])
|
95
|
-
await matcher.finish(f"更新成功\n一共更新了{server_number}个电信anne服ip")
|
@@ -1,54 +0,0 @@
|
|
1
|
-
import pandas as pd
|
2
|
-
|
3
|
-
from .startand import NUMBER_MAP, SAVE_MAP
|
4
|
-
|
5
|
-
|
6
|
-
async def df_to_guoguanlv(df: pd.DataFrame):
|
7
|
-
"""分析救援关过图率"""
|
8
|
-
data = df[df["游戏模式"] == "AnneHappy药役"]
|
9
|
-
other = df[df["游戏模式"].isin(["牛牛冲刺", "单人装逼"])]
|
10
|
-
all_map = len(data["地图"])
|
11
|
-
other_map = len(other["地图"])
|
12
|
-
resen = 0
|
13
|
-
last_maps = {}
|
14
|
-
for m in SAVE_MAP:
|
15
|
-
prefix = m.split("m")[0]
|
16
|
-
if prefix in last_maps:
|
17
|
-
last_maps[prefix] = max(last_maps[prefix], m)
|
18
|
-
else:
|
19
|
-
last_maps[prefix] = m
|
20
|
-
|
21
|
-
map_counts = {}
|
22
|
-
|
23
|
-
n = 0
|
24
|
-
for key in last_maps:
|
25
|
-
count = len(data[data["地图"].str.startswith(key)])
|
26
|
-
if count == 0:
|
27
|
-
continue
|
28
|
-
last_map = last_maps[key]
|
29
|
-
map_count = len(data[data["地图"] == last_map])
|
30
|
-
map_counts[key] = map_count * NUMBER_MAP[n] / count
|
31
|
-
quan = count / all_map
|
32
|
-
resen += quan * map_counts[key]
|
33
|
-
n += 1
|
34
|
-
|
35
|
-
# result = []
|
36
|
-
# for i in range(1, 15):
|
37
|
-
# key = 'c{}'.format(i)
|
38
|
-
# if key in map_counts:
|
39
|
-
# result.append('{}:{}%'.format(key, round(map_counts[key] * 100)))
|
40
|
-
|
41
|
-
# print(result)
|
42
|
-
# result = '救援图过关率: {:.2%}'.format(resen)
|
43
|
-
|
44
|
-
# 加上特殊关卡
|
45
|
-
try:
|
46
|
-
resen += other_map / (all_map + other_map)
|
47
|
-
result = {"救援关": str("{:.2%}".format(resen))}
|
48
|
-
except (TypeError, KeyError):
|
49
|
-
result = {"救援关": "错误"}
|
50
|
-
except ZeroDivisionError:
|
51
|
-
result = {"救援关": "0.00%"}
|
52
|
-
except Exception:
|
53
|
-
result = {"救援关": "错误"}
|
54
|
-
return result
|
@@ -1,79 +0,0 @@
|
|
1
|
-
# from ..l4d2_image.steam import url_to_byte
|
2
|
-
# from bs4 import BeautifulSoup
|
3
|
-
# from typing import List
|
4
|
-
|
5
|
-
# 暂时废弃
|
6
|
-
# class ANNE_API:
|
7
|
-
|
8
|
-
# async def __init__(
|
9
|
-
# self,
|
10
|
-
# STEAMID:str,
|
11
|
-
# tag:str
|
12
|
-
# ):
|
13
|
-
# self.STEAMID = STEAMID
|
14
|
-
# if tag == '中':
|
15
|
-
# msg1 = await self.anne_msg()
|
16
|
-
# elif tag == '长':
|
17
|
-
# msg1 = await self.anne_msg()
|
18
|
-
# msg1.update(await self.anne_map())
|
19
|
-
|
20
|
-
|
21
|
-
# async def anne_msg(self):
|
22
|
-
# """个人资料表"""
|
23
|
-
# data_bytes = await url_to_byte('https://sb.trygek.com/l4d_stats/ranking/player.php?steamid={self.STEAMID}')
|
24
|
-
# data_bs = BeautifulSoup(data_bytes, 'html.parser')
|
25
|
-
# data_fom = data_bs.find_all('table')
|
26
|
-
# n = 0
|
27
|
-
# data_dict = {}
|
28
|
-
# while n < 2:
|
29
|
-
# data_list:List[dict] = []
|
30
|
-
# detail2 = data_fom[n]
|
31
|
-
# tr = detail2.find_all('tr')
|
32
|
-
# for i in tr:
|
33
|
-
# title = i.find('td', {'class': 'w-50'})
|
34
|
-
# value = title.find_next_sibling('td')
|
35
|
-
# new_dict = {title.text:value.text}
|
36
|
-
# data_dict.update(new_dict)
|
37
|
-
# data_list.append(data_dict)
|
38
|
-
# n += 1
|
39
|
-
# # 获取头像
|
40
|
-
# element:str = data_fom.find_all(attrs={"style": "cursor:pointer"})[0].
|
41
|
-
# get("onclick")
|
42
|
-
# player_url = element.split("'")[1]
|
43
|
-
# data_list[0].update({"个人资料":player_url})
|
44
|
-
# # 获取一言
|
45
|
-
# message = data_fom.select("html body div.content.text-center.text-md-left div.
|
46
|
-
# container.text-left div.col-md-12.h-100 div.card-body.worldmap.d-flex.flex-column.
|
47
|
-
# justify-content-center.text-center span")
|
48
|
-
# msg_list = []
|
49
|
-
# for i in message:
|
50
|
-
# msg_list.append(i.text)
|
51
|
-
# data_list[0].update({"一言":msg_list})
|
52
|
-
# return data_list
|
53
|
-
|
54
|
-
# async def anne_map(self):
|
55
|
-
# """个人地图表"""
|
56
|
-
# data_dict = {}
|
57
|
-
# data_bytes = await url_to_byte('https://sb.trygek.com/l4d_stats/ranking/timedmaps.php?steamid={self.STEAMID}')
|
58
|
-
# data_bs = BeautifulSoup(data_bytes, 'html.parser')
|
59
|
-
# tbody = data_bs.select('tbody')
|
60
|
-
# for tr in tbody:
|
61
|
-
# tds = tr.select('td')
|
62
|
-
# n = 0
|
63
|
-
# for td in tds:
|
64
|
-
# n += 1
|
65
|
-
# title:str = td['data-title'][:-1]
|
66
|
-
# data_text = td.text
|
67
|
-
# if title == '特感数量':
|
68
|
-
# special_amount = data_text
|
69
|
-
# elif title == '刷新间隔':
|
70
|
-
# refresh_interval = data_text
|
71
|
-
# else:
|
72
|
-
# if title in data_dict:
|
73
|
-
# data_dict[title].append(data_text)
|
74
|
-
# else:
|
75
|
-
# data_dict[title] = [data_text]
|
76
|
-
# if special_amount and refresh_interval:
|
77
|
-
# data_dict['刷特时间'] = special_amount + refresh_interval
|
78
|
-
|
79
|
-
# return data_dict
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import json
|
2
|
-
from pathlib import Path
|
3
|
-
from typing import Dict, List
|
4
|
-
|
5
|
-
import httpx
|
6
|
-
from bs4 import BeautifulSoup
|
7
|
-
|
8
|
-
from ..l4d2_utils.config import ANNE_IP, CONFIG_PATH, anne_url, headers
|
9
|
-
|
10
|
-
|
11
|
-
async def updata_anne_server():
|
12
|
-
"""更新anne服务器列表"""
|
13
|
-
data = httpx.get(anne_url, headers=headers).content # noqa: ASYNC100
|
14
|
-
soup = BeautifulSoup(data, "html.parser")
|
15
|
-
tbody = soup.find("tbody")
|
16
|
-
if not tbody:
|
17
|
-
return None
|
18
|
-
n = 0
|
19
|
-
ip_list = []
|
20
|
-
while n < 50:
|
21
|
-
n += 1
|
22
|
-
tr = tbody.find(id=f"server_{n}") # type: ignore
|
23
|
-
if tr:
|
24
|
-
td: str = tr.select_one("td:nth-of-type(5)").get_text() # type: ignore
|
25
|
-
else:
|
26
|
-
continue
|
27
|
-
if td:
|
28
|
-
ip_list.append(td)
|
29
|
-
else:
|
30
|
-
continue
|
31
|
-
if not ip_list:
|
32
|
-
return None
|
33
|
-
ip_dict: Dict[str, List[Dict[str, str]]] = {"云": []}
|
34
|
-
n: int = 0
|
35
|
-
|
36
|
-
for i, ip in enumerate(ip_list, start=1):
|
37
|
-
ip_dict["云"].append({"id": str(i), "ip": ip})
|
38
|
-
|
39
|
-
# ANNE_IP.update(ip_dict)
|
40
|
-
with Path(CONFIG_PATH.parent / "l4d2/云.json").open(
|
41
|
-
mode="w",
|
42
|
-
encoding="utf-8",
|
43
|
-
) as f:
|
44
|
-
json.dump(ip_dict, f, indent=4, ensure_ascii=False)
|
45
|
-
# print(ANNE_IP)
|
46
|
-
ANNE_IP.update(ip_dict)
|
47
|
-
return ip_dict
|
@@ -1,17 +0,0 @@
|
|
1
|
-
NUMBER_MAP = [4, 5, 4, 5, 5, 3, 3, 5, 2, 5, 5, 5, 4, 2]
|
2
|
-
SAVE_MAP = [
|
3
|
-
"c1m4_atrium",
|
4
|
-
"c2m5_concert",
|
5
|
-
"c3m4_plantation",
|
6
|
-
"c4m5_milltown_escape",
|
7
|
-
"c5m5_bridge",
|
8
|
-
"c6m3_port",
|
9
|
-
"c7m3_port",
|
10
|
-
"c8m5_rooftop",
|
11
|
-
"c9m2_lots",
|
12
|
-
"c10m5_houseboat",
|
13
|
-
"c11m5_runway",
|
14
|
-
"c12m5_cornfield",
|
15
|
-
"c13m4_cutthroatcreek",
|
16
|
-
"c14m2_lighthouse",
|
17
|
-
]
|