diff options
| author | 2025-03-15 14:46:01 +0800 | |
|---|---|---|
| committer | 2025-03-15 14:46:01 +0800 | |
| commit | a60a0ab93434e8de0b6b402285f2cf6b8bc16817 (patch) | |
| tree | 694d2974ba8849304271ab6ee2875aa8d3281b7a /test/example_rule.json | |
| parent | 833cee28ddbf6c3d50c2cdd68635993b36478d3d (diff) | |
| parent | afc2e7a45fcd143b7f761ec4cf38ec8e1df183b4 (diff) | |
| download | conventional_role_play-a60a0ab93434e8de0b6b402285f2cf6b8bc16817.tar.gz conventional_role_play-a60a0ab93434e8de0b6b402285f2cf6b8bc16817.zip | |
Merge pull request #2 from pineoncellar/main
feat: simple parser rules load and log processing
Diffstat (limited to 'test/example_rule.json')
| -rw-r--r-- | test/example_rule.json | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/example_rule.json b/test/example_rule.json new file mode 100644 index 0000000..d385f38 --- /dev/null +++ b/test/example_rule.json @@ -0,0 +1,32 @@ +[
+ {
+ "pattern": "^(\\S+)\\((\\d+)\\)\\s+(\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2})",
+ "type": "metadata",
+ "description": "匹配日志元数据,提取 id、QQ 账号和时间。例如:墨勒托.DW(1571806261) 2025-01-27 19:58:15"
+ },
+ {
+ "pattern": "^#(.+)",
+ "type": "action",
+ "description": "匹配行动,以 # 开头。例如:# 我推开门"
+ },
+ {
+ "pattern": "“(.+)”",
+ "type": "speech",
+ "description": "匹配玩家发言,双引号内的内容。例如:\"你好,我是冒险者\""
+ },
+ {
+ "pattern": "\\((.+)\\)",
+ "type": "ooc_speech",
+ "description": "匹配场外发言,括号内的内容。例如:(今天没时间跑团)"
+ },
+ {
+ "pattern": "^(?:[\\.。]([^.。].+))",
+ "type": "dice_order",
+ "description": "匹配掷骰指令,以 . 或 。 开头但是不匹配连续的指令前缀。例如:匹配.ra智力,不匹配'。。。'"
+ },
+ {
+ "pattern": "【(.+)】",
+ "type": "thought",
+ "description": "匹配角色心理活动。例如:【这里好可怕】"
+ }
+]
\ No newline at end of file |
