nonebot-plugin-l4d2-server 0.6.6__py3-none-any.whl → 1.0.0a1__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.
Files changed (186) hide show
  1. nonebot_plugin_l4d2_server/__init__.py +9 -92
  2. nonebot_plugin_l4d2_server/__main__.py +90 -0
  3. nonebot_plugin_l4d2_server/config.py +30 -0
  4. nonebot_plugin_l4d2_server/data/L4D2/image/head/head.png +0 -0
  5. nonebot_plugin_l4d2_server/data/L4D2/image/header/logo.png +0 -0
  6. nonebot_plugin_l4d2_server/data/L4D2/image/header/player1.jpg +0 -0
  7. nonebot_plugin_l4d2_server/data/L4D2/image/template/anne.html +50 -42
  8. nonebot_plugin_l4d2_server/data/L4D2/image/template/back.png +0 -0
  9. nonebot_plugin_l4d2_server/data/L4D2/image/template/group_ip.html +1 -2
  10. nonebot_plugin_l4d2_server/data/L4D2/image/template/help.html +1 -2
  11. nonebot_plugin_l4d2_server/data/L4D2/image/template/help_dack.html +259 -221
  12. nonebot_plugin_l4d2_server/data/L4D2/image/template/ip.html +1 -2
  13. nonebot_plugin_l4d2_server/data/font/loli.ttf +0 -0
  14. nonebot_plugin_l4d2_server/data/icon//344/273/213/347/273/215.png +0 -0
  15. nonebot_plugin_l4d2_server/data/icon//344/273/273/345/212/241.png +0 -0
  16. nonebot_plugin_l4d2_server/data/icon//344/277/241/346/201/257.png +0 -0
  17. nonebot_plugin_l4d2_server/data/icon//345/205/254/345/221/212.png +0 -0
  18. nonebot_plugin_l4d2_server/data/icon//345/210/200/345/211/221.png +0 -0
  19. nonebot_plugin_l4d2_server/data/icon//345/210/207/346/215/242.png +0 -0
  20. nonebot_plugin_l4d2_server/data/icon//345/210/240/351/231/244.png +0 -0
  21. nonebot_plugin_l4d2_server/data/icon//345/210/267/346/226/260.png +0 -0
  22. nonebot_plugin_l4d2_server/data/icon//345/215/241/347/273/204.png +0 -0
  23. nonebot_plugin_l4d2_server/data/icon//345/223/252/351/207/214.png +0 -0
  24. nonebot_plugin_l4d2_server/data/icon//345/234/260/345/233/276.png +0 -0
  25. nonebot_plugin_l4d2_server/data/icon//345/257/274/345/205/245.png +0 -0
  26. nonebot_plugin_l4d2_server/data/icon//345/257/274/345/207/272.png +0 -0
  27. nonebot_plugin_l4d2_server/data/icon//345/275/261.png +0 -0
  28. nonebot_plugin_l4d2_server/data/icon//346/213/274/345/233/276.png +0 -0
  29. nonebot_plugin_l4d2_server/data/icon//346/216/242/347/264/242.png +0 -0
  30. nonebot_plugin_l4d2_server/data/icon//346/216/250/351/200/201.png +0 -0
  31. nonebot_plugin_l4d2_server/data/icon//346/224/266/351/233/206.png +0 -0
  32. nonebot_plugin_l4d2_server/data/icon//346/224/273/347/225/245.png +0 -0
  33. nonebot_plugin_l4d2_server/data/icon//346/233/264/346/226/260.png +0 -0
  34. nonebot_plugin_l4d2_server/data/icon//346/235/220/346/226/231.png +0 -0
  35. nonebot_plugin_l4d2_server/data/icon//346/237/245/350/257/242.png +0 -0
  36. nonebot_plugin_l4d2_server/data/icon//346/240/241/351/252/214.png +0 -0
  37. nonebot_plugin_l4d2_server/data/icon//346/257/217/346/234/210.png +0 -0
  38. nonebot_plugin_l4d2_server/data/icon//346/267/261/346/270/212.png +0 -0
  39. nonebot_plugin_l4d2_server/data/icon//346/267/273/345/212/240.png +0 -0
  40. nonebot_plugin_l4d2_server/data/icon//346/270/205/351/231/244.png +0 -0
  41. nonebot_plugin_l4d2_server/data/icon//347/212/266/346/200/201.png +0 -0
  42. nonebot_plugin_l4d2_server/data/icon//347/255/276/345/210/260.png +0 -0
  43. nonebot_plugin_l4d2_server/data/icon//347/273/221/345/256/232.png +0 -0
  44. nonebot_plugin_l4d2_server/data/icon//350/241/250.png +0 -0
  45. nonebot_plugin_l4d2_server/data/icon//350/241/250/346/203/205.png +0 -0
  46. nonebot_plugin_l4d2_server/data/icon//350/247/222/350/211/262.png +0 -0
  47. nonebot_plugin_l4d2_server/data/icon//350/256/260/345/275/225.png +0 -0
  48. nonebot_plugin_l4d2_server/data/icon//351/205/215/347/275/256.png +0 -0
  49. nonebot_plugin_l4d2_server/data/icon//351/207/215/345/220/257.png +0 -0
  50. nonebot_plugin_l4d2_server/data/img/l4d2.png +0 -0
  51. nonebot_plugin_l4d2_server/data/img/linux.png +0 -0
  52. nonebot_plugin_l4d2_server/data/img/vac.png +0 -0
  53. nonebot_plugin_l4d2_server/data/img/white.png +0 -0
  54. nonebot_plugin_l4d2_server/l4_help/Help.json +65 -0
  55. nonebot_plugin_l4d2_server/l4_help/__init__.py +57 -0
  56. nonebot_plugin_l4d2_server/l4_help/draw.py +206 -0
  57. nonebot_plugin_l4d2_server/l4_help/icon//344/273/213/347/273/215.png +0 -0
  58. nonebot_plugin_l4d2_server/l4_help/icon//344/273/273/345/212/241.png +0 -0
  59. nonebot_plugin_l4d2_server/l4_help/icon//344/277/241/346/201/257.png +0 -0
  60. nonebot_plugin_l4d2_server/l4_help/icon//345/205/254/345/221/212.png +0 -0
  61. nonebot_plugin_l4d2_server/l4_help/icon//345/210/200/345/211/221.png +0 -0
  62. nonebot_plugin_l4d2_server/l4_help/icon//345/210/207/346/215/242.png +0 -0
  63. nonebot_plugin_l4d2_server/l4_help/icon//345/210/240/351/231/244.png +0 -0
  64. nonebot_plugin_l4d2_server/l4_help/icon//345/210/267/346/226/260.png +0 -0
  65. nonebot_plugin_l4d2_server/l4_help/icon//345/215/241/347/273/204.png +0 -0
  66. nonebot_plugin_l4d2_server/l4_help/icon//345/223/252/351/207/214.png +0 -0
  67. nonebot_plugin_l4d2_server/l4_help/icon//345/234/260/345/233/276.png +0 -0
  68. nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/205/245.png +0 -0
  69. nonebot_plugin_l4d2_server/l4_help/icon//345/257/274/345/207/272.png +0 -0
  70. nonebot_plugin_l4d2_server/l4_help/icon//345/275/261.png +0 -0
  71. nonebot_plugin_l4d2_server/l4_help/icon//346/213/274/345/233/276.png +0 -0
  72. nonebot_plugin_l4d2_server/l4_help/icon//346/216/242/347/264/242.png +0 -0
  73. nonebot_plugin_l4d2_server/l4_help/icon//346/216/250/351/200/201.png +0 -0
  74. nonebot_plugin_l4d2_server/l4_help/icon//346/224/266/351/233/206.png +0 -0
  75. nonebot_plugin_l4d2_server/l4_help/icon//346/224/273/347/225/245.png +0 -0
  76. nonebot_plugin_l4d2_server/l4_help/icon//346/233/264/346/226/260.png +0 -0
  77. nonebot_plugin_l4d2_server/l4_help/icon//346/235/220/346/226/231.png +0 -0
  78. nonebot_plugin_l4d2_server/l4_help/icon//346/237/245/350/257/242.png +0 -0
  79. nonebot_plugin_l4d2_server/l4_help/icon//346/240/241/351/252/214.png +0 -0
  80. nonebot_plugin_l4d2_server/l4_help/icon//346/257/217/346/234/210.png +0 -0
  81. nonebot_plugin_l4d2_server/l4_help/icon//346/267/261/346/270/212.png +0 -0
  82. nonebot_plugin_l4d2_server/l4_help/icon//346/267/273/345/212/240.png +0 -0
  83. nonebot_plugin_l4d2_server/l4_help/icon//346/270/205/351/231/244.png +0 -0
  84. nonebot_plugin_l4d2_server/l4_help/icon//347/212/266/346/200/201.png +0 -0
  85. nonebot_plugin_l4d2_server/l4_help/icon//347/255/276/345/210/260.png +0 -0
  86. nonebot_plugin_l4d2_server/l4_help/icon//347/273/221/345/256/232.png +0 -0
  87. nonebot_plugin_l4d2_server/l4_help/icon//350/241/250.png +0 -0
  88. nonebot_plugin_l4d2_server/l4_help/icon//350/241/250/346/203/205.png +0 -0
  89. nonebot_plugin_l4d2_server/l4_help/icon//350/247/222/350/211/262.png +0 -0
  90. nonebot_plugin_l4d2_server/l4_help/icon//350/256/260/345/275/225.png +0 -0
  91. nonebot_plugin_l4d2_server/l4_help/icon//351/205/215/347/275/256.png +0 -0
  92. nonebot_plugin_l4d2_server/l4_help/icon//351/207/215/345/220/257.png +0 -0
  93. nonebot_plugin_l4d2_server/l4_help/texture2d/badge.png +0 -0
  94. nonebot_plugin_l4d2_server/l4_help/texture2d/banner.png +0 -0
  95. nonebot_plugin_l4d2_server/l4_help/texture2d/bg.jpg +0 -0
  96. nonebot_plugin_l4d2_server/l4_help/texture2d/button.png +0 -0
  97. nonebot_plugin_l4d2_server/l4_help/texture2d/icon.png +0 -0
  98. nonebot_plugin_l4d2_server/l4_image/__init__.py +16 -0
  99. nonebot_plugin_l4d2_server/l4_image/convert.py +175 -0
  100. nonebot_plugin_l4d2_server/{l4d2_image → l4_image}/download.py +6 -30
  101. nonebot_plugin_l4d2_server/{l4d2_image/__init__.py → l4_image/html_img.py} +54 -45
  102. nonebot_plugin_l4d2_server/l4_image/image_tools.py +468 -0
  103. nonebot_plugin_l4d2_server/l4_image/img/anne/anne.html +60 -0
  104. nonebot_plugin_l4d2_server/l4_image/img/anne/back.png +0 -0
  105. nonebot_plugin_l4d2_server/l4_image/img/anne/group_ip.html +259 -0
  106. nonebot_plugin_l4d2_server/l4_image/img/anne/ip.html +55 -0
  107. nonebot_plugin_l4d2_server/l4_image/img/head/head.png +0 -0
  108. nonebot_plugin_l4d2_server/l4_image/img/header/logo.png +0 -0
  109. nonebot_plugin_l4d2_server/l4_image/img/header/player1.jpg +0 -0
  110. nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.html +312 -0
  111. nonebot_plugin_l4d2_server/l4_image/img/template/Bocchi_The_Rock.png +0 -0
  112. nonebot_plugin_l4d2_server/l4_image/img/template/HYPixel11pxU-2.ttf +0 -0
  113. nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.html +350 -0
  114. nonebot_plugin_l4d2_server/l4_image/img/template/Pixel.png +0 -0
  115. nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.html +321 -0
  116. nonebot_plugin_l4d2_server/l4_image/img/template/Rainbow.png +0 -0
  117. nonebot_plugin_l4d2_server/l4_image/img/template/Tutumianhuatang-Bold-2.ttf +0 -0
  118. nonebot_plugin_l4d2_server/l4_image/img/template/bilibili.svg +1 -0
  119. nonebot_plugin_l4d2_server/l4_image/img/template/fingerprint.svg +15 -0
  120. nonebot_plugin_l4d2_server/l4_image/img/template/github.svg +1 -0
  121. nonebot_plugin_l4d2_server/l4_image/img/template/l.svg +9 -0
  122. nonebot_plugin_l4d2_server/l4_image/img/template/m.svg +1 -0
  123. nonebot_plugin_l4d2_server/l4_image/img/template/normal.html +257 -0
  124. nonebot_plugin_l4d2_server/l4_image/img/template/vue.css +531 -0
  125. nonebot_plugin_l4d2_server/l4_image/img/template/w.svg +1 -0
  126. nonebot_plugin_l4d2_server/l4_image/img/template//345/276/256/350/275/257/351/233/205/351/273/221.ttf +0 -0
  127. nonebot_plugin_l4d2_server/l4_image/model.py +15 -0
  128. nonebot_plugin_l4d2_server/{l4d2_image → l4_image}/vtfs.py +2 -0
  129. nonebot_plugin_l4d2_server/l4_request/__init__.py +84 -0
  130. nonebot_plugin_l4d2_server/l4_request/draw_msg.py +88 -0
  131. nonebot_plugin_l4d2_server/utils/api/api.py +4 -0
  132. nonebot_plugin_l4d2_server/utils/api/models.py +29 -0
  133. nonebot_plugin_l4d2_server/utils/api/request.py +119 -0
  134. nonebot_plugin_l4d2_server/utils/database/models.py +29 -0
  135. nonebot_plugin_l4d2_server/{l4d2_utils → utils}/utils.py +52 -55
  136. {nonebot_plugin_l4d2_server-0.6.6.dist-info → nonebot_plugin_l4d2_server-1.0.0a1.dist-info}/METADATA +47 -64
  137. nonebot_plugin_l4d2_server-1.0.0a1.dist-info/RECORD +144 -0
  138. {nonebot_plugin_l4d2_server-0.6.6.dist-info → nonebot_plugin_l4d2_server-1.0.0a1.dist-info}/WHEEL +1 -1
  139. nonebot_plugin_l4d2_server/l4d2_anne/__init__.py +0 -95
  140. nonebot_plugin_l4d2_server/l4d2_anne/analysis.py +0 -54
  141. nonebot_plugin_l4d2_server/l4d2_anne/anne_telecom.py +0 -79
  142. nonebot_plugin_l4d2_server/l4d2_anne/server.py +0 -47
  143. nonebot_plugin_l4d2_server/l4d2_anne/startand.py +0 -17
  144. nonebot_plugin_l4d2_server/l4d2_anne/utils.py +0 -294
  145. nonebot_plugin_l4d2_server/l4d2_data/__init__.py +0 -105
  146. nonebot_plugin_l4d2_server/l4d2_data/config.py +0 -18
  147. nonebot_plugin_l4d2_server/l4d2_data/database.py +0 -0
  148. nonebot_plugin_l4d2_server/l4d2_data/players.py +0 -100
  149. nonebot_plugin_l4d2_server/l4d2_data/serverip.py +0 -40
  150. nonebot_plugin_l4d2_server/l4d2_file/__init__.py +0 -222
  151. nonebot_plugin_l4d2_server/l4d2_file/ayromote.py +0 -64
  152. nonebot_plugin_l4d2_server/l4d2_file/input_json.py +0 -77
  153. nonebot_plugin_l4d2_server/l4d2_file/remote.py +0 -86
  154. nonebot_plugin_l4d2_server/l4d2_file/utils.py +0 -104
  155. nonebot_plugin_l4d2_server/l4d2_image/htmlimg.py +0 -18
  156. nonebot_plugin_l4d2_server/l4d2_image/images.py +0 -92
  157. nonebot_plugin_l4d2_server/l4d2_image/one.py +0 -44
  158. nonebot_plugin_l4d2_server/l4d2_image/send_image_tool.py +0 -32
  159. nonebot_plugin_l4d2_server/l4d2_image/steam.py +0 -63
  160. nonebot_plugin_l4d2_server/l4d2_push/__init__.py +0 -225
  161. nonebot_plugin_l4d2_server/l4d2_queries/__init__.py +0 -326
  162. nonebot_plugin_l4d2_server/l4d2_queries/himi.py +0 -113
  163. nonebot_plugin_l4d2_server/l4d2_queries/local_ip.py +0 -41
  164. nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py +0 -370
  165. nonebot_plugin_l4d2_server/l4d2_queries/send_msg.py +0 -131
  166. nonebot_plugin_l4d2_server/l4d2_queries/utils.py +0 -212
  167. nonebot_plugin_l4d2_server/l4d2_server/__init__.py +0 -118
  168. nonebot_plugin_l4d2_server/l4d2_server/index.py +0 -0
  169. nonebot_plugin_l4d2_server/l4d2_server/rcon.py +0 -53
  170. nonebot_plugin_l4d2_server/l4d2_server/workshop.py +0 -82
  171. nonebot_plugin_l4d2_server/l4d2_update/__init__.py +0 -137
  172. nonebot_plugin_l4d2_server/l4d2_update/draw_update_log.py +0 -45
  173. nonebot_plugin_l4d2_server/l4d2_update/restart.py +0 -69
  174. nonebot_plugin_l4d2_server/l4d2_update/update.py +0 -53
  175. nonebot_plugin_l4d2_server/l4d2_utils/classcal.py +0 -53
  176. nonebot_plugin_l4d2_server/l4d2_utils/command.py +0 -23
  177. nonebot_plugin_l4d2_server/l4d2_utils/config.py +0 -201
  178. nonebot_plugin_l4d2_server/l4d2_utils/message.py +0 -59
  179. nonebot_plugin_l4d2_server/l4d2_utils/rule.py +0 -35
  180. nonebot_plugin_l4d2_server/l4d2_utils/seach.py +0 -43
  181. nonebot_plugin_l4d2_server/l4d2_utils/txt_to_img.py +0 -32
  182. nonebot_plugin_l4d2_server/l4d2_web/web.py +0 -277
  183. nonebot_plugin_l4d2_server/l4d2_web/webUI.py +0 -506
  184. nonebot_plugin_l4d2_server/l4d2_web/webUI_s.py +0 -94
  185. nonebot_plugin_l4d2_server-0.6.6.dist-info/RECORD +0 -70
  186. {nonebot_plugin_l4d2_server-0.6.6.dist-info → nonebot_plugin_l4d2_server-1.0.0a1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,531 @@
1
+ @import 'vue/fonts.css';
2
+
3
+ :root {
4
+ --side-bar-bg-color: #fff;
5
+ --control-text-color: #777;
6
+ --font-sans-serif: 'Ubuntu', 'Source Sans Pro', sans-serif !important;
7
+ --font-monospace: 'Fira Code', 'Roboto Mono', monospace !important;
8
+ }
9
+
10
+ html {
11
+ font-size: 16px;
12
+ }
13
+
14
+ body {
15
+ font-family: var(--font-sans-serif);
16
+ color: #004d99;
17
+ -webkit-font-smoothing: antialiased;
18
+ line-height: 1.6rem;
19
+ letter-spacing: 0;
20
+ margin: 0;
21
+ overflow-x: hidden;
22
+ box-sizing: border-box;
23
+ border-color: solid 50px rgb(0, 255, 42);
24
+ }
25
+
26
+ body::before {
27
+ content: "";
28
+ position: fixed;
29
+ top: 0;
30
+ left: 0;
31
+ width: 100%;
32
+ height: 100%;
33
+ background-color: rgba(255, 255, 255, 0);
34
+ z-index: -1;
35
+ }
36
+
37
+ #write {
38
+ max-width: 860px;
39
+ margin: 0 auto;
40
+ padding: 20px 30px 100px;
41
+ }
42
+
43
+ #write p {
44
+ line-height: 1.6rem;
45
+ word-spacing: .05rem;
46
+ }
47
+
48
+ #write ol li {
49
+ padding-left: 0.5rem;
50
+ }
51
+
52
+ #write > ul:first-child,
53
+ #write > ol:first-child {
54
+ margin-top: 30px;
55
+ }
56
+
57
+ body > *:first-child {
58
+ margin-top: 0 !important;
59
+ }
60
+
61
+ body > *:last-child {
62
+ margin-bottom: 0 !important;
63
+ }
64
+
65
+ a {
66
+ color: #42b983;
67
+ font-weight: 600;
68
+ padding: 0 2px;
69
+ text-decoration: none;
70
+ }
71
+
72
+ h1,
73
+ h2,
74
+ h3,
75
+ h4,
76
+ h5,
77
+ h6 {
78
+ position: relative;
79
+ margin-top: 1rem;
80
+ margin-bottom: 1rem;
81
+ font-weight: bold;
82
+ line-height: 1.4;
83
+ cursor: text;
84
+ }
85
+
86
+ h1:hover a.anchor,
87
+ h2:hover a.anchor,
88
+ h3:hover a.anchor,
89
+ h4:hover a.anchor,
90
+ h5:hover a.anchor,
91
+ h6:hover a.anchor {
92
+ text-decoration: none;
93
+ }
94
+
95
+ h1 tt,
96
+ h1 code {
97
+ font-size: inherit !important;
98
+ }
99
+
100
+ h2 tt,
101
+ h2 code {
102
+ font-size: inherit !important;
103
+ }
104
+
105
+ h3 tt,
106
+ h3 code {
107
+ font-size: inherit !important;
108
+ }
109
+
110
+ h4 tt,
111
+ h4 code {
112
+ font-size: inherit !important;
113
+ }
114
+
115
+ h5 tt,
116
+ h5 code {
117
+ font-size: inherit !important;
118
+ }
119
+
120
+ h6 tt,
121
+ h6 code {
122
+ font-size: inherit !important;
123
+ }
124
+
125
+ h2 a,
126
+ h3 a {
127
+ color: #34495e;
128
+ }
129
+
130
+ h1 {
131
+ padding-bottom: .4rem;
132
+ font-size: 2.2rem;
133
+ line-height: 1.3;
134
+ }
135
+
136
+ h2 {
137
+ font-size: 1.75rem;
138
+ line-height: 1.225;
139
+ margin: 35px 0 15px;
140
+ padding-bottom: 0.5em;
141
+ border-bottom: 1px solid #ddd;
142
+ }
143
+
144
+ h3 {
145
+ font-size: 1.4rem;
146
+ line-height: 1.43;
147
+ margin: 20px 0 7px;
148
+ }
149
+
150
+ h4 {
151
+ font-size: 1.2rem;
152
+ }
153
+
154
+ h5 {
155
+ font-size: 1rem;
156
+ }
157
+
158
+ h6 {
159
+ font-size: 1rem;
160
+ color: #777;
161
+ }
162
+
163
+ p,
164
+ blockquote,
165
+ ul,
166
+ ol,
167
+ dl,
168
+ table {
169
+ margin: 0.8em 0;
170
+ }
171
+
172
+ li > ol,
173
+ li > ul {
174
+ margin: 0 0;
175
+ }
176
+
177
+ hr {
178
+ height: 2px;
179
+ padding: 0;
180
+ margin: 16px 0;
181
+ background-color: #e7e7e7;
182
+ border: 0 none;
183
+ overflow: hidden;
184
+ box-sizing: content-box;
185
+ }
186
+
187
+ body > h2:first-child {
188
+ margin-top: 0;
189
+ padding-top: 0;
190
+ }
191
+
192
+ body > h1:first-child {
193
+ margin-top: 0;
194
+ padding-top: 0;
195
+ }
196
+
197
+ body > h1:first-child + h2 {
198
+ margin-top: 0;
199
+ padding-top: 0;
200
+ }
201
+
202
+ body > h3:first-child,
203
+ body > h4:first-child,
204
+ body > h5:first-child,
205
+ body > h6:first-child {
206
+ margin-top: 0;
207
+ padding-top: 0;
208
+ }
209
+
210
+ a:first-child h1,
211
+ a:first-child h2,
212
+ a:first-child h3,
213
+ a:first-child h4,
214
+ a:first-child h5,
215
+ a:first-child h6 {
216
+ margin-top: 0;
217
+ padding-top: 0;
218
+ }
219
+
220
+ h1 p,
221
+ h2 p,
222
+ h3 p,
223
+ h4 p,
224
+ h5 p,
225
+ h6 p {
226
+ margin-top: 0;
227
+ }
228
+
229
+ li p.first {
230
+ display: inline-block;
231
+ }
232
+
233
+ ul,
234
+ ol {
235
+ padding-left: 30px;
236
+ }
237
+
238
+ ul:first-child,
239
+ ol:first-child {
240
+ margin-top: 0;
241
+ }
242
+
243
+ ul:last-child,
244
+ ol:last-child {
245
+ margin-bottom: 0;
246
+ }
247
+
248
+ blockquote {
249
+ border-left: 4px solid #42b983;
250
+ padding: 10px 15px;
251
+ color: #777;
252
+ background-color: rgba(66, 185, 131, .1);
253
+ }
254
+
255
+ table {
256
+ position: relative;
257
+ }
258
+ table::after {
259
+ content: "";
260
+ position: absolute;
261
+ top: 0;
262
+ left: 0;
263
+ width: 100%;
264
+ height: 100%;
265
+ border-collapse: collapse;
266
+ margin-top:50px;
267
+ }
268
+
269
+ table tr {
270
+ border-top: 1px solid #dfe2e5;
271
+ margin: 0;
272
+ padding: 0;
273
+ background: transparent;
274
+ background-color: rgba(255, 255, 255, 0.5);
275
+ }
276
+
277
+ table tr th {
278
+ color: #0080ff;
279
+ font-weight: bold;
280
+ border: 1px solid #00ff66;
281
+ border-bottom: 0;
282
+ text-align: left;
283
+ margin: 0;
284
+ padding: 6px 13px;
285
+ /* background-color: rgba(255, 255, 255, 0.5); */
286
+ }
287
+ table tr td {
288
+ color: #0080ff;
289
+ border: 1px solid #00ff66;
290
+ text-align: left;
291
+ margin: 0;
292
+ padding: 6px 13px;
293
+ /* background-color: rgba(255, 255, 255, 0.5); */
294
+ }
295
+
296
+ table tr th:first-child,
297
+ table tr td:first-child {
298
+ margin-top: 0;
299
+ }
300
+
301
+ table tr th:last-child,
302
+ table tr td:last-child {
303
+ margin-bottom: 0;
304
+ }
305
+
306
+ #write strong {
307
+ padding: 0 1px;
308
+ }
309
+
310
+ #write em {
311
+ padding: 0 5px 0 2px;
312
+ }
313
+
314
+ #write table thead th {
315
+ background-color: #f2f2f2;
316
+ }
317
+
318
+ #write .CodeMirror-gutters {
319
+ border-right: none;
320
+ }
321
+
322
+ #write .md-fences {
323
+ border: 1px solid #F4F4F4;
324
+ -webkit-font-smoothing: initial;
325
+ margin: 0.8rem 0 !important;
326
+ padding: 0.3rem 0 !important;
327
+ line-height: 1.43rem;
328
+ background-color: #F8F8F8 !important;
329
+ border-radius: 2px;
330
+ font-family: var(--font-monospace);
331
+ font-size: 0.85rem;
332
+ word-wrap: normal;
333
+ }
334
+
335
+ #write .CodeMirror-wrap .CodeMirror-code pre {
336
+ padding-left: 12px;
337
+ }
338
+
339
+ #write code, tt {
340
+ padding: 2px 4px;
341
+ border-radius: 2px;
342
+ font-family: var(--font-monospace);
343
+ font-size: 0.92rem;
344
+ color: #e96900;
345
+ background-color: #f8f8f8;
346
+ }
347
+
348
+ tt {
349
+ margin: 0 2px;
350
+ }
351
+
352
+ #write .md-footnote {
353
+ background-color: #f8f8f8;
354
+ color: #e96900;
355
+ }
356
+
357
+ /* heighlight. */
358
+ #write mark {
359
+ background-color: #EBFFEB;
360
+ border-radius: 2px;
361
+ padding: 2px 4px;
362
+ margin: 0 2px;
363
+ color: #222;
364
+ font-weight: 500;
365
+ }
366
+
367
+ #write del {
368
+ padding: 1px 2px;
369
+ }
370
+
371
+ .cm-s-inner .cm-link,
372
+ .cm-s-inner.cm-link {
373
+ color: #22a2c9;
374
+ }
375
+
376
+ .cm-s-inner .cm-string {
377
+ color: #22a2c9;
378
+ }
379
+
380
+ .md-task-list-item > input {
381
+ margin-left: -1.3em;
382
+ }
383
+
384
+ @media print {
385
+ html {
386
+ font-size: 13px;
387
+ }
388
+
389
+ table,
390
+ pre {
391
+ page-break-inside: avoid;
392
+ }
393
+
394
+ pre {
395
+ word-wrap: break-word;
396
+ }
397
+ }
398
+
399
+ .md-fences {
400
+ background-color: #f8f8f8;
401
+ }
402
+
403
+ .md-diagram-panel {
404
+ position: static !important;
405
+ }
406
+
407
+ #write pre.md-meta-block {
408
+ padding: 1rem;
409
+ font-size: 85%;
410
+ line-height: 1.45;
411
+ background-color: #f7f7f7;
412
+ border: 0;
413
+ border-radius: 3px;
414
+ color: #777777;
415
+ margin-top: 0 !important;
416
+ }
417
+
418
+ .mathjax-block > .code-tooltip {
419
+ bottom: .375rem;
420
+ }
421
+
422
+ #write > h3.md-focus:before {
423
+ left: -1.5625rem;
424
+ top: .375rem;
425
+ }
426
+
427
+ #write > h4.md-focus:before {
428
+ left: -1.5625rem;
429
+ top: .285714286rem;
430
+ }
431
+
432
+ #write > h5.md-focus:before {
433
+ left: -1.5625rem;
434
+ top: .285714286rem;
435
+ }
436
+
437
+ #write > h6.md-focus:before {
438
+ left: -1.5625rem;
439
+ top: .285714286rem;
440
+ }
441
+
442
+ .md-image > .md-meta {
443
+ border-radius: 3px;
444
+ font-family: var(--font-monospace);
445
+ padding: 2px 0 0 4px;
446
+ font-size: 0.9em;
447
+ color: inherit;
448
+ }
449
+
450
+ .md-tag {
451
+ color: inherit;
452
+ }
453
+
454
+ .md-toc {
455
+ margin-top: 20px;
456
+ padding-bottom: 20px;
457
+ }
458
+
459
+ .sidebar-tabs {
460
+ border-bottom: none;
461
+ }
462
+
463
+ #typora-quick-open {
464
+ border: 1px solid #ddd;
465
+ background-color: #f8f8f8;
466
+ }
467
+
468
+ #typora-quick-open-item {
469
+ background-color: #FAFAFA;
470
+ border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
471
+ border-style: solid;
472
+ border-width: 1px;
473
+ }
474
+
475
+ #md-notification:before {
476
+ top: 10px;
477
+ }
478
+
479
+ /** focus mode */
480
+
481
+ .on-focus-mode blockquote {
482
+ border-left-color: rgba(85, 85, 85, 0.12);
483
+ }
484
+
485
+ header,
486
+ .context-menu,
487
+ .megamenu-content,
488
+ footer {
489
+ font-family: var(--font-sans-serif);
490
+ }
491
+
492
+ .file-node-content:hover .file-node-icon,
493
+ .file-node-content:hover .file-node-open-state {
494
+ visibility: visible;
495
+ }
496
+
497
+ .mac-seamless-mode #typora-sidebar {
498
+ background-color: var(--side-bar-bg-color);
499
+ }
500
+
501
+ .md-lang {
502
+ color: #b4654d;
503
+ }
504
+
505
+ .html-for-mac .context-menu {
506
+ --item-hover-bg-color: #E6F0FE;
507
+ }
508
+
509
+ .transparent-bg {
510
+ background-color: rgba(255,255,255,0.5);
511
+ }
512
+
513
+
514
+ .myinfo {
515
+ width: 90%;
516
+ margin: auto;
517
+ }
518
+
519
+ /* .pc {
520
+ width: 1080px;
521
+ height: 400px;
522
+ padding: 0;
523
+ box-sizing: border-box;
524
+ border: solid 50px #fd7be7;
525
+ }
526
+ */
527
+ @media only screen and (min-height: 400px) {
528
+ .pc {
529
+ height: auto;
530
+ }
531
+ }
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
@@ -0,0 +1,15 @@
1
+ from typing import List, TypedDict
2
+
3
+
4
+ class PluginSV(TypedDict):
5
+ name: str
6
+ desc: str
7
+ eg: str
8
+ need_ck: bool
9
+ need_sk: bool
10
+ need_admin: bool
11
+
12
+
13
+ class PluginHelp(TypedDict):
14
+ desc: str
15
+ data: List[PluginSV]
@@ -4,6 +4,8 @@ from nonebot.log import logger
4
4
  from PIL import Image as Image
5
5
  from srctools.vtf import VTF, ImageFormats
6
6
 
7
+ ## 以下部分测试喷漆失败,todo
8
+
7
9
 
8
10
  async def img_to_vtf(pic_byte: bytes, tag) -> BytesIO:
9
11
  pic = BytesIO(pic_byte)
@@ -0,0 +1,84 @@
1
+ from typing import Dict, List, Optional, cast
2
+
3
+ from nonebot.log import logger
4
+
5
+ from ..config import server_all_path
6
+ from ..l4_image import msg_to_image
7
+ from ..utils.api.models import NserverOut
8
+ from ..utils.utils import split_maohao
9
+ from .draw_msg import draw_one_ip, get_much_server
10
+
11
+ try:
12
+ import ujson as json
13
+ except ImportError:
14
+ import json
15
+
16
+
17
+ # 获取全部服务器信息
18
+ ALLHOST: Dict[str, List[NserverOut]] = {}
19
+ COMMAND = set()
20
+
21
+
22
+ async def get_server_detail(command: str, _id: Optional[str] = None):
23
+ server_json = ALLHOST.get(command)
24
+ logger.info(server_json)
25
+ if server_json is None:
26
+ logger.warning("未找到这个组")
27
+ return None
28
+
29
+ if _id is None:
30
+ # 输出组信息
31
+ logger.info("正在请求组服务器信息")
32
+ server_dict = await get_much_server(server_json, command)
33
+ return await msg_to_image(server_dict)
34
+
35
+ # 返回单个
36
+ logger.info("正在请求单服务器信息")
37
+ for i in server_json:
38
+ if _id == i["id"]:
39
+ return await draw_one_ip(i["host"], i["port"])
40
+ return None
41
+
42
+
43
+ async def get_ip_server(ip: str):
44
+ host, port = split_maohao(ip)
45
+ return await draw_one_ip(host, port)
46
+
47
+
48
+ # 以下是重载ip
49
+ def reload_ip():
50
+ for item in server_all_path.iterdir():
51
+ if item.is_file():
52
+ if item.name.endswith("json"):
53
+ json_data = json.loads(item.read_text(encoding="utf-8"))
54
+ group_server = cast(Dict[str, List[NserverOut]], json_data)
55
+
56
+ for group, group_ip in group_server.items():
57
+ # 处理ip,host,port关系
58
+ for one_ip in group_ip:
59
+ if one_ip.get("ip"):
60
+ if one_ip.get("host") and one_ip.get("port"):
61
+ pass
62
+ if one_ip.get("host") and not one_ip.get("port"):
63
+ one_ip["port"] = 20715
64
+ if not one_ip.get("host"):
65
+ one_ip["host"], one_ip["port"] = split_maohao(
66
+ one_ip.get("ip"),
67
+ )
68
+ else:
69
+ if one_ip.get("host") and one_ip.get("port"):
70
+ one_ip["ip"] = f'{one_ip["host"]}:{one_ip["port"]}'
71
+ if one_ip.get("host") and not one_ip.get("port"):
72
+ one_ip["ip"] = f'{one_ip["host"]}:20715'
73
+ else:
74
+ logger.warning(f"{one_ip} 没有ip")
75
+
76
+ ALLHOST.update({group: group_ip})
77
+ COMMAND.add(group)
78
+ logger.success(f"成功加载 {item.name.split('.')[0]} {len(group_ip)}个")
79
+
80
+ if item.name.endswith("txt"):
81
+ """to do"""
82
+
83
+
84
+ reload_ip()
@@ -0,0 +1,88 @@
1
+ import asyncio
2
+ from typing import List
3
+
4
+ import a2s
5
+
6
+ from ..utils.api.models import NserverOut, OutServer
7
+ from ..utils.api.request import L4API
8
+
9
+
10
+ async def draw_one_ip(host: str, port: int):
11
+ """输出单个ip"""
12
+ # 先用文字凑合
13
+ try:
14
+ one_server = await L4API.a2s_info(host, port)
15
+ one_player = await L4API.a2s_players(host, port)
16
+ except asyncio.exceptions.TimeoutError:
17
+ return "服务器无响应"
18
+ player_msg = ""
19
+ if len(one_player):
20
+ max_duration_len = max([len(str(i.duration)) for i in one_player])
21
+ max_score_len = max([len(str(i.score)) for i in one_player])
22
+
23
+ for player in one_player:
24
+ soc = "[{:>{}}]".format(player.score, max_score_len)
25
+ chines_dur = await convert_duration(player.duration)
26
+ dur = "{:^{}}".format(chines_dur, max_duration_len)
27
+
28
+ player_msg += f"{soc} | {dur} | {player.name} \n"
29
+ else:
30
+ player_msg = "服务器感觉很安静啊"
31
+
32
+ return f""" 【{one_server.server_name}】
33
+ 游戏: {one_server.folder}
34
+ 地图: {one_server.map_name}
35
+ ping: {one_server.ping*1000:.0f}ms
36
+ {player_msg}
37
+ connect {host}:{port}
38
+ """
39
+
40
+
41
+ async def get_much_server(server_json: List[NserverOut], command):
42
+ out_server: List[OutServer] = []
43
+ for i in server_json:
44
+ try:
45
+ one_server = await L4API.a2s_info(i["host"], i["port"])
46
+ one_player = await L4API.a2s_players(i["host"], i["port"])
47
+ out_server.append(
48
+ {
49
+ "server": one_server,
50
+ "player": one_player,
51
+ "host": i["host"],
52
+ "port": i["port"],
53
+ "command": command,
54
+ "id_": i["id"],
55
+ },
56
+ )
57
+
58
+ except (asyncio.exceptions.TimeoutError, ConnectionRefusedError):
59
+ emtry_server = a2s.SourceInfo()
60
+ emtry_server.server_name = "服务器无响应"
61
+ emtry_server.map_name = "无"
62
+ emtry_server.player_count = 0
63
+ emtry_server.max_players = 0
64
+ out_server.append(
65
+ {
66
+ "server": emtry_server,
67
+ "player": [],
68
+ "host": i["host"],
69
+ "port": i["port"],
70
+ "command": command,
71
+ "id_": i["id"],
72
+ },
73
+ ) # type: ignore
74
+ return out_server
75
+
76
+
77
+ async def convert_duration(duration: float) -> str:
78
+ minutes, seconds = divmod(duration, 60)
79
+ hours, minutes = divmod(minutes, 60)
80
+ time_str = ""
81
+ if hours > 0:
82
+ time_str += f"{int(hours)}h "
83
+ if minutes > 0:
84
+ time_str += f"{int(minutes)}m "
85
+ time_str += f"{int(seconds)}s"
86
+ return time_str
87
+ time_str += f"{int(seconds)}s"
88
+ return time_str