From bdb8dfa8d2d9ac1668a1a0036d194cb57b168e37 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Mon, 31 Jul 2023 15:03:40 +0800 Subject: feat: add commiter --- docs/Core/index.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/Core/index.md (limited to 'docs/Core/index.md') diff --git a/docs/Core/index.md b/docs/Core/index.md new file mode 100644 index 00000000..3f3422b6 --- /dev/null +++ b/docs/Core/index.md @@ -0,0 +1,49 @@ +

HydroRollCore'水系核心

+ +

+ + + + + + + + + +

+ +## 🎁 Getting + +1. 安装库 + +在命令行输入。 + +``` shell +git clone https://github.com/HydroRoll-Team/HydroRollCore.git +cd HydroRollCore +poetry install --no-dev +# 或者使用pip +# pip install HydroRollCore +``` + +2. 创建规则包实例 + +``` shell +mkdir myrules && cd myrules && mkdir rule1 +echo.> config.toml && echo.> __init__.py :: 创建空的配置文件和python运行脚本 +``` + +在 `__init__.py` 创建一个 `rule` 实例并继承 `Rule` 基类, 通过编写合适的相关方法与类注册规则包实现规则的自定义。 + +``` python +from HydroRollCore import Rules + +class Myrule(Rules): + """自设规则包,继承 Rules 基类""" +``` + +3. 合理修改你的 `config.toml` 配置文件,完成注册! + +## 📄 License + +[MIT](https://github.com/HydroRoll-Team/HydroRollCore/blob/master/LICENSE) © 2023-PRESENT [简律纯](https://github.com/HsiangNianian) -- cgit v1.2.3-70-g09d2