diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..68917d3 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: ['https://afdian.net/a/agnes_digital', 'https://afdian.net/@lgc2333/'] diff --git a/README.md b/README.md index 8ebdcd4..e03e71e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +
@@ -40,12 +40,14 @@ _✨ Project Sekai 表情包制作 ✨_ - 如遇字体大小不协调问题,请更新插件到最新版本,并且删除 `data/pjsk/fonts` 文件夹下的所有文件 - 如果遇到资源文件下载失败的情况,请参考 [这个 issue](https://github.com/Agnes4m/nonebot_plugin_pjsk/issues/15) +- ~~由于本人没玩过啤酒烧烤,~~ 可能出现一些小问题,可以提 issue 或者 [加群](https://jq.qq.com/?_wv=1027&k=l82tMuPG)反馈 ~~或者单纯进来玩~~ +- 本项目仅供学习使用,请勿用于商业用途,喜欢该项目可以 Star 或者提供 PR,如果构成侵权将在 24 小时内删除 ## 📖 介绍 ### Wonderhoy! -![Wonderhoy](./readme/wonderhoy.png) +![Wonderhoy](https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/pjsk/wonderhoy.png) ## 💿 安装 @@ -135,22 +137,29 @@ plugins = [
使用交互创建模式 -![example](./readme/example-interact.png) +![example](https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/pjsk/example-interact.png)
使用 Shell-Like 指令 -![example](./readme/example.png) +![example](https://raw.githubusercontent.com/lgc-NB2Dev/readme/main/pjsk/example.png)
-## 🙈 碎碎念 +## 📞 联系 -- ~~由于本人没玩过啤酒烧烤,~~ 可能出现一些小问题,可以提 issue 或者 [加群](https://jq.qq.com/?_wv=1027&k=l82tMuPG)反馈 ~~或者单纯进来玩~~ -- 本项目仅供学习使用,请勿用于商业用途,喜欢该项目可以 Star 或者提供 PR,如果构成侵权将在 24 小时内删除 -- [爱发电](https://afdian.net/a/agnes_digital) +### Agnes Digital + +QQ 群: [424506063](https://jq.qq.com/?_wv=1027&k=l82tMuPG) + +### student_2333 + +QQ:3076823485 +Telegram:[@lgc2333](https://t.me/lgc2333) +吹水群:[1105946125](https://jq.qq.com/?_wv=1027&k=Z3n1MpEp) +邮箱: ## 💡 鸣谢 @@ -162,8 +171,20 @@ plugins = [ 感谢大家的赞助!你们的赞助将是我继续创作的动力! +### Agnes Digital + - [爱发电](https://afdian.net/a/agnes_digital) +### student_2333 + +- [爱发电](https://afdian.net/@lgc2333) +-
+ 赞助二维码(点击展开) + + ![讨饭](https://raw.githubusercontent.com/lgc2333/ShigureBotMenu/master/src/imgs/sponsor.png) + +
+ ## 📝 更新日志 ### 0.2.9 diff --git a/nonebot_plugin_pjsk/__main__.py b/nonebot_plugin_pjsk/__main__.py index fcee5e5..0afe803 100644 --- a/nonebot_plugin_pjsk/__main__.py +++ b/nonebot_plugin_pjsk/__main__.py @@ -1,8 +1,8 @@ from typing import List, Optional from nonebot import logger, on_command, on_shell_command +from nonebot.adapters import Message from nonebot.exception import ParserExit -from nonebot.internal.adapter import Message from nonebot.matcher import Matcher from nonebot.params import Arg, ArgPlainText, CommandArg, ShellCommandArgs from nonebot.rule import ArgumentParser, Namespace diff --git a/nonebot_plugin_pjsk/draw.py b/nonebot_plugin_pjsk/draw.py index 471e5d9..992c096 100644 --- a/nonebot_plugin_pjsk/draw.py +++ b/nonebot_plugin_pjsk/draw.py @@ -19,6 +19,7 @@ from typing_extensions import ParamSpec import anyio +from anyio import to_thread from imagetext_py import ( Canvas, Color, @@ -133,7 +134,7 @@ async def render_text( padding = stoke_width while True: - actual_size = await anyio.to_thread.run_sync( + actual_size = await to_thread.run_sync( partial( text_size_multiline, lines=text_lines, @@ -169,7 +170,7 @@ async def render_text( if isinstance(stroke_color, str) else Color(*stroke_color) ) - await anyio.to_thread.run_sync( + await to_thread.run_sync( partial( draw_text_multiline, canvas=canvas, diff --git a/pdm.lock b/pdm.lock index 9c986f8..6ade5cc 100644 --- a/pdm.lock +++ b/pdm.lock @@ -278,7 +278,7 @@ files = [ [[package]] name = "loguru" -version = "0.7.1" +version = "0.7.2" requires_python = ">=3.5" summary = "Python logging made (stupidly) simple" dependencies = [ @@ -286,8 +286,8 @@ dependencies = [ "win32-setctime>=1.0.0; sys_platform == \"win32\"", ] files = [ - {file = "loguru-0.7.1-py3-none-any.whl", hash = "sha256:046bf970cb3cad77a28d607cbf042ac25a407db987a1e801c7f7e692469982f9"}, - {file = "loguru-0.7.1.tar.gz", hash = "sha256:7ba2a7d81b79a412b0ded69bd921e012335e80fd39937a633570f273a343579e"}, + {file = "loguru-0.7.2-py3-none-any.whl", hash = "sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb"}, + {file = "loguru-0.7.2.tar.gz", hash = "sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"}, ] [[package]] @@ -362,7 +362,7 @@ files = [ [[package]] name = "nonebot2" -version = "2.0.1" +version = "2.1.0" requires_python = ">=3.8,<4.0" summary = "An asynchronous python bot framework." dependencies = [ @@ -370,12 +370,12 @@ dependencies = [ "pydantic[dotenv]<2.0.0,>=1.10.0", "pygtrie<3.0.0,>=2.4.1", "tomli<3.0.0,>=2.0.1; python_version < \"3.11\"", - "typing-extensions<5.0.0,>=4.0.0", + "typing-extensions<5.0.0,>=4.4.0", "yarl<2.0.0,>=1.7.2", ] files = [ - {file = "nonebot2-2.0.1-py3-none-any.whl", hash = "sha256:58111068df7a6c13cca2a412dd0f6f88d7bf2a2af3e92ae770fd913a9421743e"}, - {file = "nonebot2-2.0.1.tar.gz", hash = "sha256:c61294644aef08f2b427301ca1c358d34e6cfaa7025d694a502ad66e9508e7c2"}, + {file = "nonebot2-2.1.0-py3-none-any.whl", hash = "sha256:e14bfbb962df72a9beac5035291594ad6e549c004b2ff5d28db97d0fdc3abf45"}, + {file = "nonebot2-2.1.0.tar.gz", hash = "sha256:f29cb773833ab5000557090edcbc5a6eabaf6e04a224c86761a4ddb6b1e0bd18"}, ] [[package]] @@ -586,12 +586,12 @@ files = [ [[package]] name = "typing-extensions" -version = "4.7.1" -requires_python = ">=3.7" -summary = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.8.0" +requires_python = ">=3.8" +summary = "Backported and Experimental Type Hints for Python 3.8+" files = [ - {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, - {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, + {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, + {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index c6fc71e..3341eb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-plugin-pjsk" -version = "0.2.9" +version = "0.2.9.post1" description = "Project Sekai Sticker Creator for NoneBot2." authors = [ { name = "Agnes_Digital", email = "Z735803792@163.com" }, @@ -30,7 +30,7 @@ readme = "README.md" license = { text = "MIT" } [project.urls] -homepage = "https://github.com/Agnes4m/nonebot_plugin_pjsk" +homepage = "https://github.com/lgc-NB2Dev/nonebot-plugin-pjsk" [tool.pdm.build] includes = [] @@ -38,59 +38,3 @@ includes = [] [build-system] requires = ["pdm-backend"] build-backend = "pdm.backend" - -[tool.pyright] -pythonVersion = "3.8" - -[tool.black] -line-length = 89 -target-version = ["py39", "py310", "py311"] -include = '\.pyi?$' -# skip-string-normalization = true - -[tool.ruff.isort] -extra-standard-library = ["typing_extensions"] - -[tool.ruff] -ignore = [ - "B008", - "B905", - "E501", - "FBT002", - "PGH003", - "RUF001", - "RUF002", - "RUF003", - "RUF006", - "RUF100", - "SIM117", - "TRY002", - "TRY003", -] -select = [ - "A", - "ARG", - "ASYNC", - "B", - "C4", - "COM", - "E", - "F", - "FBT", - "FLY", - "I", - "ISC", - "N", - "PIE", - "PGH", - "PTH", - "PYI", - "Q", - "RET", - "RSE", - "RUF", - "SIM", - "SLF", - "SLOT", - "TRY", -] diff --git a/readme/example-interact.png b/readme/example-interact.png deleted file mode 100644 index 3e3901d..0000000 Binary files a/readme/example-interact.png and /dev/null differ diff --git a/readme/example.png b/readme/example.png deleted file mode 100644 index eebc58a..0000000 Binary files a/readme/example.png and /dev/null differ diff --git a/readme/wonderhoy.png b/readme/wonderhoy.png deleted file mode 100644 index 64bf14c..0000000 Binary files a/readme/wonderhoy.png and /dev/null differ