app/assets/load.html-CfEw0Ioo.js

12 lines
4.1 KiB
JavaScript
Raw Normal View History

import{_ as e,o as t,c as p,e as a}from"./app-0e_4pVFu.js";const l={},n=a(`<h3 id="def-load-plugin-module-path-str-path-optional-plugin" tabindex="-1"><a class="header-anchor" href="#def-load-plugin-module-path-str-path-optional-plugin"><span><em><strong>def</strong></em> <code>load_plugin(module_path: str | Path) -&gt; Optional[Plugin]</code></span></a></h3><p>加载单个插件,可以是本地插件或是通过 <code>pip</code> 安装的插件。</p><p>参数:</p><pre><code>module_path: 插件名称 \`path.to.your.plugin\`
或插件路径 \`pathlib.Path(path/to/your/plugin)\`
</code></pre><h3 id="def-load-plugins-set-plugin" tabindex="-1"><a class="header-anchor" href="#def-load-plugins-set-plugin"><span><em><strong>def</strong></em> <code>load_plugins() -&gt; set[Plugin]</code></span></a></h3><p></p><p>:</p><pre><code>plugin_dir:
ignore_warning: 是否忽略警告通常是目录不存在或目录为空
</code></pre><h3 id="def-format-display-name-display-name-str-plugin-type-plugintype-str" tabindex="-1"><a class="header-anchor" href="#def-format-display-name-display-name-str-plugin-type-plugintype-str"><span><em><strong>def</strong></em> <code>format_display_name(display_name: str, plugin_type: PluginType) -&gt; str</code></span></a></h3><p></p><p>Args:</p><pre><code>display_name:
plugin_type: 插件类型
</code></pre><p>Returns:</p><pre><code>str: &lt;y&gt;name&lt;/y&gt;
</code></pre>`,14),i=[n];function o(d,r){return t(),p("div",null,i)}const u=e(l,[["render",o],["__file","load.html.vue"]]),g=JSON.parse('{"path":"/dev/api/plugin/load.html","title":"liteyuki.plugin.load","lang":"zh-CN","frontmatter":{"title":"liteyuki.plugin.load","order":1,"icon":"laptop-code","category":"API","description":"def load_plugin(module_path: str | Path) -> Optional[Plugin] pip : def load_plugins() -> set[Plugin] : def format_display_name(display_n...","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/plugin/load.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot "}],["meta",{"property":"og:title","content":"liteyuki.plugin.load"}],["meta",{"property":"og:description","content":"def load_plugin(module_path: str | Path) -> Optional[Plugin] pip : def load_plugins() -> set[Plugin] : def format_display_name(display_n..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-19T01:55:47.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T01:55:47.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.plugin.load\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:55:47.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"def load_plugin(module_path: str | Path) -> Optional[Plugin]","slug":"def-load-plugin-module-path-str-path-optional-plugin","link":"#def-load-plugin-module-path-str-path-optional-plugin","children":[]},{"level":3,"title":"def load_plugins() -> set[Plugin]","slug":"def-load-plugins-set-plugin","link":"#def-load-plugins-set-plugin","children":[]},{"level":3,"title":"def format_display_name(display_name: str, plugin_type: PluginType) -> str","slug":"def-format-display-name-display-name-str-plugin-type-plugintype-str","link":"#def-format-display-name-display-name-str-plugin-type-plugintype-str","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724032547000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.49,"words":147},"filePathRelative":"dev/api/plugin/load.md","localizedDate":"2024819","autoDesc":true}');export{u as comp,g as data};