From 5fc208c95a7fd5209ee7b8d04ea30f6de3a6426c Mon Sep 17 00:00:00 2001 From: AkashiCoin <55268546+AkashiCoin@users.noreply.github.com> Date: Sat, 21 May 2022 23:50:51 +0800 Subject: [PATCH 01/16] Create Generate.yml --- .github/workflows/Generate.yml | 37 ++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/Generate.yml diff --git a/.github/workflows/Generate.yml b/.github/workflows/Generate.yml new file mode 100644 index 00000000..4ed44828 --- /dev/null +++ b/.github/workflows/Generate.yml @@ -0,0 +1,37 @@ +name: Generate poetry.lock + +on: + push: + branches: + - "main" + paths: + - 'pyproject.toml' + +jobs: + poetry_lock: + name: Generate + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: he0119/setup-python@main + with: + python-version: "3.9" + - name: poetry lock + run: | + rm -f poetry.lock + sed -i "8,11d" pyproject.toml + poetry lock + # commit + - name: commit file + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add poetry.lock + git commit -m "${date}n: Auto generate poetry.lock" -a + # push + - name: push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.ACCESS_TOKEN }} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d7900df9..5b337ade 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,3 +48,4 @@ wordcloud = "^1.8.1" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + From a4bc04c958d8cc3fb71fcbd3e33fe83bc871e885 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Sun, 22 May 2022 01:46:52 +0800 Subject: [PATCH 02/16] Update pid_search.py --- plugins/pid_search.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/pid_search.py b/plugins/pid_search.py index d795a10c..be578d18 100755 --- a/plugins/pid_search.py +++ b/plugins/pid_search.py @@ -68,6 +68,8 @@ async def _g(event: MessageEvent, state: T_State, pid: str = Arg("pid")): except Exception as e: await pid_search.finish(f"发生了一些错误..{type(e)}:{e}") else: + if data.get("error"): + await pid_search.finish(data["error"]["user_message"], at_sender=True) data = data["illust"] if not data["width"] and not data["height"]: await pid_search.finish(f"没有搜索到 PID:{pid} 的图片", at_sender=True) From c8ac2b6281ac8ca1164273bbc21e98a1cde2cbc4 Mon Sep 17 00:00:00 2001 From: AkashiCoin <55268546+AkashiCoin@users.noreply.github.com> Date: Sun, 22 May 2022 02:30:04 +0800 Subject: [PATCH 03/16] Update Generate.yml --- .github/workflows/Generate.yml | 7 ++++--- pyproject.toml | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Generate.yml b/.github/workflows/Generate.yml index 4ed44828..e476ae29 100644 --- a/.github/workflows/Generate.yml +++ b/.github/workflows/Generate.yml @@ -21,17 +21,18 @@ jobs: - name: poetry lock run: | rm -f poetry.lock - sed -i "8,11d" pyproject.toml + sed -i.bak "8,11d" pyproject.toml poetry lock + mv pyproject.toml.bak pyproject.toml # commit - name: commit file run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git add poetry.lock - git commit -m "${date}n: Auto generate poetry.lock" -a + git commit -m "Auto generate poetry.lock" -a # push - name: push changes uses: ad-m/github-push-action@master with: - github_token: ${{ secrets.ACCESS_TOKEN }} \ No newline at end of file + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 5b337ade..d7900df9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,4 +48,3 @@ wordcloud = "^1.8.1" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" - From 8d3f101a68ef6ded7108b119c5a3c5cec31791c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 21 May 2022 18:38:05 +0000 Subject: [PATCH 04/16] Auto generate poetry.lock --- poetry.lock | 511 +++------------------------------------------------- 1 file changed, 26 insertions(+), 485 deletions(-) diff --git a/poetry.lock b/poetry.lock index bb5c59ec..f7d096f9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6,11 +6,6 @@ category = "main" optional = false python-versions = ">=3.6,<4.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "aiohttp" version = "3.7.4.post0" @@ -20,21 +15,16 @@ optional = false python-versions = ">=3.6" [package.dependencies] -async_timeout = ">=3.0,<4.0" +async-timeout = ">=3.0,<4.0" attrs = ">=17.3.0" chardet = ">=2.0,<5.0" multidict = ">=4.5,<7.0" -typing_extensions = ">=3.6.5" +typing-extensions = ">=3.6.5" yarl = ">=1.0,<2.0" [package.extras] speedups = ["aiodns", "brotlipy", "cchardet"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "anyio" version = "3.6.1" @@ -52,11 +42,6 @@ doc = ["packaging", "sphinx-rtd-theme", "sphinx-autodoc-typehints (>=1.2.0)"] test = ["coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "contextlib2", "uvloop (<0.15)", "mock (>=4)", "uvloop (>=0.15)"] trio = ["trio (>=0.16)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "apscheduler" version = "3.9.1" @@ -83,11 +68,6 @@ tornado = ["tornado (>=4.3)"] twisted = ["twisted"] zookeeper = ["kazoo"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "asgiref" version = "3.5.2" @@ -99,11 +79,6 @@ python-versions = ">=3.7" [package.extras] tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "async-timeout" version = "3.0.1" @@ -112,11 +87,6 @@ category = "main" optional = false python-versions = ">=3.5.3" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "asyncpg" version = "0.25.0" @@ -126,15 +96,10 @@ optional = false python-versions = ">=3.6.0" [package.extras] -dev = ["Cython (>=0.29.24,<0.30.0)", "pytest (>=6.0)", "Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx_rtd_theme (>=0.5.2,<0.6.0)", "pycodestyle (>=2.7.0,<2.8.0)", "flake8 (>=3.9.2,<3.10.0)", "uvloop (>=0.15.3)"] -docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx_rtd_theme (>=0.5.2,<0.6.0)"] +dev = ["Cython (>=0.29.24,<0.30.0)", "pytest (>=6.0)", "Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "pycodestyle (>=2.7.0,<2.8.0)", "flake8 (>=3.9.2,<3.10.0)", "uvloop (>=0.15.3)"] +docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)"] test = ["pycodestyle (>=2.7.0,<2.8.0)", "flake8 (>=3.9.2,<3.10.0)", "uvloop (>=0.15.3)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "attrs" version = "21.4.0" @@ -149,11 +114,6 @@ docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "backports.zoneinfo" version = "0.2.1" @@ -165,11 +125,6 @@ python-versions = ">=3.6" [package.extras] tzdata = ["tzdata"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "beautifulsoup4" version = "4.9.3" @@ -185,11 +140,6 @@ soupsieve = {version = ">1.2", markers = "python_version >= \"3.0\""} html5lib = ["html5lib"] lxml = ["lxml"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "bilireq" version = "0.1.2" @@ -205,11 +155,6 @@ rsa = ">=4.8,<5.0" [package.extras] qrcode = ["qrcode[pil] (>=7.3.1,<8.0.0)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "black" version = "22.3.0" @@ -232,11 +177,6 @@ d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "certifi" version = "2022.5.18.1" @@ -245,11 +185,6 @@ category = "main" optional = false python-versions = ">=3.6" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "chardet" version = "4.0.0" @@ -258,11 +193,6 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "charset-normalizer" version = "2.0.12" @@ -274,11 +204,6 @@ python-versions = ">=3.5.0" [package.extras] unicode_backport = ["unicodedata2"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "click" version = "8.1.3" @@ -290,11 +215,6 @@ python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "cn2an" version = "0.5.17" @@ -307,11 +227,6 @@ python-versions = ">=3.6" proces = ">=0.1.0" "ruamel.yaml" = ">=0.16.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "colorama" version = "0.4.4" @@ -320,11 +235,6 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "cycler" version = "0.11.0" @@ -333,11 +243,6 @@ category = "main" optional = false python-versions = ">=3.6" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "dateparser" version = "1.1.1" @@ -357,11 +262,6 @@ calendars = ["convertdate", "hijri-converter", "convertdate"] fasttext = ["fasttext"] langdetect = ["langdetect"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "ecdsa" version = "0.17.0" @@ -377,11 +277,6 @@ six = ">=1.9.0" gmpy = ["gmpy"] gmpy2 = ["gmpy2"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "emoji" version = "1.7.0" @@ -393,11 +288,6 @@ python-versions = "*" [package.extras] dev = ["pytest", "coverage", "coveralls"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "fastapi" version = "0.78.0" @@ -416,14 +306,9 @@ dev = ["python-jose[cryptography] (>=3.3.0,<4.0.0)", "passlib[bcrypt] (>=1.7.2,< doc = ["mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "mdx-include (>=1.4.1,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "typer (>=0.4.1,<0.5.0)", "pyyaml (>=5.3.1,<7.0.0)"] test = ["pytest (>=6.2.4,<7.0.0)", "pytest-cov (>=2.12.0,<4.0.0)", "mypy (==0.910)", "flake8 (>=3.8.3,<4.0.0)", "black (==22.3.0)", "isort (>=5.0.6,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "httpx (>=0.14.0,<0.19.0)", "email_validator (>=1.1.1,<2.0.0)", "sqlalchemy (>=1.3.18,<1.5.0)", "peewee (>=3.13.3,<4.0.0)", "databases[sqlite] (>=0.3.2,<0.6.0)", "orjson (>=3.2.1,<4.0.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "flask (>=1.1.2,<3.0.0)", "anyio[trio] (>=3.2.1,<4.0.0)", "types-ujson (==4.2.1)", "types-orjson (==3.6.2)", "types-dataclasses (==0.6.5)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "feedparser" -version = "6.0.9" +version = "6.0.10" description = "Universal feed parser, handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds" category = "main" optional = false @@ -432,11 +317,6 @@ python-versions = ">=3.6" [package.dependencies] sgmllib3k = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "fonttools" version = "4.33.3" @@ -459,11 +339,6 @@ ufo = ["fs (>=2.2.0,<3)"] unicode = ["unicodedata2 (>=14.0.0)"] woff = ["zopfli (>=0.1.4)", "brotlicffi (>=0.8.0)", "brotli (>=1.0.1)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "gino" version = "1.0.1" @@ -477,16 +352,11 @@ asyncpg = ">=0.18,<1.0" SQLAlchemy = ">=1.2.16,<1.4" [package.extras] -aiohttp = ["gino-aiohttp (>=0.1.0,<0.2.0)"] -quart = ["gino-quart (>=0.1.0,<0.2.0)"] -sanic = ["gino-sanic (>=0.1.0,<0.2.0)"] starlette = ["gino-starlette (>=0.1.1,<0.2.0)"] +aiohttp = ["gino-aiohttp (>=0.1.0,<0.2.0)"] tornado = ["gino-tornado (>=0.1.0,<0.2.0)"] - -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" +sanic = ["gino-sanic (>=0.1.0,<0.2.0)"] +quart = ["gino-quart (>=0.1.0,<0.2.0)"] [[package]] name = "greenlet" @@ -499,11 +369,6 @@ python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" [package.extras] docs = ["sphinx"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "h11" version = "0.12.0" @@ -512,11 +377,6 @@ category = "main" optional = false python-versions = ">=3.6" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "httpcore" version = "0.14.7" @@ -535,11 +395,6 @@ sniffio = ">=1.0.0,<2.0.0" http2 = ["h2 (>=3,<5)"] socks = ["socksio (>=1.0.0,<2.0.0)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "httptools" version = "0.4.0" @@ -551,11 +406,6 @@ python-versions = ">=3.5.0" [package.extras] test = ["Cython (>=0.29.24,<0.30.0)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "httpx" version = "0.22.0" @@ -577,11 +427,6 @@ cli = ["click (>=8.0.0,<9.0.0)", "rich (>=10.0.0,<11.0.0)", "pygments (>=2.0.0,< http2 = ["h2 (>=3,<5)"] socks = ["socksio (>=1.0.0,<2.0.0)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "idna" version = "3.3" @@ -590,11 +435,6 @@ category = "main" optional = false python-versions = ">=3.5" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "imagehash" version = "4.2.1" @@ -610,11 +450,6 @@ PyWavelets = "*" scipy = "*" six = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "jieba" version = "0.42.1" @@ -623,11 +458,6 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "kiwisolver" version = "1.4.2" @@ -636,11 +466,6 @@ category = "main" optional = false python-versions = ">=3.7" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "loguru" version = "0.6.0" @@ -656,11 +481,6 @@ win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} [package.extras] dev = ["colorama (>=0.3.4)", "docutils (==0.16)", "flake8 (>=3.7.7)", "tox (>=3.9.0)", "pytest (>=4.6.2)", "pytest-cov (>=2.7.1)", "black (>=19.10b0)", "isort (>=5.1.1)", "Sphinx (>=4.1.1)", "sphinx-autobuild (>=0.7.1)", "sphinx-rtd-theme (>=0.4.3)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "lxml" version = "4.6.5" @@ -675,11 +495,6 @@ html5 = ["html5lib"] htmlsoup = ["beautifulsoup4"] source = ["Cython (>=0.29.7)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "matplotlib" version = "3.5.2" @@ -699,11 +514,6 @@ pyparsing = ">=2.2.1" python-dateutil = ">=2.7" setuptools_scm = ">=4" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "multidict" version = "6.0.2" @@ -712,11 +522,6 @@ category = "main" optional = false python-versions = ">=3.7" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "mypy-extensions" version = "0.4.3" @@ -725,11 +530,6 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "nonebot-adapter-onebot" version = "2.0.0b1" @@ -741,11 +541,6 @@ python-versions = ">=3.7.3,<4.0.0" [package.dependencies] nonebot2 = ">=2.0.0-beta.1,<3.0.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "nonebot-plugin-apscheduler" version = "0.1.2" @@ -758,11 +553,6 @@ python-versions = ">=3.7,<4.0" apscheduler = ">=3.7.0,<4.0.0" nonebot2 = ">=2.0.0-alpha.8,<3.0.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "nonebot2" version = "2.0.0b3" @@ -783,15 +573,10 @@ yarl = ">=1.7.2,<2.0.0" [package.extras] quart = ["Quart (>=0.17.0,<0.18.0)"] -all = ["Quart (>=0.17.0,<0.18.0)", "aiohttp[speedups] (>=3.7.4,<4.0.0)", "httpx[http2] (>=0.20.0,<1.0.0)", "websockets (>=10.0,<11.0)"] +all = ["Quart (>=0.17.0,<0.18.0)", "websockets (>=10.0,<11.0)", "aiohttp[speedups] (>=3.7.4,<4.0.0)", "httpx[http2] (>=0.20.0,<1.0.0)"] +websockets = ["websockets (>=10.0,<11.0)"] aiohttp = ["aiohttp[speedups] (>=3.7.4,<4.0.0)"] httpx = ["httpx[http2] (>=0.20.0,<1.0.0)"] -websockets = ["websockets (>=10.0,<11.0)"] - -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" [[package]] name = "numpy" @@ -801,11 +586,6 @@ category = "main" optional = false python-versions = ">=3.8" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "opencv-python" version = "4.5.5.64" @@ -822,11 +602,6 @@ numpy = [ {version = ">=1.17.3", markers = "python_version >= \"3.8\""}, ] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "packaging" version = "21.3" @@ -838,11 +613,6 @@ python-versions = ">=3.6" [package.dependencies] pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pathspec" version = "0.9.0" @@ -851,11 +621,6 @@ category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pillow" version = "9.1.1" @@ -868,11 +633,6 @@ python-versions = ">=3.7" docs = ["olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-issues (>=3.0.1)", "sphinx-removed-in", "sphinx-rtd-theme (>=1.0)", "sphinxext-opengraph"] tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "platformdirs" version = "2.5.2" @@ -885,11 +645,6 @@ python-versions = ">=3.7" docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "playwright" version = "1.22.0" @@ -904,11 +659,6 @@ pyee = "8.1.0" typing-extensions = {version = "*", markers = "python_version <= \"3.8\""} websockets = "10.1" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "proces" version = "0.1.2" @@ -920,11 +670,6 @@ python-versions = ">=3.6" [package.dependencies] zhconv = "1.4.3" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "psutil" version = "5.9.1" @@ -936,11 +681,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.extras] test = ["ipaddress", "mock", "enum34", "pywin32", "wmi"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pyasn1" version = "0.4.8" @@ -949,11 +689,6 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pydantic" version = "1.9.1" @@ -970,11 +705,6 @@ typing-extensions = ">=3.7.4.3" dotenv = ["python-dotenv (>=0.10.4)"] email = ["email-validator (>=1.0.3)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pyee" version = "8.1.0" @@ -983,11 +713,6 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pygtrie" version = "2.4.2" @@ -996,11 +721,6 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pyparsing" version = "3.0.9" @@ -1012,11 +732,6 @@ python-versions = ">=3.6.8" [package.extras] diagrams = ["railroad-diagrams", "jinja2"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pypinyin" version = "0.46.0" @@ -1025,11 +740,6 @@ category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "python-dateutil" version = "2.8.2" @@ -1041,11 +751,6 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" [package.dependencies] six = ">=1.5" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "python-dotenv" version = "0.20.0" @@ -1057,11 +762,6 @@ python-versions = ">=3.5" [package.extras] cli = ["click (>=5.0)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "python-jose" version = "3.3.0" @@ -1080,11 +780,6 @@ cryptography = ["cryptography (>=3.4.0)"] pycrypto = ["pycrypto (>=2.6.0,<2.7.0)", "pyasn1"] pycryptodome = ["pycryptodome (>=3.3.1,<4.0.0)", "pyasn1"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "python-multipart" version = "0.0.5" @@ -1096,11 +791,6 @@ python-versions = "*" [package.dependencies] six = ">=1.4.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pytz" version = "2022.1" @@ -1109,11 +799,6 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pytz-deprecation-shim" version = "0.1.0.post0" @@ -1126,11 +811,6 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" "backports.zoneinfo" = {version = "*", markers = "python_version >= \"3.6\" and python_version < \"3.9\""} tzdata = {version = "*", markers = "python_version >= \"3.6\""} -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pywavelets" version = "1.3.0" @@ -1142,11 +822,6 @@ python-versions = ">=3.7" [package.dependencies] numpy = ">=1.17.3" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "pyyaml" version = "5.4.1" @@ -1155,11 +830,6 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "regex" version = "2022.3.2" @@ -1168,11 +838,6 @@ category = "main" optional = false python-versions = ">=3.6" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "retrying" version = "1.3.3" @@ -1184,11 +849,6 @@ python-versions = "*" [package.dependencies] six = ">=1.7.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "rfc3986" version = "1.5.0" @@ -1203,11 +863,6 @@ idna = {version = "*", optional = true, markers = "extra == \"idna2008\""} [package.extras] idna2008 = ["idna"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "rsa" version = "4.8" @@ -1219,11 +874,6 @@ python-versions = ">=3.6,<4" [package.dependencies] pyasn1 = ">=0.1.3" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "ruamel.yaml" version = "0.17.21" @@ -1239,11 +889,6 @@ python-versions = ">=3" docs = ["ryd"] jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "ruamel.yaml.clib" version = "0.2.6" @@ -1252,11 +897,6 @@ category = "main" optional = false python-versions = ">=3.5" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "scipy" version = "1.6.1" @@ -1268,11 +908,6 @@ python-versions = ">=3.7" [package.dependencies] numpy = ">=1.16.5" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "setuptools-scm" version = "6.4.2" @@ -1289,11 +924,6 @@ tomli = ">=1.0.0" test = ["pytest (>=6.2)", "virtualenv (>20)"] toml = ["setuptools (>=42)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "sgmllib3k" version = "1.0.0" @@ -1302,11 +932,6 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "six" version = "1.16.0" @@ -1315,11 +940,6 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "sniffio" version = "1.2.0" @@ -1328,11 +948,6 @@ category = "main" optional = false python-versions = ">=3.5" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "soupsieve" version = "2.3.2.post1" @@ -1341,11 +956,6 @@ category = "main" optional = false python-versions = ">=3.6" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "sqlalchemy" version = "1.3.24" @@ -1366,11 +976,6 @@ postgresql_psycopg2binary = ["psycopg2-binary"] postgresql_psycopg2cffi = ["psycopg2cffi"] pymysql = ["pymysql (<1)", "pymysql"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "starlette" version = "0.19.1" @@ -1386,11 +991,6 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" [package.extras] full = ["itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "tomli" version = "2.0.1" @@ -1399,11 +999,6 @@ category = "main" optional = false python-versions = ">=3.7" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "tomlkit" version = "0.10.2" @@ -1412,11 +1007,6 @@ category = "main" optional = false python-versions = ">=3.6,<4.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "typing-extensions" version = "4.2.0" @@ -1425,11 +1015,6 @@ category = "main" optional = false python-versions = ">=3.7" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "tzdata" version = "2022.1" @@ -1438,11 +1023,6 @@ category = "main" optional = false python-versions = ">=2" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "tzlocal" version = "4.2" @@ -1460,11 +1040,6 @@ tzdata = {version = "*", markers = "platform_system == \"Windows\""} devenv = ["black", "pyroma", "pytest-cov", "zest.releaser"] test = ["pytest-mock (>=3.3)", "pytest (>=4.3)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "ujson" version = "5.3.0" @@ -1473,11 +1048,6 @@ category = "main" optional = false python-versions = ">=3.7" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "uvicorn" version = "0.17.6" @@ -1501,11 +1071,6 @@ websockets = {version = ">=10.0", optional = true, markers = "extra == \"standar [package.extras] standard = ["websockets (>=10.0)", "httptools (>=0.4.0)", "watchgod (>=0.6)", "python-dotenv (>=0.13)", "PyYAML (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "colorama (>=0.4)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "uvloop" version = "0.16.0" @@ -1515,15 +1080,10 @@ optional = false python-versions = ">=3.7" [package.extras] -dev = ["Cython (>=0.29.24,<0.30.0)", "pytest (>=3.6.0)", "Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx_rtd_theme (>=0.5.2,<0.6.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "psutil", "pycodestyle (>=2.7.0,<2.8.0)", "pyOpenSSL (>=19.0.0,<19.1.0)", "mypy (>=0.800)"] -docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx_rtd_theme (>=0.5.2,<0.6.0)"] +dev = ["Cython (>=0.29.24,<0.30.0)", "pytest (>=3.6.0)", "Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)", "aiohttp", "flake8 (>=3.9.2,<3.10.0)", "psutil", "pycodestyle (>=2.7.0,<2.8.0)", "pyOpenSSL (>=19.0.0,<19.1.0)", "mypy (>=0.800)"] +docs = ["Sphinx (>=4.1.2,<4.2.0)", "sphinxcontrib-asyncio (>=0.3.0,<0.4.0)", "sphinx-rtd-theme (>=0.5.2,<0.6.0)"] test = ["aiohttp", "flake8 (>=3.9.2,<3.10.0)", "psutil", "pycodestyle (>=2.7.0,<2.8.0)", "pyOpenSSL (>=19.0.0,<19.1.0)", "mypy (>=0.800)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "watchgod" version = "0.8.2" @@ -1535,11 +1095,6 @@ python-versions = ">=3.7" [package.dependencies] anyio = ">=3.0.0,<4" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "websockets" version = "10.1" @@ -1548,11 +1103,6 @@ category = "main" optional = false python-versions = ">=3.7" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "win32-setctime" version = "1.1.0" @@ -1564,11 +1114,6 @@ python-versions = ">=3.5" [package.extras] dev = ["pytest (>=4.6.2)", "black (>=19.3b0)"] -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "wordcloud" version = "1.8.1" @@ -1582,11 +1127,6 @@ matplotlib = "*" numpy = ">=1.6.1" pillow = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "yarl" version = "1.7.2" @@ -1599,11 +1139,6 @@ python-versions = ">=3.6" idna = ">=2.0" multidict = ">=4.0" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [[package]] name = "zhconv" version = "1.4.3" @@ -1612,15 +1147,10 @@ category = "main" optional = false python-versions = "*" -[package.source] -type = "legacy" -url = "https://mirrors.aliyun.com/pypi/simple" -reference = "ali" - [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "1890d2859d3ad815037187b8ec867636f4d3f5e2b13088c110747ace41358ca4" +content-hash = "89e873649d58d1c9df3f4bce93b12b681f80ea0d7f9ae96a9fae9feda87c825d" [metadata.files] aiofiles = [ @@ -1810,8 +1340,8 @@ fastapi = [ {file = "fastapi-0.78.0.tar.gz", hash = "sha256:3233d4a789ba018578658e2af1a4bb5e38bdd122ff722b313666a9b2c6786a83"}, ] feedparser = [ - {file = "feedparser-6.0.9-py3-none-any.whl", hash = "sha256:a522b2b81f3914a74ae44161a341940f74811bd29be5b4c2a689e6e6be51cd39"}, - {file = "feedparser-6.0.9.tar.gz", hash = "sha256:dad42e7beaec55f99c08b2b0cf7288bc7cfd24b6f72c8ef85478bcb55648cd42"}, + {file = "feedparser-6.0.10-py3-none-any.whl", hash = "sha256:79c257d526d13b944e965f6095700587f27388e50ea16fd245babe4dfae7024f"}, + {file = "feedparser-6.0.10.tar.gz", hash = "sha256:27da485f4637ce7163cdeab13a80312b93b7d0c1b775bef4a47629a3110bca51"}, ] fonttools = [ {file = "fonttools-4.33.3-py3-none-any.whl", hash = "sha256:f829c579a8678fa939a1d9e9894d01941db869de44390adb49ce67055a06cc2a"}, @@ -2294,7 +1824,18 @@ psutil = [ {file = "psutil-5.9.1.tar.gz", hash = "sha256:57f1819b5d9e95cdfb0c881a8a5b7d542ed0b7c522d575706a80bedc848c8954"}, ] pyasn1 = [ + {file = "pyasn1-0.4.8-py2.4.egg", hash = "sha256:fec3e9d8e36808a28efb59b489e4528c10ad0f480e57dcc32b4de5c9d8c9fdf3"}, + {file = "pyasn1-0.4.8-py2.5.egg", hash = "sha256:0458773cfe65b153891ac249bcf1b5f8f320b7c2ce462151f8fa74de8934becf"}, + {file = "pyasn1-0.4.8-py2.6.egg", hash = "sha256:5c9414dcfede6e441f7e8f81b43b34e834731003427e5b09e4e00e3172a10f00"}, + {file = "pyasn1-0.4.8-py2.7.egg", hash = "sha256:6e7545f1a61025a4e58bb336952c5061697da694db1cae97b116e9c46abcf7c8"}, {file = "pyasn1-0.4.8-py2.py3-none-any.whl", hash = "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d"}, + {file = "pyasn1-0.4.8-py3.1.egg", hash = "sha256:78fa6da68ed2727915c4767bb386ab32cdba863caa7dbe473eaae45f9959da86"}, + {file = "pyasn1-0.4.8-py3.2.egg", hash = "sha256:08c3c53b75eaa48d71cf8c710312316392ed40899cb34710d092e96745a358b7"}, + {file = "pyasn1-0.4.8-py3.3.egg", hash = "sha256:03840c999ba71680a131cfaee6fab142e1ed9bbd9c693e285cc6aca0d555e576"}, + {file = "pyasn1-0.4.8-py3.4.egg", hash = "sha256:7ab8a544af125fb704feadb008c99a88805126fb525280b2270bb25cc1d78a12"}, + {file = "pyasn1-0.4.8-py3.5.egg", hash = "sha256:e89bf84b5437b532b0803ba5c9a5e054d21fec423a89952a74f87fa2c9b7bce2"}, + {file = "pyasn1-0.4.8-py3.6.egg", hash = "sha256:014c0e9976956a08139dc0712ae195324a75e142284d5f87f1a87ee1b068a359"}, + {file = "pyasn1-0.4.8-py3.7.egg", hash = "sha256:99fcc3c8d804d1bc6d9a099921e39d827026409a58f2a720dcdb89374ea0c776"}, {file = "pyasn1-0.4.8.tar.gz", hash = "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"}, ] pydantic = [ From 7cf1c6f016f93dfcdbfe0bb286033965dbdc41cc Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 08:41:59 +0800 Subject: [PATCH 05/16] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 933b347d..95c803b2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ 如果希望有个地方讨论绪山真寻Bot,或者有问题或建议,可以发送issues或加入[ [是真寻酱哒](https://jq.qq.com/?_wv=1027&k=u8PgBkMZ) ] +# Nonebot2 + + +非常 [ **[NICE](https://github.com/nonebot/nonebot2)** ] 的OneBot框架 + ## 声明 此项目仅用于学习交流,请勿用于非法用途 From 9ac4c7f4e332971c3b1f8bab0ef14248962e4571 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 08:52:15 +0800 Subject: [PATCH 06/16] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 95c803b2..9b0dce7c 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,10 @@ __Docker 最新版本由 [Sakuracio](https://github.com/Sakuracio) 提供__ ## 更新 +### 2022/5/25 + +* 修复webui中CountLimit字段limit_type类型错误 + ### 2022/5/24 * fix: 修正了签到时日期时间的显示不补齐零的bug (符合日期时间表示法 ISO 8601)[@pull/600](https://github.com/HibiKier/zhenxun_bot/pull/600) From 451db104e8d50da2012a55cb6d0b8a36dc0b7537 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 08:52:22 +0800 Subject: [PATCH 07/16] Update config.py --- plugins/web_ui/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/web_ui/config.py b/plugins/web_ui/config.py index 93d7997e..7f8ce3e0 100644 --- a/plugins/web_ui/config.py +++ b/plugins/web_ui/config.py @@ -45,7 +45,7 @@ class CountLimit(BaseModel): """ max_count: int status: bool - limit_type: bool + limit_type: str rst: Optional[str] From fedf44b9fad6b00a69f888cda27e8273d10a8b23 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 10:54:52 +0800 Subject: [PATCH 08/16] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9b0dce7c..50f04155 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,14 @@ 如果希望有个地方讨论绪山真寻Bot,或者有问题或建议,可以发送issues或加入[ [是真寻酱哒](https://jq.qq.com/?_wv=1027&k=u8PgBkMZ) ] +## 声明 +此项目仅用于学习交流,请勿用于非法用途 + # Nonebot2 非常 [ **[NICE](https://github.com/nonebot/nonebot2)** ] 的OneBot框架 -## 声明 -此项目仅用于学习交流,请勿用于非法用途 - ## 未完成的文档 # [传送门](https://hibikier.github.io/zhenxun_bot/) From e4d5a230d2f86e207b1f038b5a3f195e0f5993ec Mon Sep 17 00:00:00 2001 From: mouhensama <1365197927wuhen@gmail.com> Date: Wed, 25 May 2022 11:47:08 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E6=8A=8Anonebot=5Fplugin=5Fgamedraw?= =?UTF-8?q?=E7=9A=84ba=E5=8D=A1=E6=B1=A0=E6=90=AC=E8=BF=90=E4=BA=86?= =?UTF-8?q?=E8=BF=87=E6=9D=A5=E5=B9=B6=E4=B8=94=E8=BF=9B=E8=A1=8C=E4=BA=86?= =?UTF-8?q?=E7=9C=9F=E5=AF=BB=E7=9A=84=E9=80=82=E9=85=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/draw_card/__init__.py | 13 ++- plugins/draw_card/config.py | 11 +- plugins/draw_card/handles/ba_handle.py | 150 +++++++++++++++++++++++++ 3 files changed, 171 insertions(+), 3 deletions(-) create mode 100644 plugins/draw_card/handles/ba_handle.py diff --git a/plugins/draw_card/__init__.py b/plugins/draw_card/__init__.py index 22bae797..73b4a84c 100644 --- a/plugins/draw_card/__init__.py +++ b/plugins/draw_card/__init__.py @@ -23,6 +23,7 @@ from .handles.onmyoji_handle import OnmyojiHandle from .handles.pcr_handle import PcrHandle from .handles.pretty_handle import PrettyHandle from .handles.prts_handle import PrtsHandle +from .handles.ba_handle import BaHandle from .config import draw_config @@ -30,7 +31,7 @@ from .config import draw_config __zx_plugin_name__ = "游戏抽卡" __plugin_usage__ = """ usage: - 模拟赛马娘,原神,明日方舟,坎公骑冠剑,公主连结(国/台),碧蓝航线,FGO,阴阳师进行抽卡 + 模拟赛马娘,原神,明日方舟,坎公骑冠剑,公主连结(国/台),碧蓝航线,FGO,阴阳师,碧蓝档案进行抽卡 指令: 原神[1-180]抽: 原神常驻池 原神角色[1-180]抽: 原神角色UP池子 @@ -43,6 +44,7 @@ usage: 碧蓝航线/碧蓝[重型/轻型/特型/活动][1-300]抽: 碧蓝航线重型/轻型/特型/活动卡池 fgo[1-300]抽: fgo卡池 阴阳师[1-300]抽: 阴阳师卡池 + ba/碧蓝档案[1-200]抽:碧蓝档案卡池 * 以上指令可以通过 XX一井 来指定最大抽取数量 * * 示例:原神一井 * """.strip() @@ -73,6 +75,7 @@ __plugin_cmd__ = [ "pcr/公主连接[1-300]抽", "fgo[1-300]抽", "阴阳师[1-300]抽", + "碧蓝档案[1-200]抽", "更新方舟信息 [_superuser]", "重载方舟卡池 [_superuser]", "更新原神信息 [_superuser]", @@ -83,6 +86,7 @@ __plugin_cmd__ = [ "更新碧蓝航线信息 [_superuser]", "更新fgo信息 [_superuser]", "更新阴阳师信息 [_superuser]", + "更新碧蓝档案信息 [_superuser]", ] __plugin_type__ = ("抽卡相关", 1) __plugin_version__ = 0.1 @@ -105,7 +109,7 @@ class Game: games = ( - Game({"azur", "碧蓝", "碧蓝航线"}, AzurHandle(), draw_config.AZUR_FLAG), + Game({"azur", "碧蓝航线"}, AzurHandle(), draw_config.AZUR_FLAG), Game({"fgo", "命运冠位指定"}, FgoHandle(), draw_config.FGO_FLAG), Game( {"genshin", "原神"}, @@ -130,6 +134,11 @@ games = ( reload_time=4, ), Game({"prts", "方舟", "明日方舟"}, PrtsHandle(), draw_config.PRTS_FLAG, reload_time=4), + Game( + {"ba","碧蓝档案"},BaHandle(), + draw_config.BA_FLAG, + max_count=200, + ), ) diff --git a/plugins/draw_card/config.py b/plugins/draw_card/config.py index 71500f8e..742cc515 100644 --- a/plugins/draw_card/config.py +++ b/plugins/draw_card/config.py @@ -87,6 +87,12 @@ class OnmyojiConfig(BaseModel, extra=Extra.ignore): ONMYOJI_SR: float = 0.2 ONMYOJI_R: float = 0.7875 +#碧蓝档案 +class BaConfig(BaseModel, extra=Extra.ignore): + BA_THREE_P: float = 0.025 + BA_TWO_P: float = 0.185 + BA_ONE_P: float = 0.79 + BA_G_TWO_P: float = 0.975 class Config(BaseModel, extra=Extra.ignore): # 开关 @@ -98,6 +104,7 @@ class Config(BaseModel, extra=Extra.ignore): AZUR_FLAG: bool = AConfig.get_config("draw_card", "AZUR_FLAG") FGO_FLAG: bool = AConfig.get_config("draw_card", "FGO_FLAG") ONMYOJI_FLAG: bool = AConfig.get_config("draw_card", "ONMYOJI_FLAG") + BA_FLAG: bool = AConfig.get_config("draw_card", "BA_FLAG") # 其他配置 PCR_TAI: bool = AConfig.get_config("draw_card", "PCR_TAI") @@ -112,6 +119,7 @@ class Config(BaseModel, extra=Extra.ignore): azur: AzurConfig = AzurConfig() fgo: FgoConfig = FgoConfig() onmyoji: OnmyojiConfig = OnmyojiConfig() + ba: BaConfig = BaConfig() driver = nonebot.get_driver() @@ -133,8 +141,9 @@ for game_flag, game_name in zip( "FGO_FLAG", "ONMYOJI_FLAG", "PCR_TAI", + "BA_FLAG" ], - ["明日方舟", "原神", "赛马娘", "坎公骑冠剑", "公主连结", "碧蓝航线", "命运-冠位指定(FGO)", "阴阳师", "pcr台服卡池"], + ["明日方舟", "原神", "赛马娘", "坎公骑冠剑", "公主连结", "碧蓝航线", "命运-冠位指定(FGO)", "阴阳师", "pcr台服卡池","碧蓝档案"], ): AConfig.add_plugin_config( "draw_card", diff --git a/plugins/draw_card/handles/ba_handle.py b/plugins/draw_card/handles/ba_handle.py new file mode 100644 index 00000000..7a1cfb42 --- /dev/null +++ b/plugins/draw_card/handles/ba_handle.py @@ -0,0 +1,150 @@ +import random +from lxml import etree +from typing import List, Tuple +from PIL import ImageDraw +from urllib.parse import unquote +from nonebot.log import logger + +from .base_handle import BaseHandle, BaseData +from ..config import draw_config +from ..util import remove_prohibited_str, cn2py, load_font +from utils.image_utils import BuildImage + + +class BaChar(BaseData): + pass + + +class BaHandle(BaseHandle[BaChar]): + def __init__(self): + super().__init__("ba", "碧蓝档案") + self.max_star = 3 + self.config = draw_config.ba + self.ALL_CHAR: List[BaChar] = [] + + def get_card(self, mode: int = 1) -> BaChar: + if mode == 2: + star = self.get_star( + [3, 2], [self.config.BA_THREE_P, self.config.BA_G_TWO_P] + ) + else: + star = self.get_star( + [3, 2, 1], + [self.config.BA_THREE_P, self.config.BA_TWO_P, self.config.BA_ONE_P], + ) + chars = [x for x in self.ALL_CHAR if x.star == star and not x.limited] + return random.choice(chars) + + def get_cards(self, count: int, **kwargs) -> List[Tuple[BaChar, int]]: + card_list = [] + card_count = 0 # 保底计算 + for i in range(count): + card_count += 1 + # 十连保底 + if card_count == 10: + card = self.get_card(2) + card_count = 0 + else: + card = self.get_card(1) + if card.star > self.max_star - 2: + card_count = 0 + card_list.append((card, i + 1)) + return card_list + + def generate_card_img(self, card: BaChar) -> BuildImage: + sep_w = 5 + sep_h = 5 + star_h = 15 + img_w = 90 + img_h = 100 + font_h = 20 + bar_h = 20 + bar_w = 90 + bg = BuildImage(img_w + sep_w * 2, img_h + font_h + sep_h * 2, color="#EFF2F5") + img_path = str(self.img_path / f"{cn2py(card.name)}.png") + img = BuildImage(img_w, img_h, background=img_path) + bar = BuildImage(bar_w, bar_h, color="#6495ED") + bg.paste(img, (sep_w, sep_h), alpha=True) + bg.paste(bar, (sep_w, img_h - bar_h + sep_h), alpha=True) + if (card.star == 1): + star_path = str(self.img_path / "star-1.png") + star_w = 15 + elif (card.star == 2): + star_path = str(self.img_path / "star-2.png") + star_w = 30 + else: + star_path = str(self.img_path / "star-3.png") + star_w = 45 + star = BuildImage(star_w, star_h, background=star_path) + bg.paste(star, (img_w // 2 - 15 * (card.star - 1) // 2, img_h - star_h), alpha=True) + text = card.name[:5] + "..." if len(card.name) > 6 else card.name + font = load_font(fontsize=14) + text_w, text_h = font.getsize(text) + draw = ImageDraw.Draw(bg.markImg) + draw.text( + (sep_w + (img_w - text_w) / 2, sep_h + img_h + (font_h - text_h) / 2), + text, + font=font, + fill="gray", + ) + return bg + + def _init_data(self): + self.ALL_CHAR = [ + BaChar( + name=value["名称"], + star=int(value["星级"]), + limited=True if "(" in key else False, + ) + for key, value in self.load_data().items() + ] + + def title2star(self, title: int): + if title == 'Star-3.png': + return 3 + elif title == 'Star-2.png': + return 2 + else: + return 1 + + async def _update_info(self): + info = {} + url = "https://wiki.biligame.com/bluearchive/学生筛选" + result = await self.get_url(url) + if not result: + logger.warning(f"更新 {self.game_name_cn} 出错") + return + else: + dom = etree.HTML(result, etree.HTMLParser()) + char_list = dom.xpath("//div[@class='filters']/table[2]/tbody/tr") + for char in char_list: + try: + name = char.xpath("./td[2]/a/div/text()")[0] + avatar = char.xpath("./td[1]/div/div/a/img/@data-src")[0] + star_pic = char.xpath("./td[4]/img/@alt")[0] + except IndexError: + continue + member_dict = { + "头像": unquote(str(avatar)), + "名称": remove_prohibited_str(name), + "星级": self.title2star(star_pic), + } + info[member_dict["名称"]] = member_dict + self.dump_data(info) + logger.info(f"{self.game_name_cn} 更新成功") + # 下载头像 + for value in info.values(): + await self.download_img(value["头像"], value["名称"]) + # 下载星星 + await self.download_img( + "https://patchwiki.biligame.com/images/bluearchive/thumb/e/e0/82nj2x9sxko473g7782r14fztd4zyky.png/15px-Star-1.png", + "star-1", + ) + await self.download_img( + "https://patchwiki.biligame.com/images/bluearchive/thumb/0/0b/msaff2g0zk6nlyl1rrn7n1ri4yobcqc.png/30px-Star-2.png", + "star-2", + ) + await self.download_img( + "https://patchwiki.biligame.com/images/bluearchive/thumb/8/8a/577yv79x1rwxk8efdccpblo0lozl158.png/46px-Star-3.png", + "star-3" + ) \ No newline at end of file From acae7f0658f0ced99ba84f571276f9dff69954e5 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 13:37:29 +0800 Subject: [PATCH 10/16] Create ISSUE_TEMPLATE.md --- .github/workflows/ISSUE_TEMPLATE.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/ISSUE_TEMPLATE.md diff --git a/.github/workflows/ISSUE_TEMPLATE.md b/.github/workflows/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..00f57290 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE.md @@ -0,0 +1,9 @@ +### 系统版本:Ubuntu 20.04 +### 真寻版本:0.1.5.3 + +### 错误截图 + +[img] + +### 错误说明 +发生了xx错误... From 3f1b23ef8a98602f6ebd7744d05217b9e807a067 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 13:41:35 +0800 Subject: [PATCH 11/16] Update issue templates --- .github/ISSUE_TEMPLATE/bug-issue-template.md | 18 ++++++++++++++++++ .github/ISSUE_TEMPLATE/issue-template.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-issue-template.md create mode 100644 .github/ISSUE_TEMPLATE/issue-template.md diff --git a/.github/ISSUE_TEMPLATE/bug-issue-template.md b/.github/ISSUE_TEMPLATE/bug-issue-template.md new file mode 100644 index 00000000..701148e8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-issue-template.md @@ -0,0 +1,18 @@ +--- +name: Bug issue template +about: " issue template's purpose here." +title: '' +labels: '' +assignees: '' + +--- + +### 系统版本:Ubuntu 20.04 +### 真寻版本:0.1.5.3 + +### 错误截图 + +[img] + +### 错误说明 +发生了xx错误... diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md new file mode 100644 index 00000000..b491885b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -0,0 +1,18 @@ +--- +name: Issue template +about: " issue template's purpose here." +title: '' +labels: '' +assignees: '' + +--- + +### 系统版本:Ubuntu 20.04 +### 真寻版本:0.1.5.3 + +### 错误截图 + +[img] + +### 错误说明 +发生了xx错误... From 13e0fb3df7f09433c45b4041e0f15d0844b66161 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 13:42:22 +0800 Subject: [PATCH 12/16] Delete bug-issue-template.md --- .github/ISSUE_TEMPLATE/bug-issue-template.md | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug-issue-template.md diff --git a/.github/ISSUE_TEMPLATE/bug-issue-template.md b/.github/ISSUE_TEMPLATE/bug-issue-template.md deleted file mode 100644 index 701148e8..00000000 --- a/.github/ISSUE_TEMPLATE/bug-issue-template.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Bug issue template -about: " issue template's purpose here." -title: '' -labels: '' -assignees: '' - ---- - -### 系统版本:Ubuntu 20.04 -### 真寻版本:0.1.5.3 - -### 错误截图 - -[img] - -### 错误说明 -发生了xx错误... From e6347a76a8f2a622397b3aa12c46f4b4fbc63f23 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Wed, 25 May 2022 14:44:28 +0800 Subject: [PATCH 13/16] Update issue-template.md --- .github/ISSUE_TEMPLATE/issue-template.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md index b491885b..087dc60a 100644 --- a/.github/ISSUE_TEMPLATE/issue-template.md +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -14,5 +14,10 @@ assignees: '' [img] +### 日志截图 + +[img] + ### 错误说明 + 发生了xx错误... From eae1dd59a76605563c1f08b021a8737422c8729f Mon Sep 17 00:00:00 2001 From: Dolen <87627379+HiDolen@users.noreply.github.com> Date: Wed, 25 May 2022 17:02:09 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9nickname=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=9A=E4=B8=80=E5=A4=84=E6=96=87=E6=A1=88=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic_plugins/nickname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic_plugins/nickname.py b/basic_plugins/nickname.py index ca7e94a7..29e8f1ff 100755 --- a/basic_plugins/nickname.py +++ b/basic_plugins/nickname.py @@ -73,7 +73,7 @@ async def _(bot: Bot, event: GroupMessageEvent, arg: Message = CommandArg()): f"好啦好啦,我知道啦,{msg},以后就这么叫你吧", f"嗯嗯,{NICKNAME}记住你的昵称了哦,{msg}", f"好突然,突然要叫你昵称什么的...{msg}..", - f"{NICKNAME}会好好记住的{msg}的,放心吧", + f"{NICKNAME}会好好记住{msg}的,放心吧", f"好..好.,那窝以后就叫你{msg}了.", ] ) From 53000a949bad0a16afdee212d4d9cbd7eb9c0c9e Mon Sep 17 00:00:00 2001 From: Dolen <87627379+HiDolen@users.noreply.github.com> Date: Wed, 25 May 2022 17:03:44 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9nickname=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=9A=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=95=8F?= =?UTF-8?q?=E6=84=9F=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic_plugins/nickname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic_plugins/nickname.py b/basic_plugins/nickname.py index 29e8f1ff..b9793e13 100755 --- a/basic_plugins/nickname.py +++ b/basic_plugins/nickname.py @@ -24,7 +24,7 @@ __plugin_version__ = 0.1 __plugin_author__ = "HibiKier" __plugin_configs__ = { "BLACK_WORD": { - "value": ["爸", "爹", "爷"], + "value": ["爸", "爹", "爷", "父亲"], "help": "昵称所屏蔽的关键词,会被替换为 *", "default_value": None } From a6b6a2fbff0f7113468d924637499d43a45241b9 Mon Sep 17 00:00:00 2001 From: Dolen <87627379+HiDolen@users.noreply.github.com> Date: Wed, 25 May 2022 17:21:00 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9nickname=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=9A=E4=B8=80=E5=A4=84=E6=96=87=E6=A1=88=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic_plugins/nickname.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic_plugins/nickname.py b/basic_plugins/nickname.py index b9793e13..8055b415 100755 --- a/basic_plugins/nickname.py +++ b/basic_plugins/nickname.py @@ -90,7 +90,7 @@ async def _(bot: Bot, event: GroupMessageEvent, arg: Message = CommandArg()): f"好啦好啦,我知道啦,{msg},以后就这么叫你吧", f"嗯嗯,{NICKNAME}记住你的昵称了哦,{msg}", f"好突然,突然要叫你昵称什么的...{msg}..", - f"{NICKNAME}会好好记住的{msg}的,放心吧", + f"{NICKNAME}会好好记住{msg}的,放心吧", f"好..好.,那窝以后就叫你{msg}了.", ] )