rwx/rwx/prj/__init__.py
Marc Beninca 4ffe0063e7
All checks were successful
/ job (push) Successful in 4m38s
render
2025-06-08 01:24:22 +02:00

25 lines
579 B
Python

"""Handle projects."""
from pathlib import Path
from rwx import Object
from rwx.ps import run
class Project(Object):
"""Parent class for any type of project."""
def __init__(self, file: Path) -> None:
"""Set file, root & name.
:param file: root reference file
:type file: Path
"""
self.raw = file
self.file = self.raw.resolve()
self.root: Path = self.file.parent
self.name: str = self.root.name
def render(self) -> None:
"""Build the project."""
run(str(self.root / "render.py"))