* Add PEP 723 metadata for various `bin` scripts * Use a subprocess to install chromium * Regenerate image * Update shebangs Co-Authored-By: Henry Schreiner <HenrySchreinerIII@gmail.com> * Add cibuildwheel local dependency for some scripts Co-Authored-By: Henry Schreiner <HenrySchreinerIII@gmail.com> * Remove `bin` dependency group fully * Add CSS for styling the diagram Co-Authored-By: Joe Rickerby <1244307+joerick@users.noreply.github.com> * Restore image to original * Install `uv` for PyLint to find it * Drop setup-python too in favour of setup-uv * Revert "Drop setup-python too in favour of setup-uv" This reverts commit 663db5c253f18bd09229ea5dbf92f7f6aa8ebf1c. * Make `uv` venv backend for nox optional again --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by: Joe Rickerby <1244307+joerick@users.noreply.github.com>
24 lines
658 B
Python
Executable File
24 lines
658 B
Python
Executable File
#!/usr/bin/env -S uv run --script
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
PROJECT_ROOT = Path(__file__).parent / ".."
|
|
CHANGELOG_FILE = PROJECT_ROOT / "docs" / "changelog.md"
|
|
|
|
# https://regexr.com/622ds
|
|
FIRST_5_CHANGELOG_ENTRIES_REGEX = re.compile(r"""(^###.*?(?=###)){5}""", re.DOTALL | re.MULTILINE)
|
|
|
|
|
|
def mini_changelog() -> str:
|
|
changelog_text = CHANGELOG_FILE.read_text()
|
|
|
|
mini_changelog_match = FIRST_5_CHANGELOG_ENTRIES_REGEX.search(changelog_text)
|
|
assert mini_changelog_match, "Failed to find the first few changelog entries"
|
|
|
|
return f"\n{mini_changelog_match.group(0).strip()}\n"
|
|
|
|
|
|
if __name__ == "__main__":
|
|
print(mini_changelog())
|