diff options
author | 2022-11-05 14:15:11 +0000 | |
---|---|---|
committer | 2022-11-05 14:15:11 +0000 | |
commit | 3f55e7149a3197b7fa41fcf7dc7df47a3a209cfd (patch) | |
tree | 11d77db3a48d8226bc1cd14cb18a21d2423b6352 /docs/utils.py | |
parent | Use New Static Build Site API (#122) (diff) | |
parent | Add six as a dev dep (diff) |
Merge pull request #157 from python-discord/prepare-for-pypi-releasev9.0.0
Prepare for pypi release
Diffstat (limited to 'docs/utils.py')
-rw-r--r-- | docs/utils.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/utils.py b/docs/utils.py index c8bbc895..e7295798 100644 --- a/docs/utils.py +++ b/docs/utils.py @@ -134,12 +134,12 @@ def cleanup() -> None: included = __get_included() for file in (get_build_root() / "docs" / "output").iterdir(): - if file.name in ("botcore.rst", "botcore.exts.rst", "botcore.utils.rst") and file.name in included: + if file.name in ("pydis_core.rst", "pydis_core.exts.rst", "pydis_core.utils.rst") and file.name in included: content = file.read_text(encoding="utf-8").splitlines(keepends=True) # Rename the extension to be less wordy - # Example: botcore.exts -> Botcore Exts - title = content[0].split()[0].strip().replace("botcore.", "").replace(".", " ").title() + # Example: pydis_core.exts -> pydis_core Exts + title = content[0].split()[0].strip().replace("pydis_core.", "").replace(".", " ").title() title = f"{title}\n{'=' * len(title)}\n\n" content = title, *content[3:] @@ -147,7 +147,7 @@ def cleanup() -> None: elif file.name in included: # Clean up the submodule name so it's just the name without the top level module name - # example: `botcore.regex module` -> `regex` + # example: `pydis_core.regex module` -> `regex` lines = file.read_text(encoding="utf-8").splitlines(keepends=True) lines[0] = lines[0].replace("module", "").strip().split(".")[-1] + "\n" file.write_text("".join(lines)) @@ -164,7 +164,7 @@ def cleanup() -> None: def build_api_doc() -> None: """Generate auto-module directives using apidoc.""" - cmd = os.getenv("APIDOC_COMMAND") or "sphinx-apidoc -o docs/output botcore -feM" + cmd = os.getenv("APIDOC_COMMAND") or "sphinx-apidoc -o docs/output pydis_core -feM" cmd = cmd.split() build_root = get_build_root() @@ -196,7 +196,7 @@ def __get_included() -> set[str]: return _modules - return get_all_from_module("botcore") + return get_all_from_module("pydis_core") def reorder_release_entries(release_list: list[releases.Release]) -> None: |