nonebot-plugin-aawarframe 0.1.2__tar.gz → 0.2.3__tar.gz
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_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/PKG-INFO +12 -19
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/README.md +8 -16
- nonebot_plugin_aawarframe-0.2.3/nonebot_plugin_aawarframe/__init__.py +52 -0
- nonebot_plugin_aawarframe-0.2.3/nonebot_plugin_aawarframe/assets/templates/archimedea.html +153 -0
- nonebot_plugin_aawarframe-0.2.3/nonebot_plugin_aawarframe/assets/templates/eidolon_clock.html +172 -0
- nonebot_plugin_aawarframe-0.2.3/nonebot_plugin_aawarframe/commands.py +25 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe.egg-info/PKG-INFO +12 -19
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe.egg-info/SOURCES.txt +2 -9
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe.egg-info/requires.txt +1 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/pyproject.toml +7 -4
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/__init__.py +0 -39
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/assets/templates/archimedea.html +0 -420
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/core/data_source.py +0 -17
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/data_fetcher.py +0 -9
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/data_processor.py +0 -181
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/data_sources/__init__.py +0 -38
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/data_sources/conquest_base.py +0 -23
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/data_sources/deep_archimedea.py +0 -10
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/data_sources/temporal_archimedea.py +0 -10
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/renderers/__init__.py +0 -25
- nonebot_plugin_aawarframe-0.1.2/nonebot_plugin_aawarframe/renderers/html_renderer.py +0 -111
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/LICENSE +0 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe/assets/conquest_zh.json +0 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe/assets/faction_type.json +0 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe/assets/mission_type.json +0 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe/assets/variables.json +0 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe.egg-info/dependency_links.txt +0 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/nonebot_plugin_aawarframe.egg-info/top_level.txt +0 -0
- {nonebot_plugin_aawarframe-0.1.2 → nonebot_plugin_aawarframe-0.2.3}/setup.cfg +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nonebot-plugin-aawarframe
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: aa 的 Warframe 助手
|
|
5
5
|
Author-email: nekox41 <aameow@outlook.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License-Expression: MIT
|
|
7
7
|
Requires-Python: ==3.12.*
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
@@ -11,12 +11,13 @@ Requires-Dist: nonebot2>=2.5.0
|
|
|
11
11
|
Requires-Dist: httpx~=0.28.1
|
|
12
12
|
Requires-Dist: nonebot-plugin-htmlkit>=0.1.0rc5
|
|
13
13
|
Requires-Dist: nonebot-adapter-onebot>=2.4.6
|
|
14
|
+
Requires-Dist: playwright>=1.40.0
|
|
14
15
|
Dynamic: license-file
|
|
15
16
|
|
|
16
17
|
<div align="center">
|
|
17
|
-
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/logo.png" width="180" height="180" alt="aawarframeLogo"></a>
|
|
18
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/logo.png" width="180" height="180" alt="aawarframeLogo"></a>
|
|
18
19
|
<br>
|
|
19
|
-
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/logo.svg" width="240" alt="aawarframeLogo"></p>
|
|
20
|
+
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/logo.svg" width="240" alt="aawarframeLogo"></p>
|
|
20
21
|
</div>
|
|
21
22
|
|
|
22
23
|
<div align="center">
|
|
@@ -81,20 +82,12 @@ _✨ Aa 的 Warframe 助手,用于查询游戏状态。 ✨_
|
|
|
81
82
|
|
|
82
83
|
</details>
|
|
83
84
|
|
|
84
|
-
## ⚙️ 配置
|
|
85
|
-
|
|
86
|
-
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
|
|
87
|
-
|
|
88
|
-
| 配置项 | 必填 | 默认值 | 说明 |
|
|
89
|
-
|:-----:|:----:|:----:|:----:|
|
|
90
|
-
| 配置项1 | 是 | 无 | 配置说明 |
|
|
91
|
-
| 配置项2 | 否 | 无 | 配置说明 |
|
|
92
|
-
|
|
93
85
|
## 🎉 使用
|
|
94
86
|
### 指令表
|
|
95
|
-
|
|
|
96
|
-
|
|
97
|
-
|
|
|
98
|
-
|
|
|
87
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
|
88
|
+
|:----:|:---:|:---:|:--:|:--------:|
|
|
89
|
+
| 夜灵平原 | 所有人 | 否 | 群聊 | 返回夜灵平原时间 |
|
|
90
|
+
| 时光科研 | 所有人 | 否 | 群聊 | 返回本周时光科研 |
|
|
91
|
+
| 深层科研 | 所有人 | 否 | 群聊 | 返回本周深层科研 |
|
|
99
92
|
### 效果图
|
|
100
|
-
|
|
93
|
+
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/example1.png" alt="效果图1"></p>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/logo.png" width="180" height="180" alt="aawarframeLogo"></a>
|
|
2
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/logo.png" width="180" height="180" alt="aawarframeLogo"></a>
|
|
3
3
|
<br>
|
|
4
|
-
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/logo.svg" width="240" alt="aawarframeLogo"></p>
|
|
4
|
+
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/logo.svg" width="240" alt="aawarframeLogo"></p>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
@@ -66,20 +66,12 @@ _✨ Aa 的 Warframe 助手,用于查询游戏状态。 ✨_
|
|
|
66
66
|
|
|
67
67
|
</details>
|
|
68
68
|
|
|
69
|
-
## ⚙️ 配置
|
|
70
|
-
|
|
71
|
-
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
|
|
72
|
-
|
|
73
|
-
| 配置项 | 必填 | 默认值 | 说明 |
|
|
74
|
-
|:-----:|:----:|:----:|:----:|
|
|
75
|
-
| 配置项1 | 是 | 无 | 配置说明 |
|
|
76
|
-
| 配置项2 | 否 | 无 | 配置说明 |
|
|
77
|
-
|
|
78
69
|
## 🎉 使用
|
|
79
70
|
### 指令表
|
|
80
|
-
|
|
|
81
|
-
|
|
82
|
-
|
|
|
83
|
-
|
|
|
71
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
|
72
|
+
|:----:|:---:|:---:|:--:|:--------:|
|
|
73
|
+
| 夜灵平原 | 所有人 | 否 | 群聊 | 返回夜灵平原时间 |
|
|
74
|
+
| 时光科研 | 所有人 | 否 | 群聊 | 返回本周时光科研 |
|
|
75
|
+
| 深层科研 | 所有人 | 否 | 群聊 | 返回本周深层科研 |
|
|
84
76
|
### 效果图
|
|
85
|
-
|
|
77
|
+
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/example1.png" alt="效果图1"></p>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import subprocess
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
from nonebot.plugin import PluginMetadata
|
|
6
|
+
from nonebot import get_driver
|
|
7
|
+
from nonebot.log import logger
|
|
8
|
+
|
|
9
|
+
from . import commands
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _run_install():
|
|
13
|
+
"""在子线程中执行 playwright install(同步调用,由 asyncio.to_thread 包装)"""
|
|
14
|
+
return subprocess.run(
|
|
15
|
+
[sys.executable, "-m", "playwright", "install", "--with-deps", "--only-shell"],
|
|
16
|
+
capture_output=True, text=True, timeout=120,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
async def _init_browser():
|
|
21
|
+
"""安装 Chromium 并预启动浏览器"""
|
|
22
|
+
logger.info("正在检查 Playwright Chromium,首次启动可能需要下载浏览器……")
|
|
23
|
+
try:
|
|
24
|
+
result = await asyncio.to_thread(_run_install)
|
|
25
|
+
if result.returncode == 0:
|
|
26
|
+
logger.info("Playwright Chromium 就绪")
|
|
27
|
+
else:
|
|
28
|
+
logger.warning(f"Chromium 安装可能失败: {result.stderr}")
|
|
29
|
+
return
|
|
30
|
+
except Exception as e:
|
|
31
|
+
logger.warning(f"Chromium 安装检查失败: {e}")
|
|
32
|
+
return
|
|
33
|
+
# 预启动浏览器,避免首次调用时的冷启动延迟
|
|
34
|
+
from .util.browser_manager import get_browser
|
|
35
|
+
await get_browser()
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@get_driver().on_startup
|
|
39
|
+
async def _init_playwright():
|
|
40
|
+
"""插件启动时初始化 Playwright(阻塞直到就绪,避免启动早期收到命令)"""
|
|
41
|
+
await _init_browser()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
__plugin_meta__ = PluginMetadata(
|
|
45
|
+
name='nonebot-plugin-aawarframe',
|
|
46
|
+
description='aa 的 Warframe 插件',
|
|
47
|
+
usage="",
|
|
48
|
+
type="application",
|
|
49
|
+
extra={},
|
|
50
|
+
homepage="https://github.com/nekox41/nonebot-plugin-aawarframe",
|
|
51
|
+
supported_adapters={"~onebot.v11"}
|
|
52
|
+
)
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>任务数据面板 · 樱花</title>
|
|
7
|
+
<style>
|
|
8
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
|
|
12
|
+
background: linear-gradient(135deg, #fff0f5, #ffe4f0, #f8e1f0);
|
|
13
|
+
color: #5c2a3a;
|
|
14
|
+
line-height: 1.6;
|
|
15
|
+
padding: 40px 20px;
|
|
16
|
+
width: 1200px;
|
|
17
|
+
position: relative;
|
|
18
|
+
overflow-x: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
body::before {
|
|
22
|
+
content: '';
|
|
23
|
+
position: fixed;
|
|
24
|
+
inset: 0;
|
|
25
|
+
background:
|
|
26
|
+
radial-gradient(circle at 15% 25%, rgba(255, 182, 193, 0.25) 0%, transparent 45%),
|
|
27
|
+
radial-gradient(circle at 80% 30%, rgba(255, 120, 160, 0.22) 0%, transparent 50%),
|
|
28
|
+
radial-gradient(circle at 35% 75%, rgba(255, 200, 220, 0.28) 0%, transparent 45%);
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
z-index: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.main-wrapper {
|
|
34
|
+
max-width: 1080px;
|
|
35
|
+
margin: 0 auto;
|
|
36
|
+
background: linear-gradient(175deg, #fff5f8, #ffe9f0);
|
|
37
|
+
border: 3px solid #ffb3c6;
|
|
38
|
+
border-radius: 28px;
|
|
39
|
+
padding: 32px 28px;
|
|
40
|
+
box-shadow: 0 30px 70px -20px rgba(255, 105, 180, 0.35);
|
|
41
|
+
position: relative;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.main-wrapper::before {
|
|
46
|
+
content: "🌸"; position: absolute; top: -22px; right: 40px;
|
|
47
|
+
font-size: 58px; color: #ff9eb5; opacity: 0.25; pointer-events: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.panel-left, .panel-right {
|
|
51
|
+
float: left;
|
|
52
|
+
width: 49%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.panel-right { margin-left: 2%; }
|
|
56
|
+
|
|
57
|
+
.panel-card {
|
|
58
|
+
background: rgba(255, 245, 250, 0.95);
|
|
59
|
+
border: 2px solid #ffb3c6;
|
|
60
|
+
border-radius: 18px;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
box-shadow: 0 8px 25px rgba(255, 140, 170, 0.15);
|
|
63
|
+
margin-bottom: 24px;
|
|
64
|
+
position: relative;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.data-table {
|
|
68
|
+
width: 100%;
|
|
69
|
+
border-collapse: collapse;
|
|
70
|
+
font-size: 15px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.data-table td {
|
|
74
|
+
padding: 14px 16px;
|
|
75
|
+
border-bottom: 1px solid #ffe0eb;
|
|
76
|
+
color: #5c2a3a;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.task-title-row td {
|
|
80
|
+
background: linear-gradient(to right, #ffb3c6, #ff8fab);
|
|
81
|
+
color: #5c2a3a;
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
font-size: 16.5px;
|
|
84
|
+
letter-spacing: 1px;
|
|
85
|
+
padding: 16px 18px;
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.factor-title-row td {
|
|
90
|
+
background: #fff0f7;
|
|
91
|
+
color: #e06a9a;
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
font-size: 15.5px;
|
|
94
|
+
letter-spacing: 0.8px;
|
|
95
|
+
padding: 13px 18px;
|
|
96
|
+
text-align: center;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.cond-name {
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
color: #d14a7e;
|
|
102
|
+
width: 32%;
|
|
103
|
+
vertical-align: top;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.cond-desc {
|
|
107
|
+
color: #6b3f4f;
|
|
108
|
+
text-align: left;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.faction-tag {
|
|
112
|
+
display: inline-block;
|
|
113
|
+
background: #ffe4f0;
|
|
114
|
+
color: #d14a7e;
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
padding: 3px 11px;
|
|
117
|
+
border-radius: 30px;
|
|
118
|
+
border: 1px solid #ffb3c6;
|
|
119
|
+
margin-left: 10px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.clear { clear: both; }
|
|
123
|
+
</style>
|
|
124
|
+
</head>
|
|
125
|
+
<body>
|
|
126
|
+
<div class="main-wrapper">
|
|
127
|
+
|
|
128
|
+
<!-- 左侧面板:任务条件 -->
|
|
129
|
+
<div class="panel-left">
|
|
130
|
+
<div class="panel-card">
|
|
131
|
+
<table class="data-table">
|
|
132
|
+
<tbody>
|
|
133
|
+
{{MISSIONS_ROWS}}
|
|
134
|
+
</tbody>
|
|
135
|
+
</table>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<!-- 右侧面板:突变因子 -->
|
|
140
|
+
<div class="panel-right">
|
|
141
|
+
<div class="panel-card">
|
|
142
|
+
<table class="data-table">
|
|
143
|
+
<tbody>
|
|
144
|
+
{{VARIABLES_ROWS}}
|
|
145
|
+
</tbody>
|
|
146
|
+
</table>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div class="clear"></div>
|
|
151
|
+
</div>
|
|
152
|
+
</body>
|
|
153
|
+
</html>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<style>
|
|
6
|
+
body {
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
width: 900px;
|
|
10
|
+
height: 1200px;
|
|
11
|
+
background: linear-gradient(135deg, #fff0f5, #ffe4f0, #f8e1f0);
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
|
|
16
|
+
"Noto Sans CJK SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
|
|
17
|
+
position: relative;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* 大量静态樱花花瓣装饰 */
|
|
22
|
+
body::before {
|
|
23
|
+
content: '';
|
|
24
|
+
position: absolute;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
z-index: 0;
|
|
29
|
+
background:
|
|
30
|
+
radial-gradient(circle at 12% 18%, rgba(255, 182, 193, 0.35) 0%, transparent 45%),
|
|
31
|
+
radial-gradient(circle at 78% 22%, rgba(255, 105, 180, 0.28) 0%, transparent 50%),
|
|
32
|
+
radial-gradient(circle at 25% 45%, rgba(255, 200, 220, 0.32) 0%, transparent 40%),
|
|
33
|
+
radial-gradient(circle at 85% 55%, rgba(255, 160, 190, 0.25) 0%, transparent 48%),
|
|
34
|
+
radial-gradient(circle at 18% 72%, rgba(255, 182, 193, 0.30) 0%, transparent 45%),
|
|
35
|
+
radial-gradient(circle at 70% 82%, rgba(255, 105, 180, 0.22) 0%, transparent 50%);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
body::after {
|
|
39
|
+
content: '';
|
|
40
|
+
position: absolute;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
z-index: 0;
|
|
45
|
+
background:
|
|
46
|
+
radial-gradient(circle at 35% 12%, rgba(255, 220, 230, 0.25) 0%, transparent 40%),
|
|
47
|
+
radial-gradient(circle at 65% 28%, rgba(255, 140, 180, 0.20) 0%, transparent 45%),
|
|
48
|
+
radial-gradient(circle at 48% 88%, rgba(255, 182, 193, 0.28) 0%, transparent 42%);
|
|
49
|
+
opacity: 0.85;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.container {
|
|
53
|
+
width: 720px; /* 适当缩小一点,避免太挤 */
|
|
54
|
+
max-height: 1080px;
|
|
55
|
+
background: linear-gradient(145deg, #fff5f8, #ffe9f0, #ffe0eb);
|
|
56
|
+
border-radius: 48px;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
box-shadow:
|
|
59
|
+
0 40px 90px -20px rgba(255, 105, 180, 0.45),
|
|
60
|
+
0 0 0 1px rgba(255, 182, 193, 0.55) inset,
|
|
61
|
+
0 20px 50px rgba(255, 140, 170, 0.3);
|
|
62
|
+
border: 4px solid rgba(255, 182, 193, 0.7);
|
|
63
|
+
position: relative;
|
|
64
|
+
z-index: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
table {
|
|
68
|
+
width: 100%;
|
|
69
|
+
border-collapse: separate;
|
|
70
|
+
border-spacing: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
td, th {
|
|
74
|
+
padding: 26px 36px;
|
|
75
|
+
text-align: center;
|
|
76
|
+
border: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* 当前状态 */
|
|
80
|
+
.state {
|
|
81
|
+
background: linear-gradient(to right, #ffb3c6, #ff8fab);
|
|
82
|
+
font-size: 1.72rem;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
color: #5c2a3a;
|
|
85
|
+
letter-spacing: 2.8px;
|
|
86
|
+
padding: 34px 36px;
|
|
87
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.8);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* 剩余时间 */
|
|
91
|
+
.rest {
|
|
92
|
+
background: linear-gradient(to right, #ffe4f0, #ffd1e6);
|
|
93
|
+
font-size: 2.55rem;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
color: #d14a7e;
|
|
96
|
+
padding: 42px 36px;
|
|
97
|
+
letter-spacing: 1.2px;
|
|
98
|
+
text-shadow: 0 3px 18px rgba(255, 105, 180, 0.4);
|
|
99
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.75);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* 标题 */
|
|
103
|
+
.title {
|
|
104
|
+
background: #fff0f7;
|
|
105
|
+
font-size: 1.28rem;
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
color: #e06a9a;
|
|
108
|
+
letter-spacing: 4.5px;
|
|
109
|
+
padding: 22px 36px 19px;
|
|
110
|
+
border-bottom: 1px solid rgba(255, 182, 193, 0.45);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* 时间行 */
|
|
114
|
+
.time {
|
|
115
|
+
background: rgba(255, 245, 250, 0.93);
|
|
116
|
+
font-size: 2.05rem;
|
|
117
|
+
font-family: ui-monospace, "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
|
|
118
|
+
font-weight: 500;
|
|
119
|
+
color: #c05a8a;
|
|
120
|
+
padding: 28px 36px;
|
|
121
|
+
letter-spacing: 6px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
tr:last-child .time {
|
|
125
|
+
border-bottom-left-radius: 42px;
|
|
126
|
+
border-bottom-right-radius: 42px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* 分隔线 */
|
|
130
|
+
td:not(:last-child) {
|
|
131
|
+
border-bottom: 1px solid rgba(255, 182, 193, 0.38);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* 额外樱花装饰 */
|
|
135
|
+
.container::before {
|
|
136
|
+
content: '🌸';
|
|
137
|
+
position: absolute;
|
|
138
|
+
font-size: 52px;
|
|
139
|
+
opacity: 0.13;
|
|
140
|
+
top: 55px;
|
|
141
|
+
left: 55px;
|
|
142
|
+
z-index: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.container::after {
|
|
146
|
+
content: '🌸';
|
|
147
|
+
position: absolute;
|
|
148
|
+
font-size: 72px;
|
|
149
|
+
opacity: 0.10;
|
|
150
|
+
top: 120px;
|
|
151
|
+
right: 55px;
|
|
152
|
+
z-index: 0;
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
155
|
+
</head>
|
|
156
|
+
<body>
|
|
157
|
+
<div class="container">
|
|
158
|
+
<table>
|
|
159
|
+
<tr>
|
|
160
|
+
<td class="state">当前状态:{{CURRENT_STATE}}</td>
|
|
161
|
+
</tr>
|
|
162
|
+
<tr>
|
|
163
|
+
<td class="rest">剩余时间:{{REMAINING_TIME}}</td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td class="title">即将到来的黑夜</td>
|
|
167
|
+
</tr>
|
|
168
|
+
{{NIGHT_TIMES_ROWS}}
|
|
169
|
+
</table>
|
|
170
|
+
</div>
|
|
171
|
+
</body>
|
|
172
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from nonebot import on_command
|
|
2
|
+
from .service.archimedea.deep import gen_deep_img
|
|
3
|
+
from .service.archimedea.temporal import gen_temporal_img
|
|
4
|
+
from .service.cycle.eidolon import gen_eidolon_img
|
|
5
|
+
|
|
6
|
+
# 夜灵平原
|
|
7
|
+
cetus = on_command("夜灵平原")
|
|
8
|
+
|
|
9
|
+
@cetus.handle()
|
|
10
|
+
async def cetus_handle():
|
|
11
|
+
await cetus.finish(await gen_eidolon_img())
|
|
12
|
+
|
|
13
|
+
# 时光科研
|
|
14
|
+
temporal = on_command("时光科研")
|
|
15
|
+
|
|
16
|
+
@temporal.handle()
|
|
17
|
+
async def temporal_handle():
|
|
18
|
+
await temporal.finish(await gen_temporal_img())
|
|
19
|
+
|
|
20
|
+
# 深层科研
|
|
21
|
+
deep = on_command("深层科研")
|
|
22
|
+
|
|
23
|
+
@deep.handle()
|
|
24
|
+
async def deep_handle():
|
|
25
|
+
await deep.finish(await gen_deep_img())
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nonebot-plugin-aawarframe
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: aa 的 Warframe 助手
|
|
5
5
|
Author-email: nekox41 <aameow@outlook.com>
|
|
6
|
-
License: MIT
|
|
6
|
+
License-Expression: MIT
|
|
7
7
|
Requires-Python: ==3.12.*
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
@@ -11,12 +11,13 @@ Requires-Dist: nonebot2>=2.5.0
|
|
|
11
11
|
Requires-Dist: httpx~=0.28.1
|
|
12
12
|
Requires-Dist: nonebot-plugin-htmlkit>=0.1.0rc5
|
|
13
13
|
Requires-Dist: nonebot-adapter-onebot>=2.4.6
|
|
14
|
+
Requires-Dist: playwright>=1.40.0
|
|
14
15
|
Dynamic: license-file
|
|
15
16
|
|
|
16
17
|
<div align="center">
|
|
17
|
-
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/logo.png" width="180" height="180" alt="aawarframeLogo"></a>
|
|
18
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/logo.png" width="180" height="180" alt="aawarframeLogo"></a>
|
|
18
19
|
<br>
|
|
19
|
-
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/logo.svg" width="240" alt="aawarframeLogo"></p>
|
|
20
|
+
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/logo.svg" width="240" alt="aawarframeLogo"></p>
|
|
20
21
|
</div>
|
|
21
22
|
|
|
22
23
|
<div align="center">
|
|
@@ -81,20 +82,12 @@ _✨ Aa 的 Warframe 助手,用于查询游戏状态。 ✨_
|
|
|
81
82
|
|
|
82
83
|
</details>
|
|
83
84
|
|
|
84
|
-
## ⚙️ 配置
|
|
85
|
-
|
|
86
|
-
在 nonebot2 项目的`.env`文件中添加下表中的必填配置
|
|
87
|
-
|
|
88
|
-
| 配置项 | 必填 | 默认值 | 说明 |
|
|
89
|
-
|:-----:|:----:|:----:|:----:|
|
|
90
|
-
| 配置项1 | 是 | 无 | 配置说明 |
|
|
91
|
-
| 配置项2 | 否 | 无 | 配置说明 |
|
|
92
|
-
|
|
93
85
|
## 🎉 使用
|
|
94
86
|
### 指令表
|
|
95
|
-
|
|
|
96
|
-
|
|
97
|
-
|
|
|
98
|
-
|
|
|
87
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
|
88
|
+
|:----:|:---:|:---:|:--:|:--------:|
|
|
89
|
+
| 夜灵平原 | 所有人 | 否 | 群聊 | 返回夜灵平原时间 |
|
|
90
|
+
| 时光科研 | 所有人 | 否 | 群聊 | 返回本周时光科研 |
|
|
91
|
+
| 深层科研 | 所有人 | 否 | 群聊 | 返回本周深层科研 |
|
|
99
92
|
### 效果图
|
|
100
|
-
|
|
93
|
+
<p><img src="https://github.com/nekox41/nonebot-plugin-aawarframe/blob/master/imgs/example1.png" alt="效果图1"></p>
|
|
@@ -2,8 +2,7 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
nonebot_plugin_aawarframe/__init__.py
|
|
5
|
-
nonebot_plugin_aawarframe/
|
|
6
|
-
nonebot_plugin_aawarframe/data_processor.py
|
|
5
|
+
nonebot_plugin_aawarframe/commands.py
|
|
7
6
|
nonebot_plugin_aawarframe.egg-info/PKG-INFO
|
|
8
7
|
nonebot_plugin_aawarframe.egg-info/SOURCES.txt
|
|
9
8
|
nonebot_plugin_aawarframe.egg-info/dependency_links.txt
|
|
@@ -14,10 +13,4 @@ nonebot_plugin_aawarframe/assets/faction_type.json
|
|
|
14
13
|
nonebot_plugin_aawarframe/assets/mission_type.json
|
|
15
14
|
nonebot_plugin_aawarframe/assets/variables.json
|
|
16
15
|
nonebot_plugin_aawarframe/assets/templates/archimedea.html
|
|
17
|
-
nonebot_plugin_aawarframe/
|
|
18
|
-
nonebot_plugin_aawarframe/data_sources/__init__.py
|
|
19
|
-
nonebot_plugin_aawarframe/data_sources/conquest_base.py
|
|
20
|
-
nonebot_plugin_aawarframe/data_sources/deep_archimedea.py
|
|
21
|
-
nonebot_plugin_aawarframe/data_sources/temporal_archimedea.py
|
|
22
|
-
nonebot_plugin_aawarframe/renderers/__init__.py
|
|
23
|
-
nonebot_plugin_aawarframe/renderers/html_renderer.py
|
|
16
|
+
nonebot_plugin_aawarframe/assets/templates/eidolon_clock.html
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "nonebot-plugin-aawarframe"
|
|
3
|
-
version = "0.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.2.3"
|
|
4
|
+
description = "aa 的 Warframe 助手"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "nekox41",email = "aameow@outlook.com"},
|
|
7
7
|
]
|
|
8
|
-
dependencies = ["nonebot2>=2.5.0", "httpx~=0.28.1", "nonebot-plugin-htmlkit>=0.1.0rc5", "nonebot-adapter-onebot>=2.4.6"]
|
|
8
|
+
dependencies = ["nonebot2>=2.5.0", "httpx~=0.28.1", "nonebot-plugin-htmlkit>=0.1.0rc5", "nonebot-adapter-onebot>=2.4.6", "playwright>=1.40.0"]
|
|
9
9
|
requires-python = "==3.12.*"
|
|
10
10
|
readme = "README.md"
|
|
11
|
-
license =
|
|
11
|
+
license = "MIT"
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
[tool.pdm]
|
|
15
15
|
distribution = false
|
|
16
16
|
|
|
17
|
+
[tool.setuptools]
|
|
18
|
+
packages = ["nonebot_plugin_aawarframe"]
|
|
19
|
+
|
|
17
20
|
[tool.setuptools.package-data]
|
|
18
21
|
nonebot_plugin_aawarframe = ["assets/**/*", "assets/*", "assets/**/*.*"]
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
from nonebot import require
|
|
2
|
-
|
|
3
|
-
require("nonebot_plugin_htmlkit")
|
|
4
|
-
|
|
5
|
-
from nonebot.plugin import PluginMetadata
|
|
6
|
-
from nonebot import on_command
|
|
7
|
-
from nonebot.adapters.onebot.v11 import MessageSegment
|
|
8
|
-
from .data_sources import get_source
|
|
9
|
-
from .renderers import renderer
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
__plugin_meta__ = PluginMetadata(
|
|
13
|
-
name='nonebot-plugin-aawarframe',
|
|
14
|
-
description='aa 的 Warframe 插件',
|
|
15
|
-
usage="",
|
|
16
|
-
type="application",
|
|
17
|
-
extra={},
|
|
18
|
-
homepage="https://github.com/nekox41/nonebot-plugin-aawarframe",
|
|
19
|
-
supported_adapters={"~onebot.v11"}
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
# -----------------------
|
|
23
|
-
|
|
24
|
-
temporal_cmd = on_command("时光科研")
|
|
25
|
-
|
|
26
|
-
@temporal_cmd.handle()
|
|
27
|
-
async def temporal_cmd_handle():
|
|
28
|
-
temporal_source = get_source("temporal_archimedea")
|
|
29
|
-
data = await temporal_source.fetch()
|
|
30
|
-
img = await renderer.render(data, "archimedea","archimedea.html", "temporal.img")
|
|
31
|
-
await temporal_cmd.finish(MessageSegment.image(img))
|
|
32
|
-
|
|
33
|
-
deep_cmd = on_command("深层科研")
|
|
34
|
-
@deep_cmd.handle()
|
|
35
|
-
async def deep_cmd_handle():
|
|
36
|
-
deep_source = get_source("deep_archimedea")
|
|
37
|
-
data = await deep_source.fetch()
|
|
38
|
-
img = await renderer.render(data, "archimedea", "archimedea.html", "deep.img")
|
|
39
|
-
await deep_cmd.finish(MessageSegment.image(img))
|