summaryrefslogtreecommitdiffstatshomepage
path: root/dev/search/search_index.json
diff options
context:
space:
mode:
Diffstat (limited to 'dev/search/search_index.json')
-rw-r--r--dev/search/search_index.json2
1 files changed, 1 insertions, 1 deletions
diff --git a/dev/search/search_index.json b/dev/search/search_index.json
index 88582edb..892dc90f 100644
--- a/dev/search/search_index.json
+++ b/dev/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\u200b\\-_,:!=\\[\\]()\"`/]+|\\.(?!\\d)|&[lg]t;|(?!\\b)(?=[A-Z][a-z])","pipeline":["stemmer"]},"docs":[{"location":"","title":"\u6c34\u7cfb\u6838\u5fc3","text":"<p>\u4f60\u597d!\u4e16\u754c\u4e3b\u3002</p>"},{"location":"changelog/","title":"\u53d8\u66f4\u65e5\u5fd7","text":"<p>Changelog ...</p>"},{"location":"changelog/#105-2023-10-08","title":"1.0.5 (2023-10-08)","text":""},{"location":"changelog/#breaking-changes","title":"BREAKING CHANGES","text":""},{"location":"changelog/#features","title":"FEATURES","text":"<ul> <li>Docs: balabla.</li> <li>Rule: \u652f\u6301\u6cdb\u578b\u3002</li> </ul>"},{"location":"changelog/#bug-fix","title":"BUG FIX","text":"<ul> <li>Docs: balabla.</li> </ul>"},{"location":"changelog/#chore","title":"CHORE","text":"<ul> <li>Readme: \u6dfb\u52a0\u4e86\u4e3b\u9875\u4ecb\u7ecd\u3002</li> </ul>"},{"location":"changelog/#104-2023-10-07","title":"1.0.4 (2023-10-07)","text":""},{"location":"changelog/#features_1","title":"FEATURES","text":"<ul> <li>Docs: \u7f8e\u5316 <code>style</code>\u3002</li> <li>Deps: \u6dfb\u52a0 <code>reportlab</code> \u4f9d\u8d56\uff0c\u7528\u4e8e\u4ee5\u540e\u7684 <code>pdf</code> \u751f\u6210\u3002</li> </ul>"},{"location":"changelog/#103-2023-10-07","title":"1.0.3 (2023-10-07)","text":""},{"location":"changelog/#102-2023-10-07","title":"1.0.2 (2023-10-07)","text":""},{"location":"changelog/#features_2","title":"FEATURES","text":"<ul> <li>Docs: \u4f18\u5316 <code>css</code> \u7ec6\u8282\u3002</li> </ul>"},{"location":"changelog/#101-2023-10-07","title":"1.0.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix_1","title":"BUG FIX","text":"<ul> <li>Docs: \u4fee\u590d <code>Dev</code> \u4e0e <code>latest</code> \u5206\u652f\u7684\u9519\u522b\u5b57\u3002</li> </ul>"},{"location":"changelog/#012-2023-10-07","title":"0.1.2 (2023-10-07)","text":"<p>\u540c\u6b65\u7248\u672c\u6240\u505a\u7684\u6d4b\u8bd5\u3002</p>"},{"location":"changelog/#011-2023-10-07","title":"0.1.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix_2","title":"BUG FIX","text":"<ul> <li>CLI: \u6dfb\u52a0\u547d\u4ee4\u884c\u53c2\u6570\u89e3\u6790\u3002</li> </ul>"},{"location":"changelog/#010-rc1-2023-10-07","title":"0.1.0-rc1 (2023-10-07)","text":""},{"location":"changelog/#chore_1","title":"CHORE","text":"<ul> <li>README: \u66f4\u65b0\u4e3b\u9875\u4ecb\u7ecd\u7684\u5b89\u88c5\u6307\u5357\u3002</li> </ul>"},{"location":"changelog/#010-2023-10-07","title":"0.1.0 (2023-10-07)","text":""},{"location":"changelog/#features_3","title":"Features","text":"<ul> <li>CLI \u6dfb\u52a0\u4e24\u4e2a\u547d\u4ee4\u884c\u540d\u79f0 <code>HydroRollCore</code> \u4e0e <code>HRC</code>\u3002</li> </ul>"},{"location":"changelog/#001-2023-07-04","title":"0.0.1 (2023-07-04)","text":""},{"location":"changelog/#features_4","title":"Features","text":"<ul> <li>init: \u6dfb\u52a0\u547d\u4ee4\u884c\u53c2\u6570\u89e3\u6790\u3002</li> <li>Rule: \u6dfb\u52a0 Rule \u57fa\u7c7b\uff0c\u5b9e\u73b0\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u5939\u4e0b\u7684 python \u811a\u672c\u6216 python \u5305</li> </ul>"},{"location":"changelog/#breaking-change","title":"BREAKING CHANGE","text":"<ul> <li>HydroRollCore: \u6dfb\u52a0\u547d\u4ee4\u884cPath\u3002</li> </ul>"},{"location":"CLI/","title":"CLI Reference","text":"<p>```python exec=\"1\" idprefix=\"\" import argparse import re from HydroRollCore import Cli</p> <p>parser = Cli().parser</p> <p>MONOSPACED = (\"pyproject.toml\", \"pdm.lock\", \".pdm-python\", \":pre\", \":post\", \":all\")</p> <p>def clean_help(help: str) -&gt; str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r\"([\\w\\d_]+)\", r\"<code>__\\1__</code>\", help) # Make env vars monospaced help = re.sub(r\"env var: ([A-Z_]+)\", r\"env var: <code>\\1</code>\", help) for monospaced in MONOSPACED: help = re.sub(rf\"\\s(['\\\"]?{monospaced}['\\\"]?)\", f\"<code>{monospaced}</code>\", help) return help</p> <p>def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -&gt; str: \"\"\"Render the parser help documents as a string.\"\"\" result = [f\"{'#' * heading_level} {title}\\n\"] if parser.description and title != \"HydroRollCore\": result.append(\"&gt; \" + parser.description + \"\\n\")</p> <pre><code>for group in sorted(\n parser._action_groups, key=lambda g: g.title.lower(), reverse=True\n):\n if not any(\n bool(action.option_strings or action.dest)\n or isinstance(action, argparse._SubParsersAction)\n for action in group._group_actions\n ):\n continue\n\n result.append(f\"{group.title.title()}:\\n\")\n for action in group._group_actions:\n if isinstance(action, argparse._SubParsersAction):\n for name, subparser in action._name_parser_map.items():\n result.append(render_parser(subparser, name, heading_level + 1))\n continue\n\n opts = [f\"`{opt}`\" for opt in action.option_strings]\n if not opts:\n line = f\"- `{action.dest}`\"\n else:\n line = f\"- {', '.join(opts)}\"\n if action.metavar:\n line += f\" `{action.metavar}`\"\n line += f\": {clean_help(action.help)}\"\n if action.default and action.default != argparse.SUPPRESS:\n line += f\" (default: `{action.default}`)\"\n result.append(line)\n result.append(\"\")\n\nreturn \"\\n\".join(result)\n</code></pre> <p>print(render_parser(parser, \"HydroRollCore\")) ```</p>"},{"location":"Core/","title":"\u6838\u5fc3\u6982\u89c8","text":"HydroRollCore'\u6c34\u7cfb\u6838\u5fc3"},{"location":"Core/#getting","title":"\ud83c\udf81 Getting","text":"<ol> <li>\u5b89\u88c5\u5e93</li> </ol> <p>\u5728\u547d\u4ee4\u884c\u8f93\u5165\u3002</p> <pre><code>git clone https://github.com/HydroRoll-Team/HydroRollCore.git\ncd HydroRollCore\npdm install\n# \u6216\u8005\u4f7f\u7528pip\n# pip install HydroRollCore\n</code></pre> <ol> <li>\u521b\u5efa\u89c4\u5219\u5305\u5b9e\u4f8b</li> </ol> <pre><code>mkdir myrules &amp;&amp; cd myrules &amp;&amp; mkdir rule1\necho.&gt; config.toml\necho.&gt; __init__.py\n</code></pre> <p>\u5728 <code>__init__.py</code> \u521b\u5efa\u4e00\u4e2a <code>rule</code> \u5b9e\u4f8b\u5e76\u7ee7\u627f <code>Rule</code> \u57fa\u7c7b, \u901a\u8fc7\u7f16\u5199\u5408\u9002\u7684\u76f8\u5173\u65b9\u6cd5\u4e0e\u7c7b\u6ce8\u518c\u89c4\u5219\u5305\u5b9e\u73b0\u89c4\u5219\u7684\u81ea\u5b9a\u4e49\u3002</p> <pre><code>from HydroRollCore import Rule\n\nclass Myrule(Rule):\n \"\"\"\u81ea\u8bbe\u89c4\u5219\u5305\uff0c\u7ee7\u627f Rule \u57fa\u7c7b\"\"\"\n</code></pre> <ol> <li>\u5408\u7406\u4fee\u6539\u4f60\u7684 <code>config.toml</code> \u914d\u7f6e\u6587\u4ef6\uff0c\u5b8c\u6210\u6ce8\u518c!</li> </ol>"},{"location":"Core/#license","title":"\ud83d\udcc4 License","text":"<p>MIT \u00a9 2023-PRESENT \u7b80\u5f8b\u7eaf</p>"},{"location":"Help/TermList/","title":"\u672f\u8bed\u8868\u4e00\u89c8","text":""},{"location":"Help/TermList/#_1","title":"<code>\u79fb\u6b65\u6b63\u5f0f\u672f\u8bed</code>","text":""},{"location":"Help/emoji/","title":"\u56fe\u6807\u3001\u6ce8\u91ca\u8bf4\u660e","text":""},{"location":"Help/emoji/#_1","title":"\u76ee\u5f55\u6811\u3001\u4fa7\u8fb9\u680f\u56fe\u6807","text":"<p>\u8fd9\u4e9b\u56fe\u6807\u5c06\u4f1a\u51fa\u73b0\u5728\u9875\u9762\u5de6\u4fa7\u7684 <code>navigation</code> \u4e0e\u6587\u7ae0\u53f3\u4fa7\u7684 <code>toc</code> \u5f53\u4e2d\u3002</p> <code>\u5df2\u88ab\u5e9f\u5f03</code><code>\u6700\u8fd1\u6dfb\u52a0</code><code>\u5b9e\u9a8c\u529f\u80fd</code><code>\u6269\u5c55\u7279\u6027</code> <p>\u5728 <code>release</code> \u7248\u672c\u4e2d \u4e0d\u63a8\u8350\u4f7f\u7528 \u4f46\u662f \u4ecd\u7136\u6709\u6548 \u7684\u529f\u80fd\u3001\u7279\u6027\u3002\u5e76\u4e14\u5728 <code>latest</code> \u7248\u672c\u4e2d\u5df2\u7ecf\u5b8c\u5168\u5e9f\u5f03<sup>1</sup>\u3002</p> <p>\u5728\u4e0a\u4e00\u4e2a <code>release</code> \u7248\u672c\u4f5c\u4e3a<code>\u5b9e\u9a8c\u529f\u80fd</code>\u6216\u4f5c\u4e3a<code>\u6269\u5c55\u7279\u6027</code>\u4f46\u662f\u6838\u5fc3\u672c\u4f53\u5e76\u672a\u652f\u6301\u7684\u529f\u80fd\u3001\u7279\u6027\uff0c\u4e8e <code>latest</code> \u7248\u672c\u88ab\u5f15\u5165\u3002</p> <p>\u5b58\u5728\u4e8e\u5f53\u524d <code>dev</code> \u7248\u672c\u4e2d\u4f46\u662f\u672a\u5728 <code>latest</code> \u7248\u672c\u4e2d\u52a0\u5165\u7684\u529f\u80fd\u3001\u7279\u6027\u3002</p> <p>\u5728\u652f\u6301 <code>latest</code> \u6216 <code>dev</code> \u6216 \u7279\u5b9a <code>release</code> \u7248\u672c\u7684\u63d2\u4ef6\u6269\u5c55\u4e2d\u5b58\u5728\u6b64\u7279\u6027\u7684\u53ef\u884c\u6027\u65b9\u6848\u3002</p>"},{"location":"Help/emoji/#_2","title":"\u62bd\u8c61\u6982\u5ff5","text":"<p>\u8fd9\u4e9b\u56fe\u6807\u4f1a\u51fa\u73b0\u5728\u6587\u7ae0\u5185\u5bb9\u4e2d\u4f5c\u4e3a\u62bd\u8c61\u6982\u5ff5\u7684\u5177\u4f53\u8868\u8fbe\uff0c\u7528\u4e8e\u8fc1\u79fb\u8bb0\u5fc6\u3002 </p> <p>\u4ee5\u4e0b\u662f\u56fe\u6807\u5e94\u7528\u4e3e\u4f8b:</p> <ul> <li>[<code>\u65f6\u4ee3</code>]: <code>1899</code> <code>2100</code> <code>\u7f8e\u597d\u5e74\u4ee3</code> <code>WW II</code> <code>2011-2021</code></li> <li>[<code>\u98ce\u683c</code>]: <code>\u4e2d\u4e16\u7eaa</code> <code>\u79d1\u5e7b</code> <code>\u60ac\u7591</code> <code>\u5fc3\u7406\u6050\u6016</code> <code>\u79d8\u5bc6\u5267\u60c5</code></li> <li>[<code>\u5730\u70b9</code>]: <code>\u5362\u6d6e\u5bab</code> <code>\u51e1\u5c14\u8d5b</code> <code>\u541b\u4e34\u57ce</code> <code>\u706b\u661f</code> <code>\u51ac\u6728</code></li> </ul> <ul> <li>[<code>\u4eba\u7269\u80cc\u666f</code>]: <code>\u751f\u4e8e\u94f6\u6cb3\u7eaa\u514311988\u5e74\uff0c\u5352\u4e8e\u94f6\u6cb3\u7eaa\u514312069\u5e74\u3002\u4ed6\u7684\u5352\u5e74\u540e\u6765\u88ab\u786e\u5b9a\u4e3a\u57fa\u5730\u7eaa\u5143\u5143\u5e74\u3002\u4ed6\u662f\u4e00\u4f4d\u5e74\u8f7b\u6709\u4e3a\u7684\u6570\u5b66\u5bb6\uff0c\u4e2d\u7b49\u4e2a\u5b50\uff0c\u957f\u76f8\u4fca\u6717\u3002\u4ed6\u66fe\u7ecf\u62c5\u4efb\u5ddd\u9640\u5927\u5b66\u6570\u5b66\u7cfb\u4e3b\u4efb\uff0c\u662f\u7b2c\u4e00\u5e1d\u56fd\u514b\u91cc\u6602\u4e00\u4e16\u7687\u5e1d\u7684\u5fa1\u524d\u9996\u76f8\uff0c\u5ddd\u9640\u5927\u5b66\u5fc3\u7406\u53f2\u5b66\u7cfb\u8363\u8a89\u6559\u6388\uff0c\u5fc3\u7406\u53f2\u5b66\u7814\u7a76\u8ba1\u5212\u4e3b\u6301\u4eba\u3001\u94f6\u6cb3\u767e\u79d1\u5168\u4e66\u6267\u884c\u7f16\u8f91\u3002\u4ed6\u662f\u5fc3\u7406\u53f2\u5b66\u521b\u59cb\u4eba\u4e4b\u4e00\uff08\u53e6\u4e00\u4f4d\u662f\u96e8\u679c\u00b7\u963f\u739b\u745e\u5c14\uff09\uff0c\u540c\u65f6\u4e5f\u662f\u57fa\u5730\u521b\u59cb\u4eba\u3002\u4ed6\u8fd8\u88ab\u8ba4\u4e3a\u662f\u7b2c\u4e8c\u57fa\u5730\u7b2c\u4e00\u4efb\u9996\u5e2d\u53d1\u8a00\u8005\uff0c\u540e\u6765\u4e5f\u6210\u4e86\u57fa\u5730\u7684\u4f20\u5947\u82f1\u96c4\u3002</code></li> </ul>"},{"location":"Help/emoji/#_3","title":"\u6ce8\u91ca\u8bf4\u660e","text":"<ul> <li><code>\u91cd\u5b9a\u5411\u81f3\u6b63\u5f0f\u672f\u8bed</code>: \u5e38\u4e0e\u4e00\u8d77\u4e3a \u8fc7\u671f\u9875\u9762 \u91cd\u5b9a\u5411\u5185\u5bb9\u7d22\u5f15\u3002</li> </ul> <ol> <li> <p>\u5177\u4f53\u8fd8\u8981\u770b\u4e0b\u4e00\u4e2a\u5927\u7248\u672c\u7684\u6587\u6863\u5982\u4f55\u7f16\u5199\u3002\u00a0\u21a9</p> </li> </ol>"},{"location":"RulePackage/intro/","title":"\u6982\u8ff0","text":"<p>Abstract</p> <p>\u6b64\u7ae0\u8282\u6d89\u53ca\u5230\u771f\u6b63\u7684 Python \u89c4\u8303\u95ee\u9898\uff0c\u56e0\u6b64\u8bf7\u8ba4\u771f\u9605\u8bfb\u5e76\u591a\u52a0\u7ec3\u4e60\uff0c\u65b9\u80fd\u5199\u51fa\u6f02\u4eae\u7684\u4ee3\u7801\u3002</p> <p>\u6c34\u7cfb\u89c4\u5219\u5305\u53ef\u4ee5\u901a\u8fc7 <code>pip</code> Pyhton \u5305\u7ba1\u7406\u5de5\u5177\u76f4\u63a5\u4e0b\u8f7d\uff0c\u4f46\u662f\u4e3a\u4e86\u65b9\u4fbf\uff0c\u6211\u4eec\u63a8\u8350\u4ee5\u4e0b\u4e24\u4e2a\u5b89\u88c5\u65b9\u6848\u3002</p> \u4f7f\u7528<code>pdm</code>\u4f7f\u7528<code>hrc</code> <pre><code>pdm install MyRule # (1)! \n</code></pre> <ol> <li> \u5177\u4f53\u7684\u8bf4\u662f\u5f62\u5982 <code>HydroRollCore-Rule-The_Pool</code>\u8fd9\u6837\u7684\u5305\u540d\u3002</li> </ol> <p>Phasellus posuere in sem ut cursus (1)</p> <ol> <li> I'm an annotation as well!</li> </ol>"},{"location":"RulePackage/getStart/attribute/","title":"attribute \u5c5e\u6027","text":"<p>Info</p> <p>\u5173\u8054\u5230\u4e00\u4e2a\u5bf9\u8c61\u7684\u503c\uff0c\u901a\u5e38\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6309\u540d\u79f0\u6765\u5f15\u7528\u3002 \u4e3e\u4f8b\u6765\u8bf4\uff0c\u5982\u679c\u5bf9\u8c61 o \u5177\u6709\u5c5e\u6027 a \u5219\u53ef\u4ee5\u7528 o.a \u6765\u5f15\u7528\u5b83\u3002</p> <p>\u5982\u679c\u5bf9\u8c61\u5141\u8bb8\uff0c\u5c06\u672a\u88ab\u5b9a\u4e49\u4e3a \u6807\u8bc6\u7b26\u548c\u5173\u952e\u5b57 \u7684\u975e\u6807\u8bc6\u540d\u79f0\u7528\u4f5c\u4e00\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4f8b\u5982\u4f7f\u7528 setattr()\u3002 \u8fd9\u6837\u7684\u5c5e\u6027\u5c06\u65e0\u6cd5\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6765\u8bbf\u95ee\uff0c\u800c\u662f\u5fc5\u987b\u901a\u8fc7 getattr() \u6765\u83b7\u53d6\u3002</p>"},{"location":"RulePackage/getStart/class/","title":"class \u7c7b","text":"<p>Info</p> <p>\u7528\u6765\u521b\u5efa\u7528\u6237\u5b9a\u4e49\u5bf9\u8c61\u7684\u6a21\u677f\u3002\u7c7b\u5b9a\u4e49\u901a\u5e38\u5305\u542b\u5bf9\u8be5\u7c7b\u7684\u5b9e\u4f8b\u8fdb\u884c\u64cd\u4f5c\u7684\u65b9\u6cd5\u5b9a\u4e49\u3002</p>"},{"location":"RulePackage/getStart/method/","title":"method \u65b9\u6cd5","text":"<p>Info</p> <p>\u5728\u7c7b\u5185\u90e8\u5b9a\u4e49\u7684\u51fd\u6570\u3002\u5982\u679c\u4f5c\u4e3a\u8be5\u7c7b\u7684\u5b9e\u4f8b\u7684\u4e00\u4e2a\u5c5e\u6027\u6765\u8c03\u7528\uff0c\u65b9\u6cd5\u5c06\u4f1a\u83b7\u53d6\u5b9e\u4f8b\u5bf9\u8c61\u4f5c\u4e3a\u5176\u7b2c\u4e00\u4e2a argument (\u901a\u5e38\u547d\u540d\u4e3a self)\u3002\u53c2\u89c1 function \u548c nested scope\u3002</p>"},{"location":"RulePackage/getStart/getDeeper/Module/","title":"Module \u6a21\u5757","text":"<p>Info</p> <p>\u6b64\u5bf9\u8c61\u662f Python \u4ee3\u7801\u7684\u4e00\u79cd\u7ec4\u7ec7\u5355\u4f4d\u3002\u5404\u6a21\u5757\u5177\u6709\u72ec\u7acb\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u53ef\u5305\u542b\u4efb\u610f Python \u5bf9\u8c61\u3002\u6a21\u5757\u53ef\u901a\u8fc7 importing \u64cd\u4f5c\u88ab\u52a0\u8f7d\u5230 Python \u4e2d\u3002</p> <p>\u53e6\u89c1 package\u3002</p> <p></p>"},{"location":"RulePackage/getStart/getDeeper/Package/","title":"Package \u5305","text":"<p>Info</p> <p>\u4e00\u79cd\u53ef\u5305\u542b\u5b50\u6a21\u5757\u6216\u9012\u5f52\u5730\u5305\u542b\u5b50\u5305\u7684 Python module\u3002 \u4ece\u6280\u672f\u4e0a\u8bf4\uff0c\u5305\u662f\u5177\u6709 path \u5c5e\u6027\u7684 Python \u6a21\u5757\u3002</p> <p>\u53e6\u53c2\u89c1 regular package \u548c namespace package\u3002</p>"},{"location":"RulePackage/getStart/getDeeper/object/","title":"object \u5bf9\u8c61","text":"<p>Info</p> <p>\u4efb\u4f55\u5177\u6709\u72b6\u6001\uff08\u5c5e\u6027\u6216\u503c\uff09\u4ee5\u53ca\u9884\u5b9a\u4e49\u884c\u4e3a\uff08\u65b9\u6cd5\uff09\u7684\u6570\u636e\u3002object \u4e5f\u662f\u4efb\u4f55 new-style class \u7684\u6700\u9876\u5c42\u57fa\u7c7b\u540d\u3002</p>"},{"location":"Standard/what-is-rule-package/","title":"\u4ec0\u4e48\u662f\u89c4\u5219\u5305\uff1f","text":"<p>\u89c4\u5219\u5305\u662f\u6c34\u7cfb\u6838\u5fc3\u7528\u6765\u52a0\u8f7d\u7684\u5bf9\u8c61\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u6c34\u7cfb\u6838\u5fc3\u52a0\u8f7d\u7684\u4e00\u4e2a\u4e00\u4e2a\u89c4\u5219\u5b9e\u4f8b\u3002</p> <p>\u89c4\u5219\u5305\u66f4\u7c7b\u4f3c\u4e8e\u63d2\u4ef6\u7684\u8bbe\u8ba1\uff0c\u6240\u4ee5\u89c4\u5219\u5305\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2aPython\u6587\u4ef6\u6216\u8005\u4e00\u4e2aPython\u5305\uff0c\u4f46\u5b83\u5fc5\u987b\u50cf\u63d2\u4ef6\u90a3\u6837\u7ee7\u627f\u4e00\u4e2a\u50cfPlugin\u8fd9\u6837\u7684\u7c7b\uff08\u4e0d\u7136\u65e0\u6cd5\u8bfb\u53d6\uff0c\u6211\u4eec\u59d1\u4e14\u53eb\u8fd9\u4e2a\u7c7b\u4e3aRule\uff09\uff0c\u4ee5\u53ca\u5728Rule\u7684\u5b50\u7c7b\u91cc\u5b9e\u73b0\u4e00\u4e9b\u50cfhandle()\u6216\u8005rule()\u8fd9\u6837\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff08\u4e5f\u53eb\u51fd\u6570\uff09\uff0c\u800c\u8fd9\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff0c\u5c31\u662f\u6211\u4eec\u8981\u8ba8\u8bba\u7684\uff0c\u4e00\u4e2a\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u660e\u786e\u4e86\u4e00\u4e2a\u7ee7\u627f\u81eaRule\u7c7b\u7684\u5b50\u7c7b\u5b83\u672c\u8eab\u5e94\u8be5\u5b9e\u73b0\u4ec0\u4e48\u65b9\u6cd5\u3002</p> <p>\u4e3e\u4e2a\u4f8b\u5b50\uff08\u968f\u4fbf\u5199\u7684\uff0c\u5176\u4e2d\u4e00\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u6216\u8005\u7c7b\u540d\u90fd\u662f\u4e0d\u786e\u5b9a\u7684\uff0c\u4ee5\u540e\u6216\u8bb8\u4f1a\u6539\uff09\uff1a</p> <pre><code>from HydroRolicore import RuLe\n\nclass MyRule(Rule):\n \"\"\"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\n\n check \u51fd\u6570\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\u4e4b\u4e00\n name\u5c5e\u6027\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u7528\u6765\u5b9a\u4e49\u8fd9\u4e2a\u89c4\u5219\u5305\u7684\u540d\u5b57\n priority\u662f\u53ef\u9009\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u9ed8\u8ba40\n \"\"\"\n\n name = \"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\"\n priority = 0 # \u4f18\u5148\u7ea7\n\n def check(self):\n \"\"\"\u68c0\u5b9a\u65b9\u6cd5\n\n self.result \u662f\u9700\u8981\u68c0\u5b9a\u65f6\u8ba1\u7b97\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\n self.rule.ability \u662fRule\u7c7b\u91cc\u63d0\u4f9b\u7684\u7528\u4e8e\u5224\u65ad\u68c0\u5b9a\u60c5\u51b5\u7684\u5c5e\u6027\n \"\"\"\n\n if self.result &lt; 5 and self.result &gt; 0:\n return self.rule.ability.success # \u8fd4\u56de\u5927\u6210\u529f\u65f6\u9ab0\u4e3b\u81ea\u5b9a\u4e49\u7684\u5927\u6210\u529f\u6587\u672c\n else:\n ... # \u5176\u4ed6\u7684\u68c0\u5b9a\u60c5\u51b5\n</code></pre> <p>\u8fd9\u6837\u5c31\u5b9e\u73b0\u4e86\u4e00\u4e2a\u6c34\u7cfb\u89c4\u5219\u5305\uff0c\u5f53pl\u4f7f\u7528\u68c0\u5b9a\u63b7\u9ab0\u6307\u4ee4\u65f6\u5c31\u4f1a\u8c03\u7528check()\u65b9\u6cd5\uff0c\u5982\u679c\u68c0\u5b9a\u7ed3\u679c\u6570\u503c\u5c0f\u4e8e5\u4e14\u5927\u4e8e0\u90a3\u4e48\u8fd4\u56de\u5927\u6210\u529f\u3002</p> <p>\u6211\u4eec\u8981\u505a\u7684\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u8fd9\u6837\u4e00\u4e2a\u201c\u5230\u5e95\u9700\u8981\u5728Rule\u7684\u5b50\u7c7bMyRule\u91cc\u5fc5\u987b\u5b9e\u73b0\u54ea\u4e9b\u65b9\u6cd5\uff1f\u201d\u7684\u95ee\u9898\u3002</p>"},{"location":"Standard/Term/DefaultDice/","title":"DefaultDice \u9ed8\u8ba4\u9ab0\u5b50","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u7c7b\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c</p>"},{"location":"Standard/Term/DefaultDice/#_1","title":"\u7c7b\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u5404\u79cd\u5c5e\u6027\uff0c\u4f8b\u5982\u9ed8\u8ba4\u9ab0\u5b50\u6570\u91cf\uff0c\u9762\u6570</p>"},{"location":"Standard/Term/DefaultDice/_counts/","title":"_counts \u9ab0\u5b50\u4e2a\u6570","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u503c\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c</p>"},{"location":"Standard/Term/DefaultDice/_counts/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u4e2a\u6570</p>"},{"location":"Standard/Term/DefaultDice/_sides/","title":"_sides \u9ab0\u5b50\u9762\u6570","text":""},{"location":"Standard/Term/DefaultDice/_sides/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u9762\u6570</p>"},{"location":"Standard/Term/PlayerCard/","title":"PlayerCard \u4eba\u7269\u5361","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002</p>"},{"location":"Standard/Term/PlayerCard/#_1","title":"\u7c7b\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u4eba\u7269\u5361\u7684\u683c\u5f0f\uff0c\u5305\u62ec\u4eba\u7269\u5c5e\u6027\uff0c\u5c5e\u6027\u4e4b\u95f4\u7684\u8ba1\u7b97\u5173\u7cfb\u7b49</p>"},{"location":"Standard/Term/check/","title":"check \u68c0\u5b9a","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002</p>"},{"location":"Standard/Term/check/#_1","title":"\u65b9\u6cd5\u8bf4\u660e","text":"<p>\u4f7f\u7528<code>check</code>\u6216\u8005<code>ability</code>\u65b9\u6cd5, \u5fc5\u987b\u5bf9\u68c0\u5b9a\u7ed3\u679c\u8bbe\u5b9a\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\u3002</p>"},{"location":"Standard/Term/check/#_2","title":"\u68c0\u5b9a\u7ed3\u679c\u8868","text":"<p>\u5982<code>\u65b9\u6cd5</code>\u6240\u8a00\uff0c\u4f60\u5fc5\u987b\u4e3a\u68c0\u5b9a\u7684\u7ed3\u679c\u8bbe\u8ba1\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u4e25\u683c\u5e76\u4e14\u5408\u7406\u7684\u5206\u914d\u5212\u5206\u754c\u9650\uff0c\u4fdd\u8bc1\u6240\u6709\u60c5\u51b5\u90fd\u5728\u5141\u8bb8\u8303\u56f4\u5185\u6709\u4e00\u4e2a\u7c7b\u4f3c\u201d\u6210\u529f\u201d\u201d\u5931\u8d25\u201d\u7684\u8f93\u51fa\u3002</p>"},{"location":"Standard/Term/check/ability/","title":"ability \u68c0\u5b9a","text":"<p>Info</p> <p>\u5173\u4e8e\u8fd9\u90e8\u5206\u5185\u5bb9\u8bf7\u79fb\u6b65\u6b63\u5f0f\u672f\u8bed: <code>check \u68c0\u5b9a</code></p> <p>\u8fd9\u90e8\u5206\u5176\u5b9e\u5df2\u7ecf\u79fb\u9664\u3002</p>"},{"location":"Standard/Term/duration/","title":"duration (\u65f6\u957f)","text":""},{"location":"blog/","title":"Blog","text":""},{"location":"blog/2023/10/07/rule/","title":"Rule \u57fa\u7c7b\u5df2\u7ecf\u652f\u6301\u6cdb\u578b\u4e86","text":"<p>Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.</p> <p>Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.</p> <p>This article explains how to build a standalone blog with Material for MkDocs. If you want to build a blog alongside your documentation, please refer to the plugin's documentation.</p>"},{"location":"blog/2023/10/07/rule/#quick-start","title":"Quick start","text":""},{"location":"blog/2023/10/07/rule/#creating-a-standalone-blog","title":"Creating a standalone blog","text":"<p>You can bootstrap a new project using the <code>mkdocs</code> executable:</p> <pre><code>mkdocs new .\n</code></pre> <p>This will create the following structure:</p> <pre><code>.\n\u251c\u2500 docs/\n\u2502 \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n</code></pre>"},{"location":"blog/2023/10/07/rule/#configuration","title":"Configuration","text":"<p>In this article, we're going to build a standalone blog, which means that the blog lives at the root of your project. For this reason, open <code>mkdocs.yml</code>, and replace its contents with:</p> <pre><code>site_name: My Blog\ntheme:\n name: material\n features:\n - navigation.sections\nplugins:\n - blog:\n blog_dir: . # (1)!\n - search\n - tags\nnav:\n - index.md\n</code></pre> <ol> <li>This is the important part \u2013 we're hosting the blog at the root of the project, and not in a subdirectory. For more information, see the <code>blog_dir</code> configuration option.</li> </ol>"},{"location":"blog/2023/10/07/rule/#blog-setup","title":"Blog setup","text":"<p>The blog index page lives in <code>docs/index.md</code>. This page was pre-filled by MkDocs with some content, so we're going to replace it with what we need to bootstrap the blog:</p> <pre><code># Blog\n</code></pre> <p>That's it.</p>"},{"location":"blog/2023/10/07/rule/#writing-your-first-post","title":"Writing your first post","text":"<p>Now that we have set up the built-in blog plugin, we can start writing our first post. All blog posts are written with the exact same Markdown flavor as already included with Material for MkDocs. First, create a folder called <code>posts</code> with a file called <code>hello-world.md</code>:</p> <pre><code>.\n\u251c\u2500 docs/\n\u2502 \u251c\u2500 posts/\n\u2502 \u2502 \u2514\u2500 hello-world.md # (1)!\n\u2502 \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n</code></pre> <ol> <li>If you'd like to arrange posts differently, you're free to do so. The URLs are built from the format specified in <code>post_url_format</code> and the titles and dates of posts, no matter how they are organized inside the <code>posts</code> directory.</li> </ol> <p>Then, open up <code>hello-world.md</code>, and add the following lines:</p> <pre><code>---\ndraft: true # (1)!\ndate: 2022-01-31\ncategories:\n - Hello\n - World\n---\n\n# Hello world!\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec\nmaximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula\nerat, ut egestas tellus eros at risus. In hac habitasse platea dictumst.\nPhasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris\nNam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in\nsem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac\nmetus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet.\n\n&lt;!-- more --&gt;\n\nDonec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum\nmassa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam\ntempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet\nmolestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus.\n\nNunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat.\nIn auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc\npharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis\narcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue.\nIn velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque\ntellus id elit ultricies, vel finibus erat cursus.\n</code></pre> <ol> <li>If you mark a post as a draft, a red marker appears next to the post date on index pages. When the site is built, drafts are not included in the output. This behavior can be changed, e.g. for rendering drafts when building deploy previews.</li> </ol> <p>When you spin up the live preview server, you should be greeted by your first post! You'll also realize, that archive and category indexes have been automatically generated for you:</p> <p></p> <p>However, this is just the start. The built-in blog plugin packs a lot of functionality needed in day-to-day blogging. Visit the documentation of the plugin to learn about the following topics:</p> <ul> <li>Adding an excerpt</li> <li>Adding authors</li> <li>Adding categories</li> <li>Adding tags</li> <li>Adding related links</li> <li>Linking from and to posts</li> <li>Setting the reading time</li> <li>Setting defaults</li> </ul> <p>Additionally, the built-in blog plugin has dozens of configuration options which allow for fine-tuning the output. You can configure post slugs, general behavior and much more.</p>"},{"location":"blog/2023/10/07/rule/#whats-next","title":"What's next?","text":"<p>Getting basic blogging support out the door was quite a challenge \u2013 the built-in blog plugin is probably the biggest release this year and already packs a lot of functionality. However, Material for MkDocs is used in many different contexts, which is why we'd expect to iterate, as always.</p> <p>Some ideas already proposed by users:</p> <ul> <li> <p>Blog series: Authors should be able to create so called blog series and assign posts to a blog series using simple identifiers. For each post that is part of a series, a list with links to all other posts should be included in the post's content.</p> </li> <li> <p>Author indexes: Besides archive and category indexes, authors should be able to create per-author indexes, which list all posts linked to an author. Additionally, a profile should be created for each author and linked from posts.</p> </li> <li> <p>Social share buttons: It should be easy to share blog posts via social media or other ways. For this reason, it should be possible to automatically include social sharing buttons with each post.</p> </li> </ul> <p>What's still missing from the brand new built-in blog plugin? Feel free to share your ideas in the comments. Together, we can build one of the best modern engines for technical blogging!</p>"},{"location":"blog/archive/2023/","title":"2023","text":""},{"location":"blog/category/rules/","title":"Rules","text":""}]} \ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\u200b\\-_,:!=\\[\\]()\"`/]+|\\.(?!\\d)|&[lg]t;|(?!\\b)(?=[A-Z][a-z])","pipeline":["stemmer"]},"docs":[{"location":"","title":"\u6c34\u7cfb\u6838\u5fc3","text":"<p>\u4f60\u597d!\u4e16\u754c\u4e3b\u3002</p>"},{"location":"changelog/","title":"\u53d8\u66f4\u65e5\u5fd7","text":"<p>Changelog ...</p>"},{"location":"changelog/#105-2023-10-08","title":"1.0.5 (2023-10-08)","text":""},{"location":"changelog/#breaking-changes","title":"BREAKING CHANGES","text":""},{"location":"changelog/#features","title":"FEATURES","text":"<ul> <li>Docs: balabla.</li> <li>Rule: \u652f\u6301\u6cdb\u578b\u3002</li> </ul>"},{"location":"changelog/#bug-fix","title":"BUG FIX","text":"<ul> <li>Docs: balabla.</li> </ul>"},{"location":"changelog/#chore","title":"CHORE","text":"<ul> <li>Readme: \u6dfb\u52a0\u4e86\u4e3b\u9875\u4ecb\u7ecd\u3002</li> </ul>"},{"location":"changelog/#104-2023-10-07","title":"1.0.4 (2023-10-07)","text":""},{"location":"changelog/#features_1","title":"FEATURES","text":"<ul> <li>Docs: \u7f8e\u5316 <code>style</code>\u3002</li> <li>Deps: \u6dfb\u52a0 <code>reportlab</code> \u4f9d\u8d56\uff0c\u7528\u4e8e\u4ee5\u540e\u7684 <code>pdf</code> \u751f\u6210\u3002</li> </ul>"},{"location":"changelog/#103-2023-10-07","title":"1.0.3 (2023-10-07)","text":""},{"location":"changelog/#102-2023-10-07","title":"1.0.2 (2023-10-07)","text":""},{"location":"changelog/#features_2","title":"FEATURES","text":"<ul> <li>Docs: \u4f18\u5316 <code>css</code> \u7ec6\u8282\u3002</li> </ul>"},{"location":"changelog/#101-2023-10-07","title":"1.0.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix_1","title":"BUG FIX","text":"<ul> <li>Docs: \u4fee\u590d <code>Dev</code> \u4e0e <code>latest</code> \u5206\u652f\u7684\u9519\u522b\u5b57\u3002</li> </ul>"},{"location":"changelog/#012-2023-10-07","title":"0.1.2 (2023-10-07)","text":"<p>\u540c\u6b65\u7248\u672c\u6240\u505a\u7684\u6d4b\u8bd5\u3002</p>"},{"location":"changelog/#011-2023-10-07","title":"0.1.1 (2023-10-07)","text":""},{"location":"changelog/#bug-fix_2","title":"BUG FIX","text":"<ul> <li>CLI: \u6dfb\u52a0\u547d\u4ee4\u884c\u53c2\u6570\u89e3\u6790\u3002</li> </ul>"},{"location":"changelog/#010-rc1-2023-10-07","title":"0.1.0-rc1 (2023-10-07)","text":""},{"location":"changelog/#chore_1","title":"CHORE","text":"<ul> <li>README: \u66f4\u65b0\u4e3b\u9875\u4ecb\u7ecd\u7684\u5b89\u88c5\u6307\u5357\u3002</li> </ul>"},{"location":"changelog/#010-2023-10-07","title":"0.1.0 (2023-10-07)","text":""},{"location":"changelog/#features_3","title":"Features","text":"<ul> <li>CLI \u6dfb\u52a0\u4e24\u4e2a\u547d\u4ee4\u884c\u540d\u79f0 <code>HydroRollCore</code> \u4e0e <code>HRC</code>\u3002</li> </ul>"},{"location":"changelog/#001-2023-07-04","title":"0.0.1 (2023-07-04)","text":""},{"location":"changelog/#features_4","title":"Features","text":"<ul> <li>init: \u6dfb\u52a0\u547d\u4ee4\u884c\u53c2\u6570\u89e3\u6790\u3002</li> <li>Rule: \u6dfb\u52a0 Rule \u57fa\u7c7b\uff0c\u5b9e\u73b0\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u5939\u4e0b\u7684 python \u811a\u672c\u6216 python \u5305</li> </ul>"},{"location":"changelog/#breaking-change","title":"BREAKING CHANGE","text":"<ul> <li>HydroRollCore: \u6dfb\u52a0\u547d\u4ee4\u884cPath\u3002</li> </ul>"},{"location":"CLI/","title":"CLI Reference","text":"<p>```python exec=\"1\" idprefix=\"\" import argparse import re from HydroRollCore import Cli</p> <p>parser = Cli().parser</p> <p>MONOSPACED = (\"pyproject.toml\", \"pdm.lock\", \".pdm-python\", \":pre\", \":post\", \":all\")</p> <p>def clean_help(help: str) -&gt; str: # Make dunders monospaced avoiding italic markdown rendering help = re.sub(r\"([\\w\\d_]+)\", r\"<code>__\\1__</code>\", help) # Make env vars monospaced help = re.sub(r\"env var: ([A-Z_]+)\", r\"env var: <code>\\1</code>\", help) for monospaced in MONOSPACED: help = re.sub(rf\"\\s(['\\\"]?{monospaced}['\\\"]?)\", f\"<code>{monospaced}</code>\", help) return help</p> <p>def render_parser( parser: argparse.ArgumentParser, title: str, heading_level: int = 2 ) -&gt; str: \"\"\"Render the parser help documents as a string.\"\"\" result = [f\"{'#' * heading_level} {title}\\n\"] if parser.description and title != \"HydroRollCore\": result.append(\"&gt; \" + parser.description + \"\\n\")</p> <pre><code>for group in sorted(\n parser._action_groups, key=lambda g: g.title.lower(), reverse=True\n):\n if not any(\n bool(action.option_strings or action.dest)\n or isinstance(action, argparse._SubParsersAction)\n for action in group._group_actions\n ):\n continue\n\n result.append(f\"{group.title.title()}:\\n\")\n for action in group._group_actions:\n if isinstance(action, argparse._SubParsersAction):\n for name, subparser in action._name_parser_map.items():\n result.append(render_parser(subparser, name, heading_level + 1))\n continue\n\n opts = [f\"`{opt}`\" for opt in action.option_strings]\n if not opts:\n line = f\"- `{action.dest}`\"\n else:\n line = f\"- {', '.join(opts)}\"\n if action.metavar:\n line += f\" `{action.metavar}`\"\n line += f\": {clean_help(action.help)}\"\n if action.default and action.default != argparse.SUPPRESS:\n line += f\" (default: `{action.default}`)\"\n result.append(line)\n result.append(\"\")\n\nreturn \"\\n\".join(result)\n</code></pre> <p>print(render_parser(parser, \"HydroRollCore\")) ```</p>"},{"location":"Core/","title":"\u6838\u5fc3\u6982\u89c8","text":"HydroRollCore'\u6c34\u7cfb\u6838\u5fc3"},{"location":"Core/#getting","title":"\ud83c\udf81 Getting","text":"<ol> <li>\u5b89\u88c5\u5e93</li> </ol> <p>\u5728\u547d\u4ee4\u884c\u8f93\u5165\u3002</p> <pre><code>git clone https://github.com/HydroRoll-Team/HydroRollCore.git\ncd HydroRollCore\npdm install\n# \u6216\u8005\u4f7f\u7528pip\n# pip install HydroRollCore\n</code></pre> <ol> <li>\u521b\u5efa\u89c4\u5219\u5305\u5b9e\u4f8b</li> </ol> <pre><code>mkdir myrules &amp;&amp; cd myrules &amp;&amp; mkdir rule1\necho.&gt; config.toml\necho.&gt; __init__.py\n</code></pre> <p>\u5728 <code>__init__.py</code> \u521b\u5efa\u4e00\u4e2a <code>rule</code> \u5b9e\u4f8b\u5e76\u7ee7\u627f <code>Rule</code> \u57fa\u7c7b, \u901a\u8fc7\u7f16\u5199\u5408\u9002\u7684\u76f8\u5173\u65b9\u6cd5\u4e0e\u7c7b\u6ce8\u518c\u89c4\u5219\u5305\u5b9e\u73b0\u89c4\u5219\u7684\u81ea\u5b9a\u4e49\u3002</p> <pre><code>from HydroRollCore import Rule\n\nclass Myrule(Rule):\n \"\"\"\u81ea\u8bbe\u89c4\u5219\u5305\uff0c\u7ee7\u627f Rule \u57fa\u7c7b\"\"\"\n</code></pre> <ol> <li>\u5408\u7406\u4fee\u6539\u4f60\u7684 <code>config.toml</code> \u914d\u7f6e\u6587\u4ef6\uff0c\u5b8c\u6210\u6ce8\u518c!</li> </ol>"},{"location":"Core/#license","title":"\ud83d\udcc4 License","text":"<p>MIT \u00a9 2023-PRESENT \u7b80\u5f8b\u7eaf</p>"},{"location":"Help/TermList/","title":"\u672f\u8bed\u8868\u4e00\u89c8","text":""},{"location":"Help/TermList/#_1","title":"<code>\u79fb\u6b65\u6b63\u5f0f\u672f\u8bed</code>","text":""},{"location":"Help/emoji/","title":"\u56fe\u6807\u3001\u6ce8\u91ca\u8bf4\u660e","text":""},{"location":"Help/emoji/#_1","title":"\u76ee\u5f55\u6811\u3001\u4fa7\u8fb9\u680f\u56fe\u6807","text":"<p>\u8fd9\u4e9b\u56fe\u6807\u5c06\u4f1a\u51fa\u73b0\u5728\u9875\u9762\u5de6\u4fa7\u7684 <code>navigation</code> \u4e0e\u6587\u7ae0\u53f3\u4fa7\u7684 <code>toc</code> \u5f53\u4e2d\u3002</p> <code>\u5df2\u88ab\u5e9f\u5f03</code><code>\u6700\u8fd1\u6dfb\u52a0</code><code>\u5b9e\u9a8c\u529f\u80fd</code><code>\u6269\u5c55\u7279\u6027</code> <p>\u5728 <code>release</code> \u7248\u672c\u4e2d \u4e0d\u63a8\u8350\u4f7f\u7528 \u4f46\u662f \u4ecd\u7136\u6709\u6548 \u7684\u529f\u80fd\u3001\u7279\u6027\u3002\u5e76\u4e14\u5728 <code>latest</code> \u7248\u672c\u4e2d\u5df2\u7ecf\u5b8c\u5168\u5e9f\u5f03<sup>1</sup>\u3002</p> <p>\u5728\u4e0a\u4e00\u4e2a <code>release</code> \u7248\u672c\u4f5c\u4e3a<code>\u5b9e\u9a8c\u529f\u80fd</code>\u6216\u4f5c\u4e3a<code>\u6269\u5c55\u7279\u6027</code>\u4f46\u662f\u6838\u5fc3\u672c\u4f53\u5e76\u672a\u652f\u6301\u7684\u529f\u80fd\u3001\u7279\u6027\uff0c\u4e8e <code>latest</code> \u7248\u672c\u88ab\u5f15\u5165\u3002</p> <p>\u5b58\u5728\u4e8e\u5f53\u524d <code>dev</code> \u7248\u672c\u4e2d\u4f46\u662f\u672a\u5728 <code>latest</code> \u7248\u672c\u4e2d\u52a0\u5165\u7684\u529f\u80fd\u3001\u7279\u6027\u3002</p> <p>\u5728\u652f\u6301 <code>latest</code> \u6216 <code>dev</code> \u6216 \u7279\u5b9a <code>release</code> \u7248\u672c\u7684\u63d2\u4ef6\u6269\u5c55\u4e2d\u5b58\u5728\u6b64\u7279\u6027\u7684\u53ef\u884c\u6027\u65b9\u6848\u3002</p>"},{"location":"Help/emoji/#_2","title":"\u62bd\u8c61\u6982\u5ff5","text":"<p>\u8fd9\u4e9b\u56fe\u6807\u4f1a\u51fa\u73b0\u5728\u6587\u7ae0\u5185\u5bb9\u4e2d\u4f5c\u4e3a\u62bd\u8c61\u6982\u5ff5\u7684\u5177\u4f53\u8868\u8fbe\uff0c\u7528\u4e8e\u8fc1\u79fb\u8bb0\u5fc6\u3002 </p> <p>\u4ee5\u4e0b\u662f\u56fe\u6807\u5e94\u7528\u4e3e\u4f8b:</p> <ul> <li>[<code>\u65f6\u4ee3</code>]: <code>1899</code> <code>2100</code> <code>\u7f8e\u597d\u5e74\u4ee3</code> <code>WW II</code> <code>2011-2021</code></li> <li>[<code>\u98ce\u683c</code>]: <code>\u4e2d\u4e16\u7eaa</code> <code>\u79d1\u5e7b</code> <code>\u60ac\u7591</code> <code>\u5fc3\u7406\u6050\u6016</code> <code>\u79d8\u5bc6\u5267\u60c5</code></li> <li>[<code>\u5730\u70b9</code>]: <code>\u5362\u6d6e\u5bab</code> <code>\u51e1\u5c14\u8d5b</code> <code>\u541b\u4e34\u57ce</code> <code>\u706b\u661f</code> <code>\u51ac\u6728</code></li> </ul> <ul> <li>[<code>\u4eba\u7269\u80cc\u666f</code>]: <code>\u751f\u4e8e\u94f6\u6cb3\u7eaa\u514311988\u5e74\uff0c\u5352\u4e8e\u94f6\u6cb3\u7eaa\u514312069\u5e74\u3002\u4ed6\u7684\u5352\u5e74\u540e\u6765\u88ab\u786e\u5b9a\u4e3a\u57fa\u5730\u7eaa\u5143\u5143\u5e74\u3002\u4ed6\u662f\u4e00\u4f4d\u5e74\u8f7b\u6709\u4e3a\u7684\u6570\u5b66\u5bb6\uff0c\u4e2d\u7b49\u4e2a\u5b50\uff0c\u957f\u76f8\u4fca\u6717\u3002\u4ed6\u66fe\u7ecf\u62c5\u4efb\u5ddd\u9640\u5927\u5b66\u6570\u5b66\u7cfb\u4e3b\u4efb\uff0c\u662f\u7b2c\u4e00\u5e1d\u56fd\u514b\u91cc\u6602\u4e00\u4e16\u7687\u5e1d\u7684\u5fa1\u524d\u9996\u76f8\uff0c\u5ddd\u9640\u5927\u5b66\u5fc3\u7406\u53f2\u5b66\u7cfb\u8363\u8a89\u6559\u6388\uff0c\u5fc3\u7406\u53f2\u5b66\u7814\u7a76\u8ba1\u5212\u4e3b\u6301\u4eba\u3001\u94f6\u6cb3\u767e\u79d1\u5168\u4e66\u6267\u884c\u7f16\u8f91\u3002\u4ed6\u662f\u5fc3\u7406\u53f2\u5b66\u521b\u59cb\u4eba\u4e4b\u4e00\uff08\u53e6\u4e00\u4f4d\u662f\u96e8\u679c\u00b7\u963f\u739b\u745e\u5c14\uff09\uff0c\u540c\u65f6\u4e5f\u662f\u57fa\u5730\u521b\u59cb\u4eba\u3002\u4ed6\u8fd8\u88ab\u8ba4\u4e3a\u662f\u7b2c\u4e8c\u57fa\u5730\u7b2c\u4e00\u4efb\u9996\u5e2d\u53d1\u8a00\u8005\uff0c\u540e\u6765\u4e5f\u6210\u4e86\u57fa\u5730\u7684\u4f20\u5947\u82f1\u96c4\u3002</code></li> </ul>"},{"location":"Help/emoji/#_3","title":"\u6ce8\u91ca\u8bf4\u660e","text":"<ul> <li><code>\u91cd\u5b9a\u5411\u81f3\u6b63\u5f0f\u672f\u8bed</code>: \u5e38\u4e0e\u4e00\u8d77\u4e3a \u8fc7\u671f\u9875\u9762 \u91cd\u5b9a\u5411\u5185\u5bb9\u7d22\u5f15\u3002</li> </ul> <ol> <li> <p>\u5177\u4f53\u8fd8\u8981\u770b\u4e0b\u4e00\u4e2a\u5927\u7248\u672c\u7684\u6587\u6863\u5982\u4f55\u7f16\u5199\u3002\u00a0\u21a9</p> </li> </ol>"},{"location":"RulePackage/intro/","title":"\u6982\u8ff0","text":"<p>Abstract</p> <p>\u6b64\u7ae0\u8282\u6d89\u53ca\u5230\u771f\u6b63\u7684 Python \u89c4\u8303\u95ee\u9898\uff0c\u56e0\u6b64\u8bf7\u8ba4\u771f\u9605\u8bfb\u5e76\u591a\u52a0\u7ec3\u4e60\uff0c\u65b9\u80fd\u5199\u51fa\u6f02\u4eae\u7684\u4ee3\u7801\u3002</p> <p>\u6c34\u7cfb\u89c4\u5219\u5305\u53ef\u4ee5\u901a\u8fc7 <code>pip</code> Pyhton \u5305\u7ba1\u7406\u5de5\u5177\u76f4\u63a5\u4e0b\u8f7d\uff0c\u4f46\u662f\u4e3a\u4e86\u65b9\u4fbf\uff0c\u6211\u4eec\u63a8\u8350\u4ee5\u4e0b\u4e24\u4e2a\u5b89\u88c5\u65b9\u6848\u3002</p> \u4f7f\u7528<code>pdm</code>\u7ba1\u7406\u5668\u4f7f\u7528<code>hrc</code>\u7ba1\u7406\u5668 <pre><code>pdm install MyRule\n</code></pre> <p>\u5982\u679c\u4f60\u4f7f\u7528<code>pdm</code>\u7ba1\u7406\u81ea\u5df1\u7684\u89c4\u5219\u5305\u6216\u5f00\u542f\u81ea\u5df1\u7684\u6c34\u7cfb\u9ab0\u5b50\uff0c\u90a3\u4e48\u975e\u5e38\u63a8\u8350\u4f7f\u7528\u8fd9\u79cd\u65b9\u6848\u6765\u96c6\u6210\u5f62\u5982 <code>HydroRollCore-Rule-The_Pool</code>\u8fd9\u822c\u5305\u540d\u7684\u89c4\u5219\u3002</p> <pre><code>hrc install MyRule\n</code></pre> <p>\u4e00\u822c\u6765\u8bf4\u63a8\u8350\u4f7f\u7528<code>hrc</code>\u7ba1\u7406\u5668\u6765\u5b89\u88c5\u548c\u8c03\u8bd5\u89c4\u5219\u5305\u3002 (1)</p> <ol> <li>\u8fd9\u6837\u4f1a\u65e0\u89c6\u865a\u62df\u73af\u5883\u89c4\u5219\u800c\u76f4\u63a5\u627e\u5230\u5f53\u524d\u4f7f\u7528\u7684\u6587\u4ef6\u8def\u5f84\uff0c\u800c\u4e0d\u9700\u8981\u50cf<code>pdm</code>\u90a3\u6837\u53ea\u80fd\u7528\u5728<code>pdm</code>\u672c\u8eab\u521b\u5efa\u7684\u865a\u62df\u73af\u5883\u5185\u4e86\u3002</li> </ol>"},{"location":"RulePackage/getStart/attribute/","title":"attribute \u5c5e\u6027","text":"<p>Info</p> <p>\u5173\u8054\u5230\u4e00\u4e2a\u5bf9\u8c61\u7684\u503c\uff0c\u901a\u5e38\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6309\u540d\u79f0\u6765\u5f15\u7528\u3002 \u4e3e\u4f8b\u6765\u8bf4\uff0c\u5982\u679c\u5bf9\u8c61 o \u5177\u6709\u5c5e\u6027 a \u5219\u53ef\u4ee5\u7528 o.a \u6765\u5f15\u7528\u5b83\u3002</p> <p>\u5982\u679c\u5bf9\u8c61\u5141\u8bb8\uff0c\u5c06\u672a\u88ab\u5b9a\u4e49\u4e3a \u6807\u8bc6\u7b26\u548c\u5173\u952e\u5b57 \u7684\u975e\u6807\u8bc6\u540d\u79f0\u7528\u4f5c\u4e00\u4e2a\u5bf9\u8c61\u7684\u5c5e\u6027\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4f8b\u5982\u4f7f\u7528 setattr()\u3002 \u8fd9\u6837\u7684\u5c5e\u6027\u5c06\u65e0\u6cd5\u4f7f\u7528\u70b9\u53f7\u8868\u8fbe\u5f0f\u6765\u8bbf\u95ee\uff0c\u800c\u662f\u5fc5\u987b\u901a\u8fc7 getattr() \u6765\u83b7\u53d6\u3002</p>"},{"location":"RulePackage/getStart/class/","title":"class \u7c7b","text":"<p>Info</p> <p>\u7528\u6765\u521b\u5efa\u7528\u6237\u5b9a\u4e49\u5bf9\u8c61\u7684\u6a21\u677f\u3002\u7c7b\u5b9a\u4e49\u901a\u5e38\u5305\u542b\u5bf9\u8be5\u7c7b\u7684\u5b9e\u4f8b\u8fdb\u884c\u64cd\u4f5c\u7684\u65b9\u6cd5\u5b9a\u4e49\u3002</p>"},{"location":"RulePackage/getStart/method/","title":"method \u65b9\u6cd5","text":"<p>Info</p> <p>\u5728\u7c7b\u5185\u90e8\u5b9a\u4e49\u7684\u51fd\u6570\u3002\u5982\u679c\u4f5c\u4e3a\u8be5\u7c7b\u7684\u5b9e\u4f8b\u7684\u4e00\u4e2a\u5c5e\u6027\u6765\u8c03\u7528\uff0c\u65b9\u6cd5\u5c06\u4f1a\u83b7\u53d6\u5b9e\u4f8b\u5bf9\u8c61\u4f5c\u4e3a\u5176\u7b2c\u4e00\u4e2a argument (\u901a\u5e38\u547d\u540d\u4e3a self)\u3002\u53c2\u89c1 function \u548c nested scope\u3002</p>"},{"location":"RulePackage/getStart/getDeeper/Module/","title":"Module \u6a21\u5757","text":"<p>Info</p> <p>\u6b64\u5bf9\u8c61\u662f Python \u4ee3\u7801\u7684\u4e00\u79cd\u7ec4\u7ec7\u5355\u4f4d\u3002\u5404\u6a21\u5757\u5177\u6709\u72ec\u7acb\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u53ef\u5305\u542b\u4efb\u610f Python \u5bf9\u8c61\u3002\u6a21\u5757\u53ef\u901a\u8fc7 importing \u64cd\u4f5c\u88ab\u52a0\u8f7d\u5230 Python \u4e2d\u3002</p> <p>\u53e6\u89c1 package\u3002</p> <p></p>"},{"location":"RulePackage/getStart/getDeeper/Package/","title":"Package \u5305","text":"<p>Info</p> <p>\u4e00\u79cd\u53ef\u5305\u542b\u5b50\u6a21\u5757\u6216\u9012\u5f52\u5730\u5305\u542b\u5b50\u5305\u7684 Python module\u3002 \u4ece\u6280\u672f\u4e0a\u8bf4\uff0c\u5305\u662f\u5177\u6709 path \u5c5e\u6027\u7684 Python \u6a21\u5757\u3002</p> <p>\u53e6\u53c2\u89c1 regular package \u548c namespace package\u3002</p>"},{"location":"RulePackage/getStart/getDeeper/object/","title":"object \u5bf9\u8c61","text":"<p>Info</p> <p>\u4efb\u4f55\u5177\u6709\u72b6\u6001\uff08\u5c5e\u6027\u6216\u503c\uff09\u4ee5\u53ca\u9884\u5b9a\u4e49\u884c\u4e3a\uff08\u65b9\u6cd5\uff09\u7684\u6570\u636e\u3002object \u4e5f\u662f\u4efb\u4f55 new-style class \u7684\u6700\u9876\u5c42\u57fa\u7c7b\u540d\u3002</p>"},{"location":"Standard/what-is-rule-package/","title":"\u4ec0\u4e48\u662f\u89c4\u5219\u5305\uff1f","text":"<p>\u89c4\u5219\u5305\u662f\u6c34\u7cfb\u6838\u5fc3\u7528\u6765\u52a0\u8f7d\u7684\u5bf9\u8c61\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u6c34\u7cfb\u6838\u5fc3\u52a0\u8f7d\u7684\u4e00\u4e2a\u4e00\u4e2a\u89c4\u5219\u5b9e\u4f8b\u3002</p> <p>\u89c4\u5219\u5305\u66f4\u7c7b\u4f3c\u4e8e\u63d2\u4ef6\u7684\u8bbe\u8ba1\uff0c\u6240\u4ee5\u89c4\u5219\u5305\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2aPython\u6587\u4ef6\u6216\u8005\u4e00\u4e2aPython\u5305\uff0c\u4f46\u5b83\u5fc5\u987b\u50cf\u63d2\u4ef6\u90a3\u6837\u7ee7\u627f\u4e00\u4e2a\u50cfPlugin\u8fd9\u6837\u7684\u7c7b\uff08\u4e0d\u7136\u65e0\u6cd5\u8bfb\u53d6\uff0c\u6211\u4eec\u59d1\u4e14\u53eb\u8fd9\u4e2a\u7c7b\u4e3aRule\uff09\uff0c\u4ee5\u53ca\u5728Rule\u7684\u5b50\u7c7b\u91cc\u5b9e\u73b0\u4e00\u4e9b\u50cfhandle()\u6216\u8005rule()\u8fd9\u6837\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff08\u4e5f\u53eb\u51fd\u6570\uff09\uff0c\u800c\u8fd9\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\uff0c\u5c31\u662f\u6211\u4eec\u8981\u8ba8\u8bba\u7684\uff0c\u4e00\u4e2a\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u660e\u786e\u4e86\u4e00\u4e2a\u7ee7\u627f\u81eaRule\u7c7b\u7684\u5b50\u7c7b\u5b83\u672c\u8eab\u5e94\u8be5\u5b9e\u73b0\u4ec0\u4e48\u65b9\u6cd5\u3002</p> <p>\u4e3e\u4e2a\u4f8b\u5b50\uff08\u968f\u4fbf\u5199\u7684\uff0c\u5176\u4e2d\u4e00\u4e9b\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u6216\u8005\u7c7b\u540d\u90fd\u662f\u4e0d\u786e\u5b9a\u7684\uff0c\u4ee5\u540e\u6216\u8bb8\u4f1a\u6539\uff09\uff1a</p> <pre><code>from HydroRolicore import RuLe\n\nclass MyRule(Rule):\n \"\"\"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\n\n check \u51fd\u6570\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u65b9\u6cd5\u4e4b\u4e00\n name\u5c5e\u6027\u662f\u5fc5\u987b\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u7528\u6765\u5b9a\u4e49\u8fd9\u4e2a\u89c4\u5219\u5305\u7684\u540d\u5b57\n priority\u662f\u53ef\u9009\u5b9e\u73b0\u7684\u5c5e\u6027\u4e4b\u4e00\uff0c\u9ed8\u8ba40\n \"\"\"\n\n name = \"\u6211\u7684\u81ea\u5b9a\u4e49\u89c4\u5219\u5305\"\n priority = 0 # \u4f18\u5148\u7ea7\n\n def check(self):\n \"\"\"\u68c0\u5b9a\u65b9\u6cd5\n\n self.result \u662f\u9700\u8981\u68c0\u5b9a\u65f6\u8ba1\u7b97\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\n self.rule.ability \u662fRule\u7c7b\u91cc\u63d0\u4f9b\u7684\u7528\u4e8e\u5224\u65ad\u68c0\u5b9a\u60c5\u51b5\u7684\u5c5e\u6027\n \"\"\"\n\n if self.result &lt; 5 and self.result &gt; 0:\n return self.rule.ability.success # \u8fd4\u56de\u5927\u6210\u529f\u65f6\u9ab0\u4e3b\u81ea\u5b9a\u4e49\u7684\u5927\u6210\u529f\u6587\u672c\n else:\n ... # \u5176\u4ed6\u7684\u68c0\u5b9a\u60c5\u51b5\n</code></pre> <p>\u8fd9\u6837\u5c31\u5b9e\u73b0\u4e86\u4e00\u4e2a\u6c34\u7cfb\u89c4\u5219\u5305\uff0c\u5f53pl\u4f7f\u7528\u68c0\u5b9a\u63b7\u9ab0\u6307\u4ee4\u65f6\u5c31\u4f1a\u8c03\u7528check()\u65b9\u6cd5\uff0c\u5982\u679c\u68c0\u5b9a\u7ed3\u679c\u6570\u503c\u5c0f\u4e8e5\u4e14\u5927\u4e8e0\u90a3\u4e48\u8fd4\u56de\u5927\u6210\u529f\u3002</p> <p>\u6211\u4eec\u8981\u505a\u7684\u901a\u7528\u89c4\u5219\u5305\u6807\u51c6\u5c31\u662f\u8fd9\u6837\u4e00\u4e2a\u201c\u5230\u5e95\u9700\u8981\u5728Rule\u7684\u5b50\u7c7bMyRule\u91cc\u5fc5\u987b\u5b9e\u73b0\u54ea\u4e9b\u65b9\u6cd5\uff1f\u201d\u7684\u95ee\u9898\u3002</p>"},{"location":"Standard/Term/DefaultDice/","title":"DefaultDice \u9ed8\u8ba4\u9ab0\u5b50","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u7c7b\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c</p>"},{"location":"Standard/Term/DefaultDice/#_1","title":"\u7c7b\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u5404\u79cd\u5c5e\u6027\uff0c\u4f8b\u5982\u9ed8\u8ba4\u9ab0\u5b50\u6570\u91cf\uff0c\u9762\u6570</p>"},{"location":"Standard/Term/DefaultDice/_counts/","title":"_counts \u9ab0\u5b50\u4e2a\u6570","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u5fc5\u987b\u7684\u503c\uff0c\u6839\u636e\u4e0d\u540c\u89c4\u5219\u4e66\u7684\u8981\u6c42\u8bbe\u7f6e\u76f8\u5bf9\u5e94\u7684\u503c</p>"},{"location":"Standard/Term/DefaultDice/_counts/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u4e2a\u6570</p>"},{"location":"Standard/Term/DefaultDice/_sides/","title":"_sides \u9ab0\u5b50\u9762\u6570","text":""},{"location":"Standard/Term/DefaultDice/_sides/#_1","title":"\u5c5e\u6027\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u9ed8\u8ba4\u6295\u63b7\u65f6\u9ab0\u5b50\u7684\u9762\u6570</p>"},{"location":"Standard/Term/PlayerCard/","title":"PlayerCard \u4eba\u7269\u5361","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002</p>"},{"location":"Standard/Term/PlayerCard/#_1","title":"\u7c7b\u8bf4\u660e","text":"<p>\u7528\u4e8e\u89c4\u5b9a\u4eba\u7269\u5361\u7684\u683c\u5f0f\uff0c\u5305\u62ec\u4eba\u7269\u5c5e\u6027\uff0c\u5c5e\u6027\u4e4b\u95f4\u7684\u8ba1\u7b97\u5173\u7cfb\u7b49</p>"},{"location":"Standard/Term/check/","title":"check \u68c0\u5b9a","text":"<p>Tip</p> <p>\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u5b9e\u73b0\u4f46\u662f{\u5efa\u8bae\u5c3d\u91cf\u5fc5\u987b\u5b9e\u73b0}\u7684\u65b9\u6cd5\uff0c\u4e3b\u8981\u8868\u73b0\u5728\u89c4\u5219\u4e66\u6b63\u662f\u68c0\u5b9a\u65b9\u6cd5\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u4e0a\u3002</p>"},{"location":"Standard/Term/check/#_1","title":"\u65b9\u6cd5\u8bf4\u660e","text":"<p>\u4f7f\u7528<code>check</code>\u6216\u8005<code>ability</code>\u65b9\u6cd5, \u5fc5\u987b\u5bf9\u68c0\u5b9a\u7ed3\u679c\u8bbe\u5b9a\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\u3002</p>"},{"location":"Standard/Term/check/#_2","title":"\u68c0\u5b9a\u7ed3\u679c\u8868","text":"<p>\u5982<code>\u65b9\u6cd5</code>\u6240\u8a00\uff0c\u4f60\u5fc5\u987b\u4e3a\u68c0\u5b9a\u7684\u7ed3\u679c\u8bbe\u8ba1\u4e00\u4e2a\u5b8c\u6574\u7684\u8f93\u51fa\u5224\u5b9a\u8303\u56f4\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u4e25\u683c\u5e76\u4e14\u5408\u7406\u7684\u5206\u914d\u5212\u5206\u754c\u9650\uff0c\u4fdd\u8bc1\u6240\u6709\u60c5\u51b5\u90fd\u5728\u5141\u8bb8\u8303\u56f4\u5185\u6709\u4e00\u4e2a\u7c7b\u4f3c\u201d\u6210\u529f\u201d\u201d\u5931\u8d25\u201d\u7684\u8f93\u51fa\u3002</p>"},{"location":"Standard/Term/check/ability/","title":"ability \u68c0\u5b9a","text":"<p>Info</p> <p>\u5173\u4e8e\u8fd9\u90e8\u5206\u5185\u5bb9\u8bf7\u79fb\u6b65\u6b63\u5f0f\u672f\u8bed: <code>check \u68c0\u5b9a</code></p> <p>\u8fd9\u90e8\u5206\u5176\u5b9e\u5df2\u7ecf\u79fb\u9664\u3002</p>"},{"location":"Standard/Term/duration/","title":"duration (\u65f6\u957f)","text":""},{"location":"blog/","title":"Blog","text":""},{"location":"blog/2023/10/07/rule/","title":"Rule \u57fa\u7c7b\u5df2\u7ecf\u652f\u6301\u6cdb\u578b\u4e86","text":"<p>Hey there! You're looking at our new blog, built with the brand new built-in blog plugin. With this plugin, you can easily build a blog alongside your documentation or standalone.</p> <p>Proper support for blogging, as requested by many users over the past few years, was something that was desperately missing from Material for MkDocs' feature set. While everybody agreed that blogging support was a blind spot, it was not obvious whether MkDocs could be extended in a way to allow for blogging as we know it from Jekyll and friends. The built-in blog plugin proves that it is, after all, possible to build a blogging engine on top of MkDocs, in order to create a technical blog alongside your documentation, or as the main thing.</p> <p>This article explains how to build a standalone blog with Material for MkDocs. If you want to build a blog alongside your documentation, please refer to the plugin's documentation.</p>"},{"location":"blog/2023/10/07/rule/#quick-start","title":"Quick start","text":""},{"location":"blog/2023/10/07/rule/#creating-a-standalone-blog","title":"Creating a standalone blog","text":"<p>You can bootstrap a new project using the <code>mkdocs</code> executable:</p> <pre><code>mkdocs new .\n</code></pre> <p>This will create the following structure:</p> <pre><code>.\n\u251c\u2500 docs/\n\u2502 \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n</code></pre>"},{"location":"blog/2023/10/07/rule/#configuration","title":"Configuration","text":"<p>In this article, we're going to build a standalone blog, which means that the blog lives at the root of your project. For this reason, open <code>mkdocs.yml</code>, and replace its contents with:</p> <pre><code>site_name: My Blog\ntheme:\n name: material\n features:\n - navigation.sections\nplugins:\n - blog:\n blog_dir: . # (1)!\n - search\n - tags\nnav:\n - index.md\n</code></pre> <ol> <li>This is the important part \u2013 we're hosting the blog at the root of the project, and not in a subdirectory. For more information, see the <code>blog_dir</code> configuration option.</li> </ol>"},{"location":"blog/2023/10/07/rule/#blog-setup","title":"Blog setup","text":"<p>The blog index page lives in <code>docs/index.md</code>. This page was pre-filled by MkDocs with some content, so we're going to replace it with what we need to bootstrap the blog:</p> <pre><code># Blog\n</code></pre> <p>That's it.</p>"},{"location":"blog/2023/10/07/rule/#writing-your-first-post","title":"Writing your first post","text":"<p>Now that we have set up the built-in blog plugin, we can start writing our first post. All blog posts are written with the exact same Markdown flavor as already included with Material for MkDocs. First, create a folder called <code>posts</code> with a file called <code>hello-world.md</code>:</p> <pre><code>.\n\u251c\u2500 docs/\n\u2502 \u251c\u2500 posts/\n\u2502 \u2502 \u2514\u2500 hello-world.md # (1)!\n\u2502 \u2514\u2500 index.md\n\u2514\u2500 mkdocs.yml\n</code></pre> <ol> <li>If you'd like to arrange posts differently, you're free to do so. The URLs are built from the format specified in <code>post_url_format</code> and the titles and dates of posts, no matter how they are organized inside the <code>posts</code> directory.</li> </ol> <p>Then, open up <code>hello-world.md</code>, and add the following lines:</p> <pre><code>---\ndraft: true # (1)!\ndate: 2022-01-31\ncategories:\n - Hello\n - World\n---\n\n# Hello world!\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque nec\nmaximus ex. Sed consequat, nulla quis malesuada dapibus, elit metus vehicula\nerat, ut egestas tellus eros at risus. In hac habitasse platea dictumst.\nPhasellus id lacus pulvinar erat consequat pretium. Morbi malesuada arcu mauris\nNam vel justo sem. Nam placerat purus non varius luctus. Integer pretium leo in\nsem rhoncus, quis gravida orci mollis. Proin id aliquam est. Vivamus in nunc ac\nmetus tristique pellentesque. Suspendisse viverra urna in accumsan aliquet.\n\n&lt;!-- more --&gt;\n\nDonec volutpat, elit ac volutpat laoreet, turpis dolor semper nibh, et dictum\nmassa ex pulvinar elit. Curabitur commodo sit amet dolor sed mattis. Etiam\ntempor odio eu nisi gravida cursus. Maecenas ante enim, fermentum sit amet\nmolestie nec, mollis ac libero. Vivamus sagittis suscipit eros ut luctus.\n\nNunc vehicula sagittis condimentum. Cras facilisis bibendum lorem et feugiat.\nIn auctor accumsan ligula, at consectetur erat commodo quis. Morbi ac nunc\npharetra, pellentesque risus in, consectetur urna. Nulla id enim facilisis\narcu tincidunt pulvinar. Vestibulum laoreet risus scelerisque porta congue.\nIn velit purus, dictum quis neque nec, molestie viverra risus. Nam pellentesque\ntellus id elit ultricies, vel finibus erat cursus.\n</code></pre> <ol> <li>If you mark a post as a draft, a red marker appears next to the post date on index pages. When the site is built, drafts are not included in the output. This behavior can be changed, e.g. for rendering drafts when building deploy previews.</li> </ol> <p>When you spin up the live preview server, you should be greeted by your first post! You'll also realize, that archive and category indexes have been automatically generated for you:</p> <p></p> <p>However, this is just the start. The built-in blog plugin packs a lot of functionality needed in day-to-day blogging. Visit the documentation of the plugin to learn about the following topics:</p> <ul> <li>Adding an excerpt</li> <li>Adding authors</li> <li>Adding categories</li> <li>Adding tags</li> <li>Adding related links</li> <li>Linking from and to posts</li> <li>Setting the reading time</li> <li>Setting defaults</li> </ul> <p>Additionally, the built-in blog plugin has dozens of configuration options which allow for fine-tuning the output. You can configure post slugs, general behavior and much more.</p>"},{"location":"blog/2023/10/07/rule/#whats-next","title":"What's next?","text":"<p>Getting basic blogging support out the door was quite a challenge \u2013 the built-in blog plugin is probably the biggest release this year and already packs a lot of functionality. However, Material for MkDocs is used in many different contexts, which is why we'd expect to iterate, as always.</p> <p>Some ideas already proposed by users:</p> <ul> <li> <p>Blog series: Authors should be able to create so called blog series and assign posts to a blog series using simple identifiers. For each post that is part of a series, a list with links to all other posts should be included in the post's content.</p> </li> <li> <p>Author indexes: Besides archive and category indexes, authors should be able to create per-author indexes, which list all posts linked to an author. Additionally, a profile should be created for each author and linked from posts.</p> </li> <li> <p>Social share buttons: It should be easy to share blog posts via social media or other ways. For this reason, it should be possible to automatically include social sharing buttons with each post.</p> </li> </ul> <p>What's still missing from the brand new built-in blog plugin? Feel free to share your ideas in the comments. Together, we can build one of the best modern engines for technical blogging!</p>"},{"location":"blog/archive/2023/","title":"2023","text":""},{"location":"blog/category/rules/","title":"Rules","text":""}]} \ No newline at end of file