nonebot-plugin-maimaidx 2.1.0__tar.gz → 2.1.2__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.
Files changed (31) hide show
  1. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/PKG-INFO +8 -6
  2. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/README.md +1 -1
  3. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/command/mai_alias.py +13 -3
  4. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/command/mai_score.py +1 -1
  5. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/config.py +0 -6
  6. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_model.py +13 -13
  7. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_music.py +2 -0
  8. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_music_info.py +1 -1
  9. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_update_plate.py +3 -14
  10. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx.egg-info/PKG-INFO +8 -6
  11. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx.egg-info/requires.txt +13 -3
  12. nonebot_plugin_maimaidx-2.1.2/pyproject.toml +38 -0
  13. nonebot_plugin_maimaidx-2.1.0/pyproject.toml +0 -34
  14. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/LICENSE +0 -0
  15. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/__init__.py +0 -0
  16. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/command/__init__.py +0 -0
  17. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/command/mai_base.py +0 -0
  18. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/command/mai_guess.py +0 -0
  19. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/command/mai_search.py +0 -0
  20. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/command/mai_table.py +0 -0
  21. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/image.py +0 -0
  22. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_api_data.py +0 -0
  23. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_best_50.py +0 -0
  24. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_error.py +0 -0
  25. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/maimaidx_player_score.py +0 -0
  26. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/libraries/tool.py +0 -0
  27. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx/maimaidxhelp.png +0 -0
  28. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx.egg-info/SOURCES.txt +0 -0
  29. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx.egg-info/dependency_links.txt +0 -0
  30. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/nonebot_plugin_maimaidx.egg-info/top_level.txt +0 -0
  31. {nonebot_plugin_maimaidx-2.1.0 → nonebot_plugin_maimaidx-2.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-maimaidx
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: maimaidx plugin for nonebot2
5
5
  Author-email: Yuri-YuzuChaN <806235364@qq.com>
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx
8
8
  Project-URL: Bug Tracker, https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx/issues
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Operating System :: OS Independent
11
- Requires-Python: <3.13,>=3.9
11
+ Requires-Python: >=3.9
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: nonebot2<3.0.0,>=2.0.0
@@ -16,12 +16,14 @@ Requires-Dist: nonebot-adapter-onebot<3.0.0,>=2.2.2
16
16
  Requires-Dist: nonebot-plugin-apscheduler<1.0.0,>=0.3.0
17
17
  Requires-Dist: aiofiles<24.0.0,>=23.2.1
18
18
  Requires-Dist: httpx<1.0.0,>=0.23.1
19
- Requires-Dist: pillow<11.0.0,>=10.0.0
20
19
  Requires-Dist: pydantic<3.0.0,>=2.0.0
21
20
  Requires-Dist: pyecharts<3.0.0,>=2.0.0
22
- Requires-Dist: pytest-playwright<0.7.0
23
- Requires-Dist: numpy<2.0.0,>=1.26.0
21
+ Requires-Dist: playwright>=1.52.0
24
22
  Requires-Dist: httpx-ws<1.0.0,>=0.7.2
23
+ Requires-Dist: pillow<11.0.0,>=10.0.0; python_version < "3.13"
24
+ Requires-Dist: pillow<12.0.0,>=11.0.0; python_version >= "3.13"
25
+ Requires-Dist: numpy==1.26.0; python_version < "3.10"
26
+ Requires-Dist: numpy<3.0.0,>=2.0.0; python_version >= "3.10"
25
27
  Dynamic: license-file
26
28
 
27
29
  <div align='center'>
@@ -59,7 +61,7 @@ Dynamic: license-file
59
61
  ```
60
62
 
61
63
  2. 安装 `chromium`,**相关依赖已安装,请直接使用该指令执行**
62
-
64
+
63
65
  ``` shell
64
66
  playwright install --with-deps chromium
65
67
  ```
@@ -33,7 +33,7 @@
33
33
  ```
34
34
 
35
35
  2. 安装 `chromium`,**相关依赖已安装,请直接使用该指令执行**
36
-
36
+
37
37
  ``` shell
38
38
  playwright install --with-deps chromium
39
39
  ```
@@ -46,10 +46,10 @@ async def _(event: PrivateMessageEvent):
46
46
  try:
47
47
  await mai.get_music_alias()
48
48
  log.info('手动更新别名库成功')
49
- await update_alias.finish('手动更新别名库成功')
49
+ await update_alias.send('手动更新别名库成功')
50
50
  except:
51
51
  log.error('手动更新别名库失败')
52
- await update_alias.finish('手动更新别名库失败')
52
+ await update_alias.send('手动更新别名库失败')
53
53
 
54
54
 
55
55
  @alias_local_apply.handle()
@@ -225,7 +225,7 @@ async def push_alias(push: PushAliasStatus):
225
225
  music = mai.total_list.by_id(song_id)
226
226
 
227
227
  if push.Type == 'Approved':
228
- message = MessageSegment.at(push.Status.ApplyUID) + dedent(f'''\
228
+ message = MessageSegment.at(push.Status.ApplyUID) + '\n' + dedent(f'''\
229
229
  您申请的别名已通过审核
230
230
  =================
231
231
  {push.Status.Tag}:
@@ -237,6 +237,16 @@ async def push_alias(push: PushAliasStatus):
237
237
  ''').strip() + await draw_music_info(music)
238
238
  await bot.send_group_msg(group_id=push.Status.GroupID, message=message)
239
239
  return
240
+ if push.Type == 'Reject':
241
+ message = MessageSegment.at(push.Status.ApplyUID) + '\n' + dedent(f'''\
242
+ 您申请的别名被拒绝
243
+ =================
244
+ ID:{song_id}
245
+ 标题:{push.Status.Name}
246
+ 别名:{alias_name}
247
+ ''').strip() + await draw_music_info(music)
248
+ await bot.send_group_msg(group_id=push.Status.GroupID, message=message)
249
+ return
240
250
 
241
251
  if not alias.push.global_switch:
242
252
  await mai.get_music_alias()
@@ -28,7 +28,7 @@ async def _(
28
28
  user_id: Optional[int] = Depends(get_at_qq)
29
29
  ):
30
30
  qqid = user_id or event.user_id
31
- username = message.extract_plain_text()
31
+ username = message.extract_plain_text().strip()
32
32
  await best50.finish(await generate(qqid, username), reply_message=True)
33
33
 
34
34
 
@@ -27,12 +27,6 @@ vote_url: str = 'https://www.yuzuchan.moe/vote'
27
27
  # ws
28
28
  UUID = uuid.uuid1()
29
29
 
30
- # echartsjs
31
- SNAPSHOT_JS = (
32
- "echarts.getInstanceByDom(document.querySelector('div[_echarts_instance_]'))."
33
- "getDataURL({type: 'PNG', pixelRatio: 2, excludeComponents: ['toolbox']})"
34
- )
35
-
36
30
 
37
31
  # echartsjs
38
32
  SNAPSHOT_JS = (
@@ -76,33 +76,33 @@ class Alias(BaseModel):
76
76
  Alias: List[str]
77
77
 
78
78
 
79
- class Approved(BaseModel):
79
+ class StatusBase(BaseModel):
80
80
 
81
+ SongID: int
81
82
  ApplyUID: int
83
+ ApplyAlias: str
84
+
85
+
86
+ class Approved(StatusBase):
87
+
82
88
  Tag: str
83
- SongID: int
84
89
  Name: str
85
- ApplyAlias: str
86
- GroupID: int
87
- WSUUID: str
90
+ GroupID: int | None = None
91
+ WSUUID: str | None = None
88
92
 
89
93
 
90
- class AliasStatus(BaseModel):
94
+ class AliasStatus(StatusBase):
91
95
 
92
- ApplyUID: int
93
96
  Tag: str
94
- SongID: int
95
97
  Name: str
96
- ApplyAlias: str
97
98
  Time: str
98
99
  AgreeVotes: Optional[int] = 0
99
100
  Votes: int
100
101
 
101
- class Reviewed(BaseModel):
102
+ class Reviewed(StatusBase):
102
103
 
103
- SongID: int
104
- ApplyUID: int
105
- ApplyAlias: str
104
+ Tag: str
105
+ Name: str
106
106
 
107
107
 
108
108
  class PushAliasStatus(BaseModel):
@@ -98,6 +98,8 @@ class MusicList(List[Music]):
98
98
  for music in self:
99
99
  if level not in music.level:
100
100
  continue
101
+ if int(music.id) >= 100000:
102
+ continue
101
103
  if music.level.count(level) > 1: # 同曲有相同等级
102
104
  lv[music.id] = {
103
105
  index: create_ra_music(music, index)
@@ -39,7 +39,7 @@ async def draw_music_info(
39
39
  player = await maiApi.query_user_b50(qqid=qqid)
40
40
  else:
41
41
  player = user
42
- if music.basic_info.version in list(plate_to_dx_version.values())[-2]:
42
+ if music.basic_info.version in list(plate_to_dx_version.values())[-1]:
43
43
  bestlist = player.charts.dx
44
44
  isfull = bool(len(bestlist) == 15)
45
45
  else:
@@ -29,11 +29,11 @@ async def update_rating_table() -> str:
29
29
  lines += r
30
30
 
31
31
  if '+' in lv:
32
- f = 3
32
+ f = 4
33
33
  elif lv == '6':
34
34
  f = 10
35
35
  else:
36
- f = 7
36
+ f = 6
37
37
 
38
38
  linesheight = 85 * lines
39
39
  """
@@ -119,18 +119,7 @@ async def update_plate_table() -> str:
119
119
  for _v in version:
120
120
  if _v in platecn:
121
121
  _v = platecn[_v]
122
- if _v in ['熊', '华', '華']:
123
- _ver = '熊&华'
124
- elif _v in ['爽', '煌']:
125
- _ver = '爽&煌'
126
- elif _v in ['宙', '星']:
127
- _ver = '宙&星'
128
- elif _v in ['祭', '祝']:
129
- _ver = '祭&祝'
130
- elif _v in ['双', '宴']:
131
- _ver = '双&宴'
132
- else:
133
- _ver = _v
122
+ ver, _ver = version_map.get(_v, ([plate_to_dx_version.get(_v)], _v))
134
123
 
135
124
  music_id_list = mai.total_plate_id_list[_ver]
136
125
  music = mai.total_list.by_id_list(music_id_list)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-maimaidx
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: maimaidx plugin for nonebot2
5
5
  Author-email: Yuri-YuzuChaN <806235364@qq.com>
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx
8
8
  Project-URL: Bug Tracker, https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx/issues
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Operating System :: OS Independent
11
- Requires-Python: <3.13,>=3.9
11
+ Requires-Python: >=3.9
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: nonebot2<3.0.0,>=2.0.0
@@ -16,12 +16,14 @@ Requires-Dist: nonebot-adapter-onebot<3.0.0,>=2.2.2
16
16
  Requires-Dist: nonebot-plugin-apscheduler<1.0.0,>=0.3.0
17
17
  Requires-Dist: aiofiles<24.0.0,>=23.2.1
18
18
  Requires-Dist: httpx<1.0.0,>=0.23.1
19
- Requires-Dist: pillow<11.0.0,>=10.0.0
20
19
  Requires-Dist: pydantic<3.0.0,>=2.0.0
21
20
  Requires-Dist: pyecharts<3.0.0,>=2.0.0
22
- Requires-Dist: pytest-playwright<0.7.0
23
- Requires-Dist: numpy<2.0.0,>=1.26.0
21
+ Requires-Dist: playwright>=1.52.0
24
22
  Requires-Dist: httpx-ws<1.0.0,>=0.7.2
23
+ Requires-Dist: pillow<11.0.0,>=10.0.0; python_version < "3.13"
24
+ Requires-Dist: pillow<12.0.0,>=11.0.0; python_version >= "3.13"
25
+ Requires-Dist: numpy==1.26.0; python_version < "3.10"
26
+ Requires-Dist: numpy<3.0.0,>=2.0.0; python_version >= "3.10"
25
27
  Dynamic: license-file
26
28
 
27
29
  <div align='center'>
@@ -59,7 +61,7 @@ Dynamic: license-file
59
61
  ```
60
62
 
61
63
  2. 安装 `chromium`,**相关依赖已安装,请直接使用该指令执行**
62
-
64
+
63
65
  ``` shell
64
66
  playwright install --with-deps chromium
65
67
  ```
@@ -3,9 +3,19 @@ nonebot-adapter-onebot<3.0.0,>=2.2.2
3
3
  nonebot-plugin-apscheduler<1.0.0,>=0.3.0
4
4
  aiofiles<24.0.0,>=23.2.1
5
5
  httpx<1.0.0,>=0.23.1
6
- pillow<11.0.0,>=10.0.0
7
6
  pydantic<3.0.0,>=2.0.0
8
7
  pyecharts<3.0.0,>=2.0.0
9
- pytest-playwright<0.7.0
10
- numpy<2.0.0,>=1.26.0
8
+ playwright>=1.52.0
11
9
  httpx-ws<1.0.0,>=0.7.2
10
+
11
+ [:python_version < "3.10"]
12
+ numpy==1.26.0
13
+
14
+ [:python_version < "3.13"]
15
+ pillow<11.0.0,>=10.0.0
16
+
17
+ [:python_version >= "3.10"]
18
+ numpy<3.0.0,>=2.0.0
19
+
20
+ [:python_version >= "3.13"]
21
+ pillow<12.0.0,>=11.0.0
@@ -0,0 +1,38 @@
1
+ [project]
2
+ name = "nonebot-plugin-maimaidx"
3
+ version = "2.1.2"
4
+ authors = [
5
+ { name="Yuri-YuzuChaN", email="806235364@qq.com" },
6
+ ]
7
+ description = "maimaidx plugin for nonebot2"
8
+ readme = "README.md"
9
+ requires-python = ">=3.9"
10
+ license = "MIT"
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ "Operating System :: OS Independent",
14
+ ]
15
+ dependencies = [
16
+ "nonebot2>=2.0.0,<3.0.0",
17
+ "nonebot-adapter-onebot>=2.2.2,<3.0.0",
18
+ "nonebot-plugin-apscheduler>=0.3.0,<1.0.0",
19
+ "aiofiles>=23.2.1,<24.0.0",
20
+ "httpx>=0.23.1,<1.0.0",
21
+ "pydantic>=2.0.0,<3.0.0",
22
+ "pyecharts>=2.0.0,<3.0.0",
23
+ "playwright>=1.52.0",
24
+ "httpx-ws>=0.7.2,<1.0.0",
25
+
26
+ "pillow>=10.0.0,<11.0.0; python_version < '3.13'",
27
+ "pillow>=11.0.0,<12.0.0; python_version >= '3.13'",
28
+
29
+ "numpy==1.26.0; python_version < '3.10'",
30
+ "numpy>=2.0.0,<3.0.0; python_version >= '3.10'"
31
+ ]
32
+
33
+ [project.urls]
34
+ "Homepage" = "https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx"
35
+ "Bug Tracker" = "https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx/issues"
36
+
37
+ [tool.setuptools.package-data]
38
+ "*" = ["maimaidxhelp.png"]
@@ -1,34 +0,0 @@
1
- [project]
2
- name = "nonebot-plugin-maimaidx"
3
- version = "2.1.0"
4
- authors = [
5
- { name="Yuri-YuzuChaN", email="806235364@qq.com" },
6
- ]
7
- description = "maimaidx plugin for nonebot2"
8
- readme = "README.md"
9
- requires-python = ">=3.9, <3.13"
10
- license = "MIT"
11
- classifiers = [
12
- "Programming Language :: Python :: 3",
13
- "Operating System :: OS Independent",
14
- ]
15
- dependencies = [
16
- "nonebot2<3.0.0,>=2.0.0",
17
- "nonebot-adapter-onebot<3.0.0,>=2.2.2",
18
- "nonebot-plugin-apscheduler<1.0.0,>=0.3.0",
19
- "aiofiles<24.0.0,>=23.2.1",
20
- "httpx<1.0.0,>=0.23.1",
21
- "pillow<11.0.0,>=10.0.0",
22
- "pydantic<3.0.0,>=2.0.0",
23
- "pyecharts<3.0.0,>=2.0.0",
24
- "pytest-playwright<0.7.0",
25
- "numpy<2.0.0,>=1.26.0",
26
- "httpx-ws<1.0.0,>=0.7.2"
27
- ]
28
-
29
- [project.urls]
30
- "Homepage" = "https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx"
31
- "Bug Tracker" = "https://github.com/Yuri-YuzuChaN/nonebot-plugin-maimaidx/issues"
32
-
33
- [tool.setuptools.package-data]
34
- "*" = ["maimaidxhelp.png"]