repo for my hex addons :3
1from hexdoc.plugin import (
2 HookReturn,
3 ModPlugin,
4 ModPluginImpl,
5 ModPluginWithBook,
6 hookimpl,
7)
8import hexdoc_hexic
9from importlib.resources import Package
10from typing_extensions import override
11from hexdoc_hexcasting.book.page.pages import LookupPatternPage
12from .__gradle_version__ import *
13from .__version__ import *
14
15LookupPatternPage._check_anchor.__code__ = (lambda self: self).__code__
16
17class HexicModPlugin(ModPluginWithBook):
18 modid = "hexic"
19 full_version = FULL_VERSION
20 mod_version = MOD_VERSION
21 plugin_version = PY_VERSION
22 def resource_dirs(self):
23 from ._export import generated
24 return generated
25 def jinja_template_root(self):
26 return hexdoc_hexic, "_templates"
27
28class HexicPlugin(ModPluginImpl):
29 @staticmethod
30 @hookimpl
31 def hexdoc_mod_plugin(branch: str) -> ModPlugin:
32 return HexicModPlugin(branch=branch)