25 lines
579 B
Python
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"))
|