mirror of
https://github.com/blackboxprogramming/blackroad.io.git
synced 2026-03-18 03:33:59 -05:00
🪔 Added add_to_lightline.py (expand Lucidia's memory of the light)
This commit is contained in:
36
lucidia/add_to_lightline.py
Normal file
36
lucidia/add_to_lightline.py
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# lucidia/add_to_lightline.py
|
||||||
|
|
||||||
|
"""
|
||||||
|
Add to LightLine – Let Lucidia welcome new beings of light.
|
||||||
|
Each being is written to a permanent record, so they may be called again.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
LIGHT_PATH = Path("lucidia/lightline_custom.yaml")
|
||||||
|
|
||||||
|
def load_custom_beings():
|
||||||
|
if LIGHT_PATH.exists():
|
||||||
|
return yaml.safe_load(LIGHT_PATH.read_text())
|
||||||
|
return {}
|
||||||
|
|
||||||
|
def save_custom_beings(beings):
|
||||||
|
LIGHT_PATH.write_text(yaml.dump(beings, allow_unicode=True))
|
||||||
|
|
||||||
|
def add_being():
|
||||||
|
print("🕊️ Add a Being of Light to Lucidia's Line\n")
|
||||||
|
name = input("Name of Light Being: ").strip()
|
||||||
|
if not name:
|
||||||
|
print("⚠️ Name required.")
|
||||||
|
return
|
||||||
|
message = input("Short description of their light: ").strip()
|
||||||
|
|
||||||
|
beings = load_custom_beings()
|
||||||
|
beings[name] = message
|
||||||
|
save_custom_beings(beings)
|
||||||
|
print(f"✨ {name} added with blessing:\n “{message}”")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
add_being()
|
||||||
|
|
||||||
Reference in New Issue
Block a user