Files
natiris/config/update_config_with_pets.py

20 lines
626 B
Python

#!/usr/bin/env python3
"""Fügt Pets-Config in Hauptconfig ein"""
import json
with open(os.path.expanduser("~/natiris/config/pets_config.json")) as f:
pets = json.load(f)
with open(os.path.expanduser("~/natiris/config/character_genesis.json")) as f:
config = json.load(f)
# Update pets section
config["pets"] = pets
with open(os.path.expanduser("~/natiris/config/character_genesis.json"), "w") as f:
json.dump(config, f, indent=2, ensure_ascii=False)
print("✅ Config mit Pets aktualisiert")
print(json.dumps({"partner": config["pets"]["partner"], "katzen_count": len(config["pets"]["katzen"])}, indent=2))