hydroroll-team / hydrorollcore Goto Github PK
View Code? Open in Web Editor NEW水系核心: 事件输入输出流 | 水系标准骰系开发前置 | 规则书编写工具
Home Page: https://core.hydroroll.team
License: GNU Affero General Public License v3.0
水系核心: 事件输入输出流 | 水系标准骰系开发前置 | 规则书编写工具
Home Page: https://core.hydroroll.team
License: GNU Affero General Public License v3.0
HydroRollCore
水系核心封装 infini 并在通信上遵循 echo 标准。核心同时还定义了 GRPS 标准。
infini
infini 对于规则包(rpk)的约束范围遵循 GRPS 标准,且在约定式的生效范围上永远只能作为核心的约定式子集。
echo
用于规范 iamai 框架与 HydroRoll 和 HydroRollCore 之间的通信标准。
Hi! It seems https://github.com/HydroRoll-Team/HydroRollCore/blob/main/hrc/LibCore.py is not a valid python script, perhaps this file is a binary library? If so, I think you can just remove this file from github repository and build it when you're developing on your local machine or during ci.
[14368
]refactor: Comment hook function while running the rules packages
builtin hook function in every rules packages.
try:
##########################################################
# @TODO: builtin hook function in every rules packages.
##########################################################
# for _rule in self.rules:
# for rule_enable_hook_func in self._rule_enable_hooks:
# await rule_enable_hook_func(_rule)
# try:
# await _rule.enable()
# except Exception as e:
# self.error_or_exception(
# f"Enable rule {_rule!r} failed:", e)
# for _rule in self.rules:
# for rule_run_hook_func in self._rule_run_hooks:
# await rule_run_hook_func(_rule)
# _rule_task = asyncio.create_task(_rule.safe_run())
# self._rule_tasks.add(_rule_task)
# _rule_task.add_done_callback(self._rule_tasks.discard)
await self.should_exit.wait()
if hot_reload_task is not None: # pragma: no cover
await hot_reload_task
finally:
# for _rule in self.rules:
# for rule_disable_hook_func in self._rule_disable_hooks:
# await rule_disable_hook_func(_rule)
# await _rule.disable()
底层由 Rust 编写,因为该语言非常适合构建 Cli 应用(确信)。
业务逻辑由 Python 处理,Rust 分发。
无论是本地化也好还是国际化也罢,都作用于核心生成的 pdf 文档与在线站点中。
本地化(i10n)
语言代码( Language Code)、国家代码( Country Code)和编码( Encoding)一致。
国际化(i18n)
考虑依赖 sphinx 实现国际化。
Create config.toml
:
[core]
rule_dirs = ["rules"]
Create main.py
:
from hrc.core import Core
core = Core(hot_reload=True, config_dict={'core': {'rules':['plugins.thePool']}})
if __name__ == '__main__':
core.run()
Run code by using pdm run main.py
.
This will combine both of the config dict and config table.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.