more restructuring

This commit is contained in:
buenosairesam
2026-01-20 06:01:27 -03:00
parent e4052374db
commit a9d1e135cb
117 changed files with 86 additions and 928 deletions

View File

@@ -170,14 +170,15 @@ def build_managed(output_dir: Path, cfg_name: str, config: dict):
if copy_repo(source, target):
log.info(f" {repo_name}/")
# Copy ctrl from cfg/<room>/managed/ctrl/
# Copy ctrl from cfg/<room>/ctrl/
room_cfg = SPR_ROOT / "cfg" / cfg_name
managed_ctrl = room_cfg / "managed" / "ctrl"
if managed_ctrl.exists():
room_ctrl = room_cfg / "ctrl"
if room_ctrl.exists():
ctrl_dir = managed_dir / "ctrl"
ensure_dir(ctrl_dir)
for item in managed_ctrl.iterdir():
copy_path(item, ctrl_dir / item.name)
for item in room_ctrl.iterdir():
if item.is_file():
copy_path(item, ctrl_dir / item.name)
def build_link(output_dir: Path, cfg_name: str):
@@ -245,23 +246,20 @@ def copy_cfg(output_dir: Path, room: str):
if (room_cfg / ".env.example").exists():
copy_path(room_cfg / ".env.example", output_dir / ".env.example")
# Room-specific models
room_models = room_cfg / "models"
if room_models.exists():
copy_path(room_models, output_dir / "models" / room)
# Room-specific soleprint config (docker-compose.yml, etc)
# Now in cfg/<room>/soleprint/
room_soleprint = room_cfg / "soleprint"
if room_soleprint.exists():
for item in room_soleprint.iterdir():
copy_path(item, output_dir / item.name)
if item.is_file():
copy_path(item, output_dir / item.name)
# Merge room-specific system configs (artery, atlas, station)
for system in ["artery", "atlas", "station"]:
room_system = room_cfg / system
if room_system.exists():
log.info(f" Merging {room} {system}...")
merge_into(room_system, output_dir / system)
# Merge room-specific system configs from soleprint subfolder
for system in ["artery", "atlas", "station"]:
room_system = room_soleprint / system
if room_system.exists():
log.info(f" Merging {room} {system}...")
merge_into(room_system, output_dir / system)
def build_soleprint(output_dir: Path, room: str):