Compare commits
6
Commits
upstream
...
474932c05d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
474932c05d | ||
|
|
8ac3078ea3 | ||
|
|
89532428d5 | ||
|
|
0e396728c6 | ||
|
|
c832e1da52 | ||
|
|
221b2c8b0f |
@@ -0,0 +1,27 @@
|
|||||||
|
[[source]]
|
||||||
|
url = "https://mirrors.cloud.tencent.com/pypi/simple"
|
||||||
|
verify_ssl = true
|
||||||
|
name = "pypi"
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
numpy = "==1.26.4"
|
||||||
|
aiomysql = ">=0.1.1"
|
||||||
|
Brotli = ">=1.0.9"
|
||||||
|
creart = "==0.2.2"
|
||||||
|
creart-graia = "==0.1.5"
|
||||||
|
emoji = ">=2.2.0"
|
||||||
|
graia-ariadne = "==0.9.8"
|
||||||
|
graia-broadcast = "==0.19.2"
|
||||||
|
graia-saya = "==0.0.16"
|
||||||
|
jieba = ">=0.42.1"
|
||||||
|
matplotlib = "==3.7.1"
|
||||||
|
Pillow = "==9.5.0"
|
||||||
|
redis = ">=4.5.5"
|
||||||
|
scipy = ">=1.10.0"
|
||||||
|
wordcloud = ">=1.8.2.2"
|
||||||
|
|
||||||
|
[dev-packages]
|
||||||
|
ipython="*"
|
||||||
|
|
||||||
|
[requires]
|
||||||
|
python_version = "3.11"
|
||||||
Generated
+1548
File diff suppressed because it is too large
Load Diff
@@ -117,6 +117,8 @@ async def room_data(app: Ariadne, source: Source, sender: Union[Friend, Group]):
|
|||||||
pic.draw_text("")
|
pic.draw_text("")
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ async def room_data_total(app: Ariadne, source: Source, sender: Union[Friend, Gr
|
|||||||
pic.draw_text("")
|
pic.draw_text("")
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||||
|
|||||||
@@ -170,6 +170,8 @@ async def user_data(app: Ariadne, source: Source, sender: Union[Friend, Group],
|
|||||||
pic.draw_text("")
|
pic.draw_text("")
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||||
|
|||||||
@@ -183,6 +183,8 @@ async def user_data_total(app: Ariadne, source: Source, sender: Union[Friend, Gr
|
|||||||
pic.draw_text("")
|
pic.draw_text("")
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||||
|
|||||||
@@ -158,6 +158,8 @@ async def _help(app: Ariadne, sender: Union[Friend, Group]):
|
|||||||
# 底部版权信息,请务必保留此处
|
# 底部版权信息,请务必保留此处
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ async def ranking(app: Ariadne,
|
|||||||
pic.draw_text("")
|
pic.draw_text("")
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ async def ranking_double(app: Ariadne,
|
|||||||
pic.draw_text("")
|
pic.draw_text("")
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ class DynamicPicGenerator:
|
|||||||
pic.move_pos(0, 15)
|
pic.move_pos(0, 15)
|
||||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||||
|
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||||
|
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
return pic.base64()
|
return pic.base64()
|
||||||
|
|||||||
@@ -405,6 +405,8 @@ class LiveReportGenerator:
|
|||||||
pic.set_row_space(10)
|
pic.set_row_space(10)
|
||||||
pic.draw_text_right(50, "Designed By StarBot", Color.GRAY, logo_limit)
|
pic.draw_text_right(50, "Designed By StarBot", Color.GRAY, logo_limit)
|
||||||
pic.draw_text_right(50, "https://github.com/Starlwr/StarBot", Color.LINK, logo_limit)
|
pic.draw_text_right(50, "https://github.com/Starlwr/StarBot", Color.LINK, logo_limit)
|
||||||
|
pic.draw_text_right(50, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE, logo_limit)
|
||||||
|
pic.draw_text_right(50, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK, logo_limit)
|
||||||
pic.crop_and_paste_bottom()
|
pic.crop_and_paste_bottom()
|
||||||
|
|
||||||
return pic.base64()
|
return pic.base64()
|
||||||
@@ -669,7 +671,7 @@ class LiveReportGenerator:
|
|||||||
length = len(profits)
|
length = len(profits)
|
||||||
indexs = list(range(0, length))
|
indexs = list(range(0, length))
|
||||||
|
|
||||||
abs_max = math.ceil(max(max(profits), abs(min(profits))))
|
abs_max = math.ceil(max(max(profits), abs(min(profits)), 0.01))
|
||||||
start = -abs_max - (-abs_max % 10)
|
start = -abs_max - (-abs_max % 10)
|
||||||
end = abs_max + (-abs_max % 10)
|
end = abs_max + (-abs_max % 10)
|
||||||
step = int((end - start) / 10)
|
step = int((end - start) / 10)
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class RankingGenerator:
|
|||||||
reverse_bar_x = face_x + offset
|
reverse_bar_x = face_x + offset
|
||||||
top_bar_width = (width - face_size) / 2 + offset
|
top_bar_width = (width - face_size) / 2 + offset
|
||||||
if top_count is None:
|
if top_count is None:
|
||||||
top_count = max(max(counts), abs(min(counts)))
|
top_count = max(max(counts), abs(min(counts)), 0.001)
|
||||||
|
|
||||||
chart = PicGenerator(width, (face_size * count) + (row_space * (count - 1)))
|
chart = PicGenerator(width, (face_size * count) + (row_space * (count - 1)))
|
||||||
chart.set_row_space(row_space)
|
chart.set_row_space(row_space)
|
||||||
|
|||||||
Reference in New Issue
Block a user