diff --git a/doc/src/hexdoc/scripts/__init__.py b/doc/src/hexdoc/scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/doc/src/hexdoc/hexdoc.py b/doc/src/hexdoc/scripts/hexdoc.py similarity index 98% rename from doc/src/hexdoc/hexdoc.py rename to doc/src/hexdoc/scripts/hexdoc.py index 54660b45..953f1279 100644 --- a/doc/src/hexdoc/hexdoc.py +++ b/doc/src/hexdoc/scripts/hexdoc.py @@ -12,15 +12,14 @@ from jinja2 import ChoiceLoader, FileSystemLoader, PackageLoader, StrictUndefine from jinja2.sandbox import SandboxedEnvironment from pydantic import model_validator +from hexdoc.__gradle_version__ import GRADLE_VERSION from hexdoc.hexcasting.hex_book import load_hex_book from hexdoc.minecraft import I18n from hexdoc.patchouli import Book from hexdoc.utils import HexdocModel, ModResourceLoader, Properties +from hexdoc.utils.jinja_extensions import IncludeRawExtension, hexdoc_block, hexdoc_wrap from hexdoc.utils.path import write_to_path -from .__gradle_version__ import GRADLE_VERSION -from .utils.jinja_extensions import IncludeRawExtension, hexdoc_block, hexdoc_wrap - MARKER_NAME = ".sitemap-marker.json" diff --git a/doc/src/hexdoc/hexdoc_merge.py b/doc/src/hexdoc/scripts/hexdoc_merge.py similarity index 95% rename from doc/src/hexdoc/hexdoc_merge.py rename to doc/src/hexdoc/scripts/hexdoc_merge.py index 7468bf82..59f44db8 100644 --- a/doc/src/hexdoc/hexdoc_merge.py +++ b/doc/src/hexdoc/scripts/hexdoc_merge.py @@ -7,11 +7,11 @@ from typing import Self, Sequence from pydantic import Field, TypeAdapter from hexdoc.__gradle_version__ import GRADLE_VERSION -from hexdoc.hexdoc import MARKER_NAME, SitemapMarker -from hexdoc.utils import HexdocModel -from hexdoc.utils.model import DEFAULT_CONFIG +from hexdoc.utils import DEFAULT_CONFIG, HexdocModel from hexdoc.utils.path import write_to_path +from .hexdoc import MARKER_NAME, SitemapMarker + class SitemapItem(HexdocModel): default_path: str = Field(alias="defaultPath", default="") diff --git a/pyproject.toml b/pyproject.toml index aa00f469..2f036f58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,8 +34,8 @@ dev = [ ] [project.scripts] -hexdoc = "hexdoc.hexdoc:main" -hexdoc_merge = "hexdoc.hexdoc_merge:main" +hexdoc = "hexdoc.scripts.hexdoc:main" +hexdoc_merge = "hexdoc.scripts.hexdoc_merge:main" # Gradle version/deps