Skip to content

Commit

Permalink
🔖 更新Readme, 修复BUG, 0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KimigaiiWuyi committed Feb 4, 2025
1 parent 328ee58 commit c592238
Show file tree
Hide file tree
Showing 10 changed files with 316 additions and 302 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,6 @@ data
core_help.jpg
gs_restart.sh
gsuid_core/plugins/*
!gsuid_core/plugins/core_command
!gsuid_core/plugins/gs_test.py
!gsuid_core/utils/backup
logs
.pdm-python
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM python:3.10.16-slim-bullseye
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python:3.10-slim-bullseye

ENV TZ=Asia/Shanghai

WORKDIR /app/gsuid_core

Expand All @@ -14,9 +16,9 @@ RUN sed -i 's/http:\/\/deb.debian.org/http:\/\/ftp.cn.debian.org/g' /etc/apt/sou
&& apt-get autoremove \
&& apt-get clean \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& pip install --no-cache-dir --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
&& pip install poetry -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
&& poetry install \
&& pip install --no-cache-dir --upgrade pip -i https://mirror.nju.edu.cn/pypi/web/simple/ \
&& pip install uv -i https://mirror.nju.edu.cn/pypi/web/simple/ \
&& uv sync \
&& rm -rf /app/*

CMD poetry run python3 core.py
CMD uv run core
58 changes: 12 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ⚙️[GenshinUID](https://github.com/KimigaiiWuyi/GenshinUID) Core 0.7.0
# ⚙️[GenshinUID](https://github.com/KimigaiiWuyi/GenshinUID) Core 0.7.1

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?&labelColor=ef8336)](https://pycqa.github.io/isort/)
Expand All @@ -7,57 +7,23 @@

[KimigaiiWuyi/GenshinUID](https://github.com/KimigaiiWuyi/GenshinUID) 的核心部分,平台无关,支持 HTTP/WS 形式调用,便于移植到其他平台以及框架。

本Readme的部分内容**可能已经失效**,请前往最新的详细文档查阅:
本Readme的部分内容**已经失效**,请前往最新的详细文档查阅:

**🎉[详细文档](https://docs.sayu-bot.com)**
**🎉 [详细文档](https://docs.sayu-bot.com)** ( [快速开始(安装)](https://docs.sayu-bot.com/Started/InstallCore.html) | [链接Bot](https://docs.sayu-bot.com/LinkBots/AdapterList.html) | [插件市场](https://docs.sayu-bot.com/InstallPlugins/PluginsList.html) )

👉[插件编写指南](https://docs.sayu-bot.com/CodePlugins/CookBook.html)
👉 [插件编写指南](https://docs.sayu-bot.com/CodePlugins/CookBook.html)

## 安装Core
## 感谢

1. git clone gsuid-core本体

```shell
git clone https://github.com/Genshin-bots/gsuid_core.git --depth=1 --single-branch
```

2. 安装poetry

```shell
pip install poetry
```

3. 安装所需依赖

```shell
# cd进入clone好的文件夹内
cd gsuid_core
# 安装依赖
poetry install
```

4. 安装所需插件(可选)

```shell
# cd进入插件文件夹内
cd plugins
# 安装v4 GenshinUID
git clone -b v4 https://github.com/KimigaiiWuyi/GenshinUID.git --depth=1 --single-branch
```

5. 启动gsuid_core(早柚核心)

```shell
# 在gsuid_core/genshin_core文件夹内
poetry run python core.py
# 或者(二选一即可)
poetry run core
```
- 本项目仅供学习使用,请勿用于商业用途
- [爱发电](https://afdian.com/a/KimigaiiWuyi)
- [GPL-3.0 License](https://github.com/Genshin-bots/gsuid_core/blob/master/LICENSE) ©[@KimigaiiWuyi](https://github.com/KimigaiiWuyi)

6. 链接其他适配端
---

+ 默认core将运行在`localhost:8765`端口上,如有需要可至`config.json`修改。
+ 在支持的Bot上(例如NoneBot2、HoshinoBot、ZeroBot、YunZaiBot等),安装相应适配插件,启动Bot(如果有修改端口,则需要在启动Bot前修改适配插件相应端口),即可自动连接Core端。
> [!IMPORTANT]
>
> 以下内容未经验证。
## Docker部署Core(可选)

Expand Down
3 changes: 3 additions & 0 deletions gsuid_core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
PLUGIN_PATH = Path(__file__).parent / 'plugins'
BUILDIN_PLUGIN_PATH = Path(__file__).parent / 'buildin_plugins'

if not PLUGIN_PATH.exists():
PLUGIN_PATH.mkdir()


def on_core_start(func: Callable):
if func not in core_start_def:
Expand Down
2 changes: 1 addition & 1 deletion gsuid_core/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.0"
__version__ = "0.7.1"
Loading

0 comments on commit c592238

Please sign in to comment.